Rev 2045 | Rev 2051 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2045 | Rev 2048 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | #include <stddef.h> |
53 | #include <stddef.h> |
54 | #include <string.h> |
54 | #include <string.h> |
55 | #include "configuration.h" |
55 | #include "configuration.h" |
56 | #include "sensors.h" |
56 | #include "sensors.h" |
57 | #include "rc.h" |
57 | #include "rc.h" |
58 | #include "uart0.h" |
58 | //#include "uart0.h" |
- | 59 | #include "output.h" |
|
Line 59... | Line 60... | ||
59 | 60 | ||
60 | int16_t variables[VARIABLE_COUNT]; |
61 | int16_t variables[VARIABLE_COUNT]; |
61 | ParamSet_t staticParams; |
62 | ParamSet_t staticParams; |
62 | channelMap_t channelMap; |
63 | channelMap_t channelMap; |
Line 79... | Line 80... | ||
79 | ************************************************************************/ |
80 | ************************************************************************/ |
Line 80... | Line 81... | ||
80 | 81 | ||
81 | void configuration_applyVariablesToParams(void) { |
82 | void configuration_applyVariablesToParams(void) { |
Line 82... | Line -... | ||
82 | uint8_t i; |
- | |
83 | - | ||
84 | debugOut.analog[20] = variables[0]; |
83 | uint8_t i; |
85 | 84 | ||
86 | #define SET_POT_MM(b,a,min,max) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a; if(b<=min) b=min; else if(b>=max) b=max;} |
85 | #define SET_POT_MM(b,a,min,max) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a; if(b<=min) b=min; else if(b>=max) b=max;} |
87 | #define SET_POT(b,a) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a;} |
86 | #define SET_POT(b,a) {if (a>=255-VARIABLE_COUNT) b=variables[a+VARIABLE_COUNT-255]; else b=a;} |
88 | SET_POT_MM(dynamicParams.gyroP, staticParams.gyroP, 5, 200); |
87 | SET_POT_MM(dynamicParams.gyroP, staticParams.gyroP, 5, 200); |
Line 278... | Line 277... | ||
278 | staticParams.outputFlash[0].timing = 15; |
277 | staticParams.outputFlash[0].timing = 15; |
279 | staticParams.outputFlash[1].bitmask = 3; //0b11110011; |
278 | staticParams.outputFlash[1].bitmask = 3; //0b11110011; |
280 | staticParams.outputFlash[1].timing = 15; |
279 | staticParams.outputFlash[1].timing = 15; |
Line 281... | Line 280... | ||
281 | 280 | ||
- | 281 | staticParams.outputDebugMask = 8; |
|
- | 282 | staticParams.outputFlags = OUTPUTFLAGS_FLASH_0_AT_BEEP | OUTPUTFLAGS_FLASH_1_AT_BEEP | OUTPUTFLAGS_USE_ONBOARD_LEDS; |
|
282 | staticParams.outputDebugMask = 8; |
283 | |
283 | staticParams.outputFlags = 16|8|4; |
284 | staticParams.naviMode = 200; // free. |
Line 284... | Line 285... | ||
284 | } |
285 | } |
285 | 286 | ||
286 | /***************************************************/ |
287 | /***************************************************/ |