[sky9x] 2nd module EEPROM
This commit is contained in:
@@ -166,7 +166,7 @@ bool eeConvert()
|
||||
}
|
||||
g_model.protocol = oldModel.protocol;
|
||||
g_model.thrTrim = oldModel.thrTrim;
|
||||
g_model.ppmNCH = oldModel.ppmNCH;
|
||||
g_model.moduleData[0].channelsCount = oldModel.ppmNCH*2;
|
||||
g_model.trimInc = oldModel.trimInc;
|
||||
g_model.disableThrottleWarning = oldModel.disableThrottleWarning;
|
||||
g_model.moduleData[0].ppmPulsePol = oldModel.pulsePol;
|
||||
|
||||
+4
-4
@@ -1386,17 +1386,17 @@ void menuModelSetup(uint8_t event)
|
||||
lcd_putsLeft(y, PSTR("Port2"));
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, STR_VPROTOS, 0, 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+4*FW+3, y, STR_CH, m_posHorz<=0 ? attr : 0);
|
||||
lcd_outdezAtt(lcdLastPos, y, g_model.ppm2SCH+1, LEFT | (m_posHorz<=0 ? attr : 0));
|
||||
lcd_outdezAtt(lcdLastPos, y, g_model.moduleData[1].channelsStart+1, LEFT | (m_posHorz<=0 ? attr : 0));
|
||||
lcd_putc(lcdLastPos, y, '-');
|
||||
lcd_outdezAtt(lcdLastPos + FW+1, y, g_model.ppm2SCH+8+(g_model.ppm2NCH*2), LEFT | (m_posHorz!=0 ? attr : 0));
|
||||
lcd_outdezAtt(lcdLastPos + FW+1, y, g_model.moduleData[1].channelsStart+8+g_model.moduleData[1].channelsCount, LEFT | (m_posHorz!=0 ? attr : 0));
|
||||
if (attr && (editMode>0 || p1valdiff)) {
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.ppm2SCH, 32-8-(g_model.ppm2NCH*2));
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, g_model.moduleData[1].channelsStart, 32-8-g_model.moduleData[1].channelsCount);
|
||||
g_model.moduleData[1].ppmFrameLength = NUM_PORT1_CHANNELS()>NUM_PORT2_CHANNELS() ? 4*(NUM_PORT1_CHANNELS()-8) : 4*(NUM_PORT2_CHANNELS()-8);
|
||||
break;
|
||||
case 1:
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.ppm2NCH, -2, min<int8_t>(4, (32-g_model.ppm2SCH)/2-4));
|
||||
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[1].channelsCount, -4, min<int8_t>(8, 32-g_model.moduleData[1].channelsStart)-8);
|
||||
g_model.moduleData[1].ppmFrameLength = NUM_PORT1_CHANNELS()>NUM_PORT2_CHANNELS() ? 4*(NUM_PORT1_CHANNELS()-8) : 4*(NUM_PORT2_CHANNELS()-8);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ enum ModuleIndex {
|
||||
#define swstate_t uint16_t
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MODELDATA_BITMAP
|
||||
#define MODELDATA_EXTRA uint8_t ppmSCH; int8_t ppm2SCH; int8_t ppm2NCH; ModuleData moduleData[NUM_MODULES];
|
||||
#define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES];
|
||||
#define LIMITDATA_EXTRA
|
||||
#define swstate_t uint8_t
|
||||
#else
|
||||
|
||||
+1
-1
@@ -4177,8 +4177,8 @@ void mixerTask(void * pdata)
|
||||
CoLeaveMutexSection(mixerMutex);
|
||||
if (tick10ms) checkTrims();
|
||||
|
||||
uint8_t heartbeatCheck = HEART_TIMER_10MS;
|
||||
#if defined(PCBTARANIS)
|
||||
uint8_t heartbeatCheck = HEART_TIMER_10MS;
|
||||
if (g_model.moduleData[0].rfProtocol != RF_PROTO_OFF)
|
||||
heartbeatCheck |= HEART_TIMER_PULSES << 0;
|
||||
if (g_model.externalModule != MODULE_TYPE_NONE)
|
||||
|
||||
+1
-1
@@ -440,7 +440,7 @@ extern "C" void PWM_IRQHandler(void)
|
||||
}
|
||||
pwmptr->PWM_CH_NUM[3].PWM_CPDRUPD = period; // Period in half uS
|
||||
if (period != 5000) { // 2.5 mS
|
||||
setupPulses(INTERNAL_MODULE);
|
||||
setupPulses(0);
|
||||
}
|
||||
else {
|
||||
// Kick off serial output here
|
||||
|
||||
Reference in New Issue
Block a user