Merge pull request #589 from opentx/kilrah/588_Hardware_settings
Kilrah/588 hardware settings
This commit is contained in:
@@ -479,6 +479,7 @@ class GeneralSettings {
|
||||
int backgroundVolume;
|
||||
unsigned int mavbaud;
|
||||
unsigned int switchUnlockStates;
|
||||
unsigned int hw_uartMode;
|
||||
};
|
||||
|
||||
class CurveReference {
|
||||
|
||||
@@ -2110,6 +2110,9 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
|
||||
internalField.Append(new SignedField<8>(generalData.varioVolume));
|
||||
internalField.Append(new SignedField<8>(generalData.backgroundVolume));
|
||||
}
|
||||
if (version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(generalData.hw_uartMode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ enum EnumTabDiag {
|
||||
e_Vers,
|
||||
e_Keys,
|
||||
e_Ana,
|
||||
IF_PCBSKY9X(e_Hardware)
|
||||
IF_CPUARM(e_Hardware)
|
||||
e_Calib
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ const MenuFuncP_PROGMEM menuTabDiag[] PROGMEM = {
|
||||
menuGeneralVersion,
|
||||
menuGeneralDiagKeys,
|
||||
menuGeneralDiagAna,
|
||||
IF_PCBSKY9X(menuGeneralHardware)
|
||||
IF_CPUARM(menuGeneralHardware)
|
||||
menuGeneralCalib
|
||||
};
|
||||
|
||||
@@ -1166,7 +1166,33 @@ void menuGeneralDiagAna(uint8_t event)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
#if defined(PCBTARANIS)
|
||||
enum menuGeneralHwItems {
|
||||
ITEM_SETUP_HW_UART3_MODE,
|
||||
ITEM_SETUP_HW_MAX
|
||||
};
|
||||
|
||||
#define HW_SETTINGS_COLUMN 15*FW
|
||||
|
||||
void menuGeneralHardware(uint8_t event)
|
||||
{
|
||||
MENU(STR_HARDWARE, menuTabDiag, e_Hardware, ITEM_SETUP_HW_MAX+1, {0});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
for (uint8_t i=0; i<ITEM_SETUP_HW_MAX; i++) {
|
||||
uint8_t y = 1 + 1*FH + i*FH;
|
||||
uint8_t attr = (sub == i ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
switch(i) {
|
||||
case ITEM_SETUP_HW_UART3_MODE:
|
||||
g_eeGeneral.hw_uartMode = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_UART3MODE, STR_UART3MODES, g_eeGeneral.hw_uartMode, 0, 2, attr, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#elif defined(PCBSKY9X)
|
||||
enum menuGeneralHwItems {
|
||||
ITEM_SETUP_HW_OPTREX_DISPLAY,
|
||||
ITEM_SETUP_HW_STICKS_GAINS_LABELS,
|
||||
|
||||
@@ -239,7 +239,8 @@ enum BeeperMode {
|
||||
int8_t beepVolume; \
|
||||
int8_t wavVolume; \
|
||||
int8_t varioVolume; \
|
||||
int8_t backgroundVolume;
|
||||
int8_t backgroundVolume; \
|
||||
uint8_t hw_uartMode;
|
||||
#elif defined(PXX)
|
||||
#define EXTRA_GENERAL_FIELDS uint8_t countryCode;
|
||||
#else
|
||||
|
||||
@@ -55,6 +55,9 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
||||
#endif
|
||||
ISTR(TRNMODE)
|
||||
ISTR(TRNCHN)
|
||||
#if defined(PCBTARANIS)
|
||||
ISTR(UART3MODES)
|
||||
#endif
|
||||
ISTR(VTRIMINC)
|
||||
ISTR(RETA123)
|
||||
ISTR(VPROTOS)
|
||||
@@ -491,6 +494,7 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text";
|
||||
const pm_char STR_SCALE[] PROGMEM = "Scale";
|
||||
const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels";
|
||||
const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes";
|
||||
const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE;
|
||||
#endif
|
||||
|
||||
#if MENUS_LOCK == 1
|
||||
|
||||
@@ -99,7 +99,12 @@ extern const pm_char STR_OPEN9X[];
|
||||
#define OFS_TRNMODE (OFS_VBEEPMODE + sizeof(TR_VBEEPMODE))
|
||||
#endif
|
||||
#define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE))
|
||||
#if defined(PCBTARANIS)
|
||||
#define OFS_UART3MODES (OFS_TRNCHN + sizeof(TR_TRNCHN))
|
||||
#define OFS_VTRIMINC (OFS_UART3MODES + sizeof(TR_UART3MODES))
|
||||
#else
|
||||
#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
|
||||
#endif
|
||||
#define OFS_RETA123 (OFS_VTRIMINC + sizeof(TR_VTRIMINC))
|
||||
#define OFS_VPROTOS (OFS_RETA123 + sizeof(TR_RETA123))
|
||||
#define OFS_POSNEG (OFS_VPROTOS + sizeof(TR_VPROTOS))
|
||||
@@ -190,6 +195,7 @@ extern const pm_char STR_OPEN9X[];
|
||||
#define STR_VBEEPMODE (STR_OPEN9X + OFS_VBEEPMODE)
|
||||
#define STR_TRNMODE (STR_OPEN9X + OFS_TRNMODE)
|
||||
#define STR_TRNCHN (STR_OPEN9X + OFS_TRNCHN)
|
||||
#define STR_UART3MODES (STR_OPEN9X + OFS_UART3MODES)
|
||||
#define STR_VTRIMINC (STR_OPEN9X + OFS_VTRIMINC)
|
||||
#define STR_RETA123 (STR_OPEN9X + OFS_RETA123)
|
||||
#define STR_VPROTOS (STR_OPEN9X + OFS_VPROTOS)
|
||||
@@ -675,6 +681,7 @@ extern const pm_char STR_VIEW_TEXT[];
|
||||
extern const pm_char STR_SCALE[];
|
||||
extern const pm_char STR_VIEW_CHANNELS[];
|
||||
extern const pm_char STR_VIEW_NOTES[];
|
||||
extern const pm_char STR_UART3MODE[];
|
||||
#endif
|
||||
|
||||
#if MENUS_LOCK == 1
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT cz.h - EDIT cz.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier cz.h.txt is parsed and national
|
||||
@@ -31,7 +32,6 @@
|
||||
* See translate.py in the util catalog for the list of character codes
|
||||
*
|
||||
* !!!!! DO NOT EDIT cz.h - EDIT cz.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
*/
|
||||
/* Fotmatting octal codes available in TR_ strings:
|
||||
* \037\x -sets LCD x-coord (x value in octal)
|
||||
@@ -68,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\006"
|
||||
#define TR_DATETIME "DATUM:""ČAS: "
|
||||
|
||||
@@ -667,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Kritický Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT de.h - EDIT de.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier de.h.txt is parsed and national
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""ZEIT:"
|
||||
|
||||
@@ -669,6 +673,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Kritisch Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -68,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""TIME:"
|
||||
|
||||
@@ -674,6 +677,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT es.h - EDIT es.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier es.h.txt is parsed and national
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATA:""HORA:"
|
||||
|
||||
@@ -666,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Alarma Critica"
|
||||
#define TR_PERSISTENT_MAH INDENT "Valor mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT fr.h - EDIT fr.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier fr.h.txt is parsed and national
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATE:""HEURE"
|
||||
|
||||
@@ -666,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Alarme critique"
|
||||
#define TR_PERSISTENT_MAH TR(INDENT "Enr. mAh",INDENT "Enregistrer mAh")
|
||||
#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* - Martin Hotar <mhotar@gmail.com>
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
*
|
||||
*
|
||||
* opentx is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "ch1ch2ch3ch4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATA:""ORA :"
|
||||
|
||||
@@ -666,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Allarme Critico"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT pl.h - EDIT pl.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier pl.h.txt is parsed and national
|
||||
@@ -69,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\006"
|
||||
#define TR_DATETIME "DANA:""Czas:\0 "
|
||||
|
||||
@@ -668,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Alarm krytyczny"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT pt.h - EDIT pt.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier pt.h.txt is parsed and national
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "CH1CH2CH3CH4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DATA:""HORA:"
|
||||
|
||||
@@ -666,6 +670,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!!! DO NOT EDIT se.h - EDIT se.h.txt INSTEAD !!!!!!!
|
||||
*
|
||||
* In order to make translations easier se.h.txt is parsed and national
|
||||
@@ -67,6 +68,9 @@
|
||||
#define LEN_TRNCHN "\003"
|
||||
#define TR_TRNCHN "KN1KN2KN3KN4"
|
||||
|
||||
#define LEN_UART3MODES "\017"
|
||||
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
|
||||
|
||||
#define LEN_DATETIME "\005"
|
||||
#define TR_DATETIME "DAG: ""TID: "
|
||||
|
||||
@@ -669,6 +673,7 @@
|
||||
#define TR_CRITICALALARM INDENT "Kritiskt alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
Reference in New Issue
Block a user