[Taranis] Trainer detect working (thanks Mike!)
Trim reset via long press with audio confirmation Backlight flash shorter
This commit is contained in:
+8
-4
@@ -896,10 +896,14 @@ void menuModelSetup(uint8_t event)
|
||||
#else
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, m_posHorz<=0 ? attr : 0, event==EVT_KEY_BREAK(KEY_ENTER) ? event : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET, m_posHorz>0 ? attr : 0);
|
||||
if (attr && m_posHorz>0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
s_editMode = 0;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
memclear(&g_model.phaseData[i], TRIMS_ARRAY_SIZE);
|
||||
if (attr && m_posHorz>0) {
|
||||
s_editMode = 0;
|
||||
if (event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
memclear(&g_model.phaseData[i], TRIMS_ARRAY_SIZE);
|
||||
}
|
||||
eeDirty(EE_MODEL);
|
||||
AUDIO_WARNING1();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1062,7 +1062,7 @@ extern uint16_t anaIn(uint8_t chan);
|
||||
extern int16_t thrAnaIn(uint8_t chan);
|
||||
extern int16_t calibratedStick[NUM_STICKS+NUM_POTS];
|
||||
|
||||
#define FLASH_DURATION 50 /*500ms*/
|
||||
#define FLASH_DURATION 20 /*200ms*/
|
||||
|
||||
extern uint8_t beepAgain;
|
||||
extern uint16_t lightOffCounter;
|
||||
|
||||
@@ -49,7 +49,7 @@ uint32_t pwrCheck()
|
||||
if (GPIO_ReadInputDataBit(GPIOPWR, PIN_PWR_STATUS) == Bit_RESET)
|
||||
return e_power_on;
|
||||
#if !defined(REV3)
|
||||
else if (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_SET)
|
||||
else if (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_RESET)
|
||||
return e_power_trainer;
|
||||
#endif
|
||||
else if (usbPlugged())
|
||||
|
||||
@@ -49,7 +49,7 @@ void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev)
|
||||
RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_GPIOA , ENABLE);
|
||||
|
||||
/* Configure SOF ID DM DP Pins */
|
||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 |
|
||||
GPIO_InitStructure.GPIO_Pin = // GPIO_Pin_8 |
|
||||
GPIO_Pin_11 |
|
||||
GPIO_Pin_12;
|
||||
|
||||
@@ -59,7 +59,7 @@ void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev)
|
||||
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
|
||||
GPIO_Init(GPIOA, &GPIO_InitStructure);
|
||||
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource8,GPIO_AF_OTG1_FS) ;
|
||||
//GPIO_PinAFConfig(GPIOA,GPIO_PinSource8,GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource11,GPIO_AF_OTG1_FS) ;
|
||||
GPIO_PinAFConfig(GPIOA,GPIO_PinSource12,GPIO_AF_OTG1_FS) ;
|
||||
|
||||
|
||||
@@ -590,6 +590,6 @@
|
||||
#define TR_CHANNELS_MONITOR "CHANNEL MONITOR"
|
||||
#define TR_INTERNALRF "Internal RF"
|
||||
#define TR_EXTERNALRF "External RF"
|
||||
#define TR_FAILSAFE "Failsafe mode"
|
||||
#define TR_FAILSAFE INDENT"Failsafe mode"
|
||||
#define TR_FAILSAFESET "FAILSAFE SETTINGS"
|
||||
#define TR_COUNTRYCODE "Country Code"
|
||||
|
||||
Reference in New Issue
Block a user