mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-23 16:25:12 +03:00
Sky9x platform fixes
This commit is contained in:
parent
5e2fe112b0
commit
c53ba92139
6 changed files with 14 additions and 7 deletions
|
@ -1386,6 +1386,10 @@ void ModelData::clear()
|
||||||
moduleData[0].protocol=PXX_XJT_X16;
|
moduleData[0].protocol=PXX_XJT_X16;
|
||||||
moduleData[1].protocol=OFF;
|
moduleData[1].protocol=OFF;
|
||||||
}
|
}
|
||||||
|
else if (IS_SKY9X(board)) {
|
||||||
|
moduleData[0].protocol=PPM;
|
||||||
|
moduleData[1].protocol=PPM;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
moduleData[0].protocol=PPM;
|
moduleData[0].protocol=PPM;
|
||||||
moduleData[1].protocol=OFF;
|
moduleData[1].protocol=OFF;
|
||||||
|
|
|
@ -649,7 +649,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
||||||
case Haptic:
|
case Haptic:
|
||||||
return (IS_2560(board) || IS_SKY9X(board) || IS_TARANIS_PLUS(board) || id.contains("haptic"));
|
return (IS_2560(board) || IS_SKY9X(board) || IS_TARANIS_PLUS(board) || id.contains("haptic"));
|
||||||
case ModelTrainerEnable:
|
case ModelTrainerEnable:
|
||||||
if (IS_ARM(board))
|
if (IS_TARANIS(board))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1329,6 +1329,7 @@ void registerOpenTxFirmwares()
|
||||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||||
|
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||||
|
@ -1349,6 +1350,7 @@ void registerOpenTxFirmwares()
|
||||||
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
firmware->addOption("ppmca", QObject::tr("PPM center adjustment in limits"));
|
||||||
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
firmware->addOption("gvars", QObject::tr("Global variables"), GVARS_VARIANT);
|
||||||
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
firmware->addOption("symlimits", QObject::tr("Symetrical Limits"));
|
||||||
|
firmware->addOption("timer3", QObject::tr("Support for a third timer"));
|
||||||
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
firmware->addOption("potscroll", QObject::tr("Pots use in menus navigation"));
|
||||||
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
firmware->addOption("autosource", QObject::tr("In model setup menus automatically set source by moving the control"));
|
||||||
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
firmware->addOption("autoswitch", QObject::tr("In model setup menus automatically set switch by moving the control"));
|
||||||
|
|
|
@ -753,6 +753,7 @@ ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO))
|
||||||
LCDSIZE = 128
|
LCDSIZE = 128
|
||||||
CPPDEFS = -Dat91sam3s4
|
CPPDEFS = -Dat91sam3s4
|
||||||
ifeq ($(PCB), 9XRPRO)
|
ifeq ($(PCB), 9XRPRO)
|
||||||
|
CPPDEFS = -Dat91sam3s8
|
||||||
FLAVOUR = 9xrpro
|
FLAVOUR = 9xrpro
|
||||||
CPPDEFS += -DREVX
|
CPPDEFS += -DREVX
|
||||||
LDSCRIPT = targets/sky9x/sam3s8c_flash.ld
|
LDSCRIPT = targets/sky9x/sam3s8c_flash.ld
|
||||||
|
|
|
@ -561,7 +561,7 @@ void menuModelTelemetry(uint8_t event)
|
||||||
lcd_putcAtt(lcdLastPos, y, ':', attr);
|
lcd_putcAtt(lcdLastPos, y, ':', attr);
|
||||||
lcd_putsnAtt(3*FW, y, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN, ZCHAR);
|
lcd_putsnAtt(3*FW, y, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN, ZCHAR);
|
||||||
if (telemetryItems[index].isFresh()) {
|
if (telemetryItems[index].isFresh()) {
|
||||||
lcd_putc(10*FW, y, '*');
|
lcd_putc(16*FW, y, '*');
|
||||||
}
|
}
|
||||||
TelemetryItem & telemetryItem = telemetryItems[index];
|
TelemetryItem & telemetryItem = telemetryItems[index];
|
||||||
if (telemetryItem.isAvailable()) {
|
if (telemetryItem.isAvailable()) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ INIT_STOPS(stopsSwitch, 15, SWSRC_FIRST, CATEGORY_END(-SWSRC_FIRST_LOGICAL_SWITC
|
||||||
|
|
||||||
int checkIncDec(unsigned int event, int val, int i_min, int i_max, unsigned int i_flags, IsValueAvailable isValueAvailable, const CheckIncDecStops &stops)
|
int checkIncDec(unsigned int event, int val, int i_min, int i_max, unsigned int i_flags, IsValueAvailable isValueAvailable, const CheckIncDecStops &stops)
|
||||||
{
|
{
|
||||||
int16_t newval = val;
|
int newval = val;
|
||||||
|
|
||||||
#if defined(DBLKEYS)
|
#if defined(DBLKEYS)
|
||||||
uint8_t in = KEYS_PRESSED();
|
uint8_t in = KEYS_PRESSED();
|
||||||
|
|
|
@ -223,15 +223,15 @@ void displayBattVoltage()
|
||||||
#if defined(PCBSKY9X)
|
#if defined(PCBSKY9X)
|
||||||
void displayVoltageOrAlarm()
|
void displayVoltageOrAlarm()
|
||||||
{
|
{
|
||||||
if (IS_TXBATT_WARNING()) {
|
if (g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) {
|
||||||
displayBattVoltage();
|
|
||||||
}
|
|
||||||
else if (g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) {
|
|
||||||
putsValueWithUnit(6*FW-1, 2*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE);
|
putsValueWithUnit(6*FW-1, 2*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE);
|
||||||
}
|
}
|
||||||
else if (g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib)/8192/36) / 500 >= g_eeGeneral.mAhWarn) {
|
else if (g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib)/8192/36) / 500 >= g_eeGeneral.mAhWarn) {
|
||||||
putsValueWithUnit(7*FW-1, 2*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE);
|
putsValueWithUnit(7*FW-1, 2*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
displayBattVoltage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define displayVoltageOrAlarm() displayBattVoltage()
|
#define displayVoltageOrAlarm() displayBattVoltage()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue