[Taranis] Reboot when changing stick mode and throttle warning active, External PXX wrong, Elevator stick inverted with new gimbals

This commit is contained in:
bernet.andre@gmail.com
2013-05-02 13:21:51 +00:00
parent eb7488f670
commit 914ca9d865
5 changed files with 13 additions and 11 deletions
-4
View File
@@ -958,10 +958,6 @@ void eeLoadModel(uint8_t id)
resumeMixerCalculations();
// TODO pulses should be started after mixer calculations ...
#if defined(PCBTARANIS)
startPulses();
#endif
#if defined(FRSKY)
frskySendAlarms();
#endif
+4 -4
View File
@@ -294,9 +294,9 @@ void setupPulsesPXX(unsigned int port)
putPcmByte(0, port);
/* PPM */
static uint32_t pass = 0;
static uint32_t pass[NUM_MODULES] = {0};
uint32_t sendUpperChannels = 0;
if (pass++ & 0x01) {
if (pass[port]++ & 0x01) {
sendUpperChannels = g_model.moduleData[port].channelsCount;
}
for (uint32_t i=0; i<8; i++) {
@@ -320,9 +320,9 @@ void setupPulsesPXX(unsigned int port)
}
else {
if (i < sendUpperChannels)
chan = limit(2048, PPM_CH_CENTER(8+g_model.moduleData[0].channelsStart+i) - PPM_CENTER + (channelOutputs[8+g_model.moduleData[0].channelsStart+i] * 512 / 682) + 3072, 4095);
chan = limit(2048, PPM_CH_CENTER(8+g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (channelOutputs[8+g_model.moduleData[port].channelsStart+i] * 512 / 682) + 3072, 4095);
else
chan = limit(0, PPM_CH_CENTER(g_model.moduleData[0].channelsStart+i) - PPM_CENTER + (channelOutputs[g_model.moduleData[0].channelsStart+i] * 512 / 682) + 1024, 2047);
chan = limit(0, PPM_CH_CENTER(g_model.moduleData[port].channelsStart+i) - PPM_CENTER + (channelOutputs[g_model.moduleData[port].channelsStart+i] * 512 / 682) + 1024, 2047);
}
if (i & 1) {
+6 -1
View File
@@ -58,7 +58,12 @@ inline void startPulses()
inline bool pulsesStarted() { return s_current_protocol[0] != 255; }
inline void pausePulses() { s_pulses_paused = true; }
inline void resumePulses() { s_pulses_paused = false; }
inline void resumePulses() {
s_pulses_paused = false;
#if defined(PCBTARANIS)
startPulses(); //TODO delete
#endif
}
#define SEND_FAILSAFE_NOW(idx) failsafeCounter[idx] = 1
+1 -1
View File
@@ -60,7 +60,7 @@
volatile uint16_t Analog_values[NUMBER_ANALOG];
#if !defined(REV3)
const char ana_direction[NUMBER_ANALOG] = {0,1,1,1, 1,1,1,0, 0};
const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,1,1,0, 0};
#endif
void adcInit()
+2 -1
View File
@@ -210,7 +210,8 @@ void boardInit()
#if defined(DEBUG)
uartInit(DEBUG_UART_BAUDRATE);
#endif
init_trainer_capture(); init5msTimer();
init_trainer_capture();
init5msTimer();
__enable_irq();
eepromInit();
sportInit();