[Redbutton-devel] SF.net SVN: redbutton: [340] redbutton-download/trunk/channels.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-08-23 13:10:29
|
Revision: 340
http://redbutton.svn.sourceforge.net/redbutton/?rev=340&view=rev
Author: skilvington
Date: 2007-08-23 06:10:24 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
patch from Mario Rossi to stop rb-download trying to tune unless it really needs to
Modified Paths:
--------------
redbutton-download/trunk/channels.c
Modified: redbutton-download/trunk/channels.c
===================================================================
--- redbutton-download/trunk/channels.c 2007-08-23 12:53:39 UTC (rev 339)
+++ redbutton-download/trunk/channels.c 2007-08-23 13:10:24 UTC (rev 340)
@@ -39,6 +39,7 @@
#define SLOF (11700*1000UL)
#define LOF1 (9750*1000UL)
#define LOF2 (10600*1000UL)
+#define ONE_kHz 1000UL
/* internal functions */
static bool get_tune_params(fe_type_t, uint16_t, struct dvb_frontend_parameters *, char *, unsigned int *);
@@ -575,8 +576,10 @@
/* are we already tuned to the right frequency */
vverbose("Current frequency %u; needed %u; first_time=%d", current_params.frequency, needed_params.frequency, first_time);
+
+ /* frequency resolution is up to 1 kHz */
if(first_time
- || current_params.frequency != needed_params.frequency)
+ || abs(current_params.frequency - needed_params.frequency) >= ONE_kHz)
{
first_time = false;
verbose("Retuning to frequency %u", needed_params.frequency);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|