@@ -163,11 +163,6 @@ void identifyBoard()
163163 systemPrintln (" <<<<<<<<<< !!!!!!!!!! FLEX OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
164164 productVariant = RTK_FLEX; // TODO remove once v1.1 Flex has ID resistors
165165#endif
166-
167- #ifdef TORCH_X2_OVERRIDE
168- systemPrintln (" <<<<<<<<<< !!!!!!!!!! TORCH X2 OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
169- productVariant = RTK_TORCH_X2; // TODO remove once v1.1 Torch X2 has ID resistors
170- #endif
171166 }
172167
173168 if (ENABLE_DEVELOPER)
@@ -791,7 +786,8 @@ void beginBoard()
791786 present.gnss_to_uart = true ;
792787
793788 present.gpioExpanderSwitches = true ;
794- // present.microSd = true; // TODO remove comment out - v1.0 hardware does not have pullup on #CD so card detection does not work
789+ // present.microSd = true; // TODO remove comment out - v1.0 hardware does not have pullup on #CD so card
790+ // detection does not work
795791 present.microSdCardDetectLow = true ;
796792
797793 present.display_i2c0 = true ;
@@ -872,7 +868,7 @@ void beginBoard()
872868 present.antennaPhaseCenter_mm = 116.5 ; // Default to Torch helical APC, average of L1/L2
873869 present.fuelgauge_bq40z50 = true ;
874870 present.charger_mp2762a = true ;
875- present.button_powerHigh = true ; // Button is pressed when high
871+ present.button_powerLow = true ; // Button is pressed when low
876872 present.beeper = true ;
877873 present.gnss_to_uart = true ;
878874 present.needsExternalPpl = true ; // Uses the PointPerfect Library
@@ -1540,9 +1536,15 @@ void beginButtons()
15401536 else
15411537 {
15421538 // Use the Button library
1543- // Facet main/power button
1544- if (present.button_powerLow == true && pin_powerSenseAndControl != PIN_UNDEFINED)
1545- userBtn = new Button (pin_powerSenseAndControl);
1539+ if (present.button_powerLow == true )
1540+ {
1541+ // Torch X2 has both a powerButton and powerSenseAndControl (PWRKILL). Assign button task to powerButton.
1542+ if (pin_powerButton != PIN_UNDEFINED)
1543+ userBtn = new Button (pin_powerButton);
1544+ // Facet main/power button
1545+ else if (pin_powerSenseAndControl != PIN_UNDEFINED)
1546+ userBtn = new Button (pin_powerSenseAndControl);
1547+ }
15461548
15471549 // Torch main/power button
15481550 if (present.button_powerHigh == true && pin_powerButton != PIN_UNDEFINED)
0 commit comments