[X9D] Mixer now runs

This commit is contained in:
bsongis
2013-01-06 22:25:10 +00:00
parent 796c1adfbc
commit 148d8a726f
2 changed files with 14 additions and 9 deletions
+5
View File
@@ -3430,6 +3430,11 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
// TODO startPulses should be started after the first doMixerCalculations() // TODO startPulses should be started after the first doMixerCalculations()
#endif #endif
#if defined(PCBX9D)
// TODO remove this line, it only allows the Mixer to run (until pulses are there!)
s_current_protocol = PROTO_PPM;
#endif
startPulses(); startPulses();
wdt_enable(WDTO_500MS); wdt_enable(WDTO_500MS);
+9 -9
View File
@@ -73,16 +73,16 @@ uint32_t readTrims()
if (c & PIN_TRIM2_UP) if (c & PIN_TRIM2_UP)
result |= 0x04; result |= 0x04;
if (c & PIN_TRIM2_DN) if (c & PIN_TRIM2_DN)
result |= 0x03; result |= 0x08;
if (e & PIN_TRIM3_UP) if (e & PIN_TRIM3_UP)
result |= 0x06; result |= 0x10;
if (e & PIN_TRIM3_DN) if (e & PIN_TRIM3_DN)
result |= 0x05; result |= 0x20;
if (e & PIN_TRIM4_UP) if (e & PIN_TRIM4_UP)
result |= 0x08; result |= 0x40;
if (e & PIN_TRIM4_DN) if (e & PIN_TRIM4_DN)
result |= 0x07; result |= 0x80;
return result; return result;
} }
@@ -104,12 +104,12 @@ void readKeysAndTrims()
++enuk; ++enuk;
} }
/* in = readTrims(); in = readTrims();
for (i = 1; i < 256; i <<= 1) { /* for (i = 1; i < 256; i <<= 1) {
keys[enuk].input(in & i, (EnumKeys) enuk); keys[enuk].input(in & i, (EnumKeys)enuk);
++enuk; ++enuk;
}*/ } */
} }
uint32_t keyState(EnumKeys enuk) uint32_t keyState(EnumKeys enuk)