aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libdvbsec/dvbsec_api.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/libdvbsec/dvbsec_api.c b/lib/libdvbsec/dvbsec_api.c
index 5f2ae22..62d225e 100644
--- a/lib/libdvbsec/dvbsec_api.c
+++ b/lib/libdvbsec/dvbsec_api.c
@@ -537,19 +537,12 @@ int dvbsec_diseqc_goto_rotator_bearing(struct dvbfe_handle *fe,
}
// generate the command
- if (integer < -256) {
- return -EINVAL;
- } else if (integer < 0) {
- integer = -integer;
- data[3] = 0xf0;
- } else if (integer < 256) {
- data[3] = 0x00;
- } else if (integer < 512) {
- integer -= 256;
- data[3] = 0x10;
- } else {
- return -EINVAL;
+ if (integer < 0.0) {
+ data[3] = 0xD0; // West is a negative angle value
+ } else if (integer >= 0.0) {
+ data[3] = 0xE0; // East is a positive angle value
}
+ integer = abs(integer);
data[3] |= ((integer / 16) & 0x0f);
integer = integer % 16;
data[4] |= ((integer & 0x0f) << 4) | fraction;
d> Improved configuration parameters: - FifoPath to specify the fifo path (if absent, a built in replacement is used) - FifoBufSize to specify the size of the internal buffer (this parameter is optional as the plugin will try to match the number of display columns; if it fails and no FifoBufSize parameter is supplied then a built in replacement is used) Simplified and rationalized init and exit functions: most global variables have been localized. Fixed several off-by-one overflows memory bugs. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1108 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-07timer.c: two small optimizations (removed "flag"; tv_usec can't be negative)mzuther1-7/+4 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1107 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-07added grouping of widgets by update interval (new file "timer_group.c")mzuther13-168/+441 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1106 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-07BUG: handle negative delays in timer_process() (timer.c)mzuther1-0/+4 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1105 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-06timer.c: I had forgotten how to initialize a "struct" :)mzuther1-3/+4 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1104 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-06BUG: compensate timers for processing delay ("timer.c")mzuther1-1/+3 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1103 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-06timer.c: exchanged "proprietary code" with timeradd() and timersub() functionsmzuther1-14/+10 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1102 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-04timer.c: removed fruitless changes to variable "flag" from timer_process()mzuther1-2/+0 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1101 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-04According to its man page, timercmp() is broken on some systems -- applied ↵mzuther1-1/+1 the recommended (and equivalent) change. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1100 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-04small warning removedmichael1-1/+1 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1099 3ae390bd-cb1e-0410-b409-cd5a39f66f1f 2010-02-04clear errno after creating the FIFO by Claas Hilbrechtmichael1-0/+2 git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1098 3ae390bd-cb1e-0410-b409-cd5a39f66f1f