summaryrefslogtreecommitdiff
path: root/diseqc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-09-17 10:41:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-09-17 10:41:00 +0200
commitffaf10c3f35b8cb59be65345c20e01fb5a27105a (patch)
treea4bbec96c2c11bd3237c2a89e9222f5353381281 /diseqc.c
parentfea8c9a64f4ed5987add9b0723d73e42c6ab2212 (diff)
downloadvdr-ffaf10c3f35b8cb59be65345c20e01fb5a27105a.tar.gz
vdr-ffaf10c3f35b8cb59be65345c20e01fb5a27105a.tar.bz2
Added a note about rounding
Diffstat (limited to 'diseqc.c')
-rw-r--r--diseqc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diseqc.c b/diseqc.c
index 07529606..3c2fb661 100644
--- a/diseqc.c
+++ b/diseqc.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: diseqc.c 2.7 2011/09/11 13:39:48 kls Exp $
+ * $Id: diseqc.c 2.8 2011/09/17 10:41:00 kls Exp $
*/
#include "diseqc.h"
@@ -122,7 +122,7 @@ bool cDiseqc::Parse(const char *s)
uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const
{
- uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350;
+ uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) {
Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5;
Codes[4] = t;