mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-13 15:11:20 +10:00
Seeed Tracker X1 Support (#10834)
* Seeed Tracker X1 Support * silence CPPCheck * fix macro order regression and adapt stm32hal for new radiolib * STM32 is a radiolib upstream fix ( https://github.com/jgromes/RadioLib/issues/1825 ) * fix STM32 regression * Seeed Tracker X1 Support * silence CPPCheck * fix macro order regression and adapt stm32hal for new radiolib * STM32 is a radiolib upstream fix ( https://github.com/jgromes/RadioLib/issues/1825 ) * fix STM32 regression * address copilot OCD * Split behavior only when the two LEDs are on distinct pins. * bring naming in line with the other seeed devices * update env name to fit convention too * guarantee evaluation order * Guard sensor readings against null values, make sensor use less power
This commit is contained in:
@@ -215,9 +215,25 @@ int32_t StatusLEDModule::runOnce()
|
||||
#ifdef PCA_LED_ENABLE
|
||||
io.digitalWrite(PCA_LED_ENABLE, CHARGE_LED_state);
|
||||
#endif
|
||||
|
||||
#ifdef LED_POWER
|
||||
#ifdef LED_POWER_CRITICAL
|
||||
if (LED_POWER != LED_POWER_CRITICAL) {
|
||||
if (power_state == critical) {
|
||||
digitalWrite(LED_POWER, 0);
|
||||
digitalWrite(LED_POWER_CRITICAL, CHARGE_LED_state);
|
||||
} else {
|
||||
digitalWrite(LED_POWER, CHARGE_LED_state);
|
||||
digitalWrite(LED_POWER_CRITICAL, 0);
|
||||
}
|
||||
} else {
|
||||
digitalWrite(LED_POWER, CHARGE_LED_state);
|
||||
}
|
||||
#else
|
||||
digitalWrite(LED_POWER, CHARGE_LED_state);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LED_PAIRING
|
||||
digitalWrite(LED_PAIRING, PAIRING_LED_state);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user