68,6 → 68,7 |
#include "configuration.h" |
#include "printf_P.h" |
#include "twimaster.h" |
#include "controlMixer.h" |
#ifdef USE_NAVICTRL |
#include "spi.h" |
#endif |
91,6 → 92,10 |
WDTCSR |= (1 << WDCE) | (1 << WDE); |
WDTCSR = 0; |
|
// This is strange: It should NOT be necessarty to do. But the call of the same, |
// in channelMap_readOrDefault (if eeprom read fails) just sets all to 0,0,0,.... |
channelMap_default(); |
|
// initalize modules |
output_init(); |
timer0_init(); |
107,6 → 112,11 |
MK3MAG_Init(); |
#endif |
|
// Parameter Set handling |
channelMap_readOrDefault(); |
mixerMatrix_readOrDefault(); |
paramSet_readOrDefault(); |
|
// enable interrupts global |
sei(); |
|
119,11 → 129,6 |
printf("\n\rSoftware: V%d.%d%c",VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH + 'a'); |
printf("\n\r==================================="); |
|
// Parameter Set handling |
channelMap_readOrDefault(); |
mixerMatrix_readOrDefault(); |
paramSet_readOrDefault(); |
|
// Wait for a short time (otherwise the RC channel check won't work below) |
// timer = SetDelay(500); |
// while(!CheckDelay(timer)); |