summaryrefslogtreecommitdiff
path: root/diseqc.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-01-09 15:21:13 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-01-09 15:21:13 +0100
commit6121095a300bb5cd8731aefb74bc7b26315ce985 (patch)
tree2f8f67ecf42386332011b2bb44ac450231ab4730 /diseqc.c
parent6773ab35d2e8638b906346b51f678f1090bc0454 (diff)
downloadvdr-6121095a300bb5cd8731aefb74bc7b26315ce985.tar.gz
vdr-6121095a300bb5cd8731aefb74bc7b26315ce985.tar.bz2
Changed 'unsigned' to 'signed' in some places to avoid trouble with abs() in gcc6+
Diffstat (limited to 'diseqc.c')
-rw-r--r--diseqc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/diseqc.c b/diseqc.c
index de64257f..c79e6bb6 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 3.4 2015/01/26 12:02:14 kls Exp $
+ * $Id: diseqc.c 4.1 2017/01/09 15:10:40 kls Exp $
*/
#include "diseqc.h"
@@ -253,10 +253,10 @@ bool cDiseqc::Parse(const char *s)
return result;
}
-uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const
+int cDiseqc::SetScrFrequency(int SatFrequency, const cScr *Scr, uint8_t *Codes) const
{
if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS
- uint t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
+ int t = SatFrequency == 0 ? 0 : (SatFrequency - 100);
if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) {
Codes[1] = t >> 8 | Scr->Channel() << 3;
Codes[2] = t;
@@ -266,7 +266,7 @@ uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes
}
}
else { // EN50494 aka Unicable
- uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding!
+ int 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;
@@ -399,7 +399,7 @@ const char *cDiseqc::GetCodes(const char *s, uchar *Codes, uint8_t *MaxCodes) co
return NULL;
}
-cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, uint *Frequency) const
+cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, int *Frequency) const
{
if (!*CurrentAction)
*CurrentAction = commands;