Subversion Repositories FlightCtrl

Rev

Rev 2040 | Rev 2296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2040 Rev 2191
Line 41... Line 41...
41
#define Poti5 Poti[4]
41
#define Poti5 Poti[4]
42
#define Poti6 Poti[5]
42
#define Poti6 Poti[5]
43
#define Poti7 Poti[6]
43
#define Poti7 Poti[6]
44
#define Poti8 Poti[7]
44
#define Poti8 Poti[7]
Line -... Line 45...
-
 
45
 
-
 
46
#define LIMIT_MIN(value, min) {if(value <= min) value = min;}
-
 
47
#define LIMIT_MAX(value, max) {if(value >= max) value = max;}
-
 
48
#define LIMIT_MIN_MAX(value, min, max) {if(value <= min) value = min; else if(value >= max) value = max;}
45
 
49
 
46
#define CHK_POTI(b,a) {if(a < 248) b = a; else b = Poti[255 - a];}
50
#define CHK_POTI(b,a) {if(a < 248) b = a; else b = Poti[255 - a];}
47
#define CHK_POTI_OFF(b,a,off) {if(a < 248) b = a; else b = Poti[255 - a] - off;}
51
#define CHK_POTI_OFF(b,a,off) {if(a < 248) b = a; else b = Poti[255 - a] - off;}
48
#define CHK_POTI_MM(b,a,min,max) {CHK_POTI(b,a); LIMIT_MIN_MAX(b, min, max);}
52
#define CHK_POTI_MM(b,a,min,max) {CHK_POTI(b,a); LIMIT_MIN_MAX(b, min, max);}