@@ -159,12 +159,12 @@ void identifyBoard()
159159 else if (idWithAdc (idValue, 8.2 , 3.3 , 8.5 ))
160160 productVariant = RTK_TORCH_X2;
161161
162- #ifndef FLEX_OVERRIDE
162+ #ifdef FLEX_OVERRIDE
163163 systemPrintln (" <<<<<<<<<< !!!!!!!!!! FLEX OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
164164 productVariant = RTK_FLEX; // TODO remove once v1.1 Flex has ID resistors
165165#endif
166166
167- #ifndef TORCH_X2_OVERRIDE
167+ #ifdef TORCH_X2_OVERRIDE
168168 systemPrintln (" <<<<<<<<<< !!!!!!!!!! TORCH X2 OVERRIDE !!!!!!!!!! >>>>>>>>>>" );
169169 productVariant = RTK_TORCH_X2; // TODO remove once v1.1 Torch X2 has ID resistors
170170#endif
@@ -824,7 +824,8 @@ void beginBoard()
824824 pin_microSD_CS = 22 ;
825825 pin_microSD_CardDetect = 39 ;
826826
827- pin_gpioExpanderInterrupt = 2 ; // TODO remove on v1.1 hardware. Not used since all GPIO expanded pins are outputs
827+ pin_gpioExpanderInterrupt =
828+ 2 ; // TODO remove on v1.1 hardware. Not used since all GPIO expanded pins are outputs
828829
829830 DMW_if systemPrintf (" pin_bluetoothStatusLED: %d\r\n " , pin_bluetoothStatusLED);
830831 pinMode (pin_bluetoothStatusLED, OUTPUT);
@@ -882,7 +883,7 @@ void beginBoard()
882883 pin_I2C0_SDA = 15 ;
883884 pin_I2C0_SCL = 4 ;
884885
885- pin_GnssUart_RX = 14 ; // Torch X2 uses UART2 of ESP32 to communicate with LG290P
886+ pin_GnssUart_RX = 14 ; // Torch X2 uses UART2 of ESP32 to communicate with LG290P
886887 pin_GnssUart_TX = 17 ;
887888 pin_GNSS_DR_Reset = 22 ; // Push low to reset GNSS/DR.
888889
@@ -898,7 +899,7 @@ void beginBoard()
898899 pin_beeper = 33 ;
899900
900901 pin_powerButton = 34 ;
901- pin_powerSenseAndControl = 18 ; // PWRKILL
902+ // pin_powerSenseAndControl = 18; // PWRKILL
902903
903904 pin_loraRadio_power = 19 ; // LoRa_EN
904905 // pin_loraRadio_boot = 23; // LoRa_BOOT0
@@ -1205,11 +1206,11 @@ void beginGnssUart()
12051206
12061207 xTaskCreatePinnedToCore (
12071208 pinGnssUartTask,
1208- " GnssUartStart" , // Just for humans
1209- 2000 , // Stack Size
1210- nullptr , // Task input parameter
1211- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1212- &taskHandle, // Task handle
1209+ " GnssUartStart" , // Just for humans
1210+ 2000 , // Stack Size
1211+ nullptr , // Task input parameter
1212+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1213+ &taskHandle, // Task handle
12131214 settings.gnssUartInterruptsCore ); // Core where task should run, 0=core, 1=Arduino
12141215 }
12151216
@@ -1667,10 +1668,10 @@ void beginIdleTasks()
16671668 if (idleTaskHandle[index] == nullptr )
16681669 xTaskCreatePinnedToCore (
16691670 idleTask,
1670- taskName, // Just for humans
1671- 2000 , // Stack Size
1672- nullptr , // Task input parameter
1673- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1671+ taskName, // Just for humans
1672+ 2000 , // Stack Size
1673+ nullptr , // Task input parameter
1674+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
16741675 &idleTaskHandle[index], // Task handle
16751676 index); // Core where task should run, 0=core, 1=Arduino
16761677 }
@@ -1726,11 +1727,11 @@ void beginI2C()
17261727 {
17271728 xTaskCreatePinnedToCore (
17281729 pinI2CTask,
1729- " I2CStart" , // Just for humans
1730- 2000 , // Stack Size
1731- nullptr , // Task input parameter
1732- 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1733- &taskHandle, // Task handle
1730+ " I2CStart" , // Just for humans
1731+ 2000 , // Stack Size
1732+ nullptr , // Task input parameter
1733+ 0 , // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
1734+ &taskHandle, // Task handle
17341735 settings.i2cInterruptsCore ); // Core where task should run, 0=core, 1=Arduino
17351736
17361737 // Wait for task to start running
@@ -1814,99 +1815,83 @@ bool i2cBusInitialization(TwoWire *i2cBus, int sda, int scl, int clockKHz)
18141815
18151816 switch (addr)
18161817 {
1817- default :
1818- {
1818+ default : {
18191819 systemPrintf (" 0x%02X\r\n " , addr);
18201820 break ;
18211821 }
18221822
1823- case 0x08 :
1824- {
1823+ case 0x08 : {
18251824 systemPrintf (" 0x%02X - HUSB238 Power Delivery Sink Controller\r\n " , addr);
18261825 break ;
18271826 }
18281827
1829- case 0x0B :
1830- {
1828+ case 0x0B : {
18311829 systemPrintf (" 0x%02X - BQ40Z50 Battery Pack Manager / Fuel gauge\r\n " , addr);
18321830 break ;
18331831 }
18341832
1835- case 0x10 :
1836- {
1833+ case 0x10 : {
18371834 systemPrintf (" 0x%02X - MFI343S00177 Authentication Coprocessor\r\n " , addr);
18381835 i2cAuthCoPro = i2cBus; // Record the bus
18391836 break ;
18401837 }
18411838
1842- case 0x18 :
1843- {
1839+ case 0x18 : {
18441840 systemPrintf (" 0x%02X - PCA9557 GPIO Expander with Reset\r\n " , addr);
18451841 break ;
18461842 }
18471843
1848- case 0x19 :
1849- {
1844+ case 0x19 : {
18501845 systemPrintf (" 0x%02X - LIS2DH12 Accelerometer\r\n " , addr);
18511846 break ;
18521847 }
18531848
1854- case 0x20 :
1855- {
1849+ case 0x20 : {
18561850 systemPrintf (" 0x%02X - PCA9554 GPIO Expander with Interrupt (Postcard)\r\n " , addr);
18571851 break ;
18581852 }
18591853
1860- case 0x21 :
1861- {
1854+ case 0x21 : {
18621855 systemPrintf (" 0x%02X - PCA9554 GPIO Expander with Interrupt (Flex)\r\n " , addr);
18631856 break ;
18641857 }
18651858
1866- case 0x2C :
1867- {
1859+ case 0x2C : {
18681860 systemPrintf (" 0x%02X - USB251xB USB Hub\r\n " , addr);
18691861 break ;
18701862 }
18711863
1872- case 0x36 :
1873- {
1864+ case 0x36 : {
18741865 systemPrintf (" 0x%02X - MAX17048 Fuel Gauge\r\n " , addr);
18751866 break ;
18761867 }
18771868
1878- case 0x3C :
1879- {
1869+ case 0x3C : {
18801870 systemPrintf (" 0x%02X - SSD1306 OLED Driver (Flex)\r\n " , addr);
18811871 break ;
18821872 }
18831873
1884- case 0x3D :
1885- {
1874+ case 0x3D : {
18861875 systemPrintf (" 0x%02X - SSD1306 OLED Driver (Postcard/EVK/mosaic)\r\n " , addr);
18871876 break ;
18881877 }
18891878
1890- case 0x42 :
1891- {
1879+ case 0x42 : {
18921880 systemPrintf (" 0x%02X - u-blox GNSS Receiver\r\n " , addr);
18931881 break ;
18941882 }
18951883
1896- case 0x43 :
1897- {
1884+ case 0x43 : {
18981885 systemPrintf (" 0x%02X - u-blox NEO-D9S Correction Data Receiver\r\n " , addr);
18991886 break ;
19001887 }
19011888
1902- case 0x5C :
1903- {
1889+ case 0x5C : {
19041890 systemPrintf (" 0x%02X - MP27692A Power Management / Charger\r\n " , addr);
19051891 break ;
19061892 }
19071893
1908- case 0x60 :
1909- {
1894+ case 0x60 : {
19101895 systemPrintf (" 0x%02X - ATECC608A Cryptographic Coprocessor\r\n " , addr);
19111896 break ;
19121897 }
0 commit comments