forked from Archive/PX4-Autopilot
adc: allow board to not define BOARD_ADC_HIPOWER_5V_OC or BOARD_ADC_PERIPH_5V_OC
This commit is contained in:
parent
5d8710d539
commit
1112828dcf
|
@ -452,9 +452,17 @@ ADC::update_system_power(hrt_abstime now)
|
|||
|
||||
system_power.servo_valid = BOARD_ADC_SERVO_VALID;
|
||||
|
||||
#ifdef BOARD_ADC_PERIPH_5V_OC
|
||||
// OC pins are active low
|
||||
system_power.periph_5v_oc = BOARD_ADC_PERIPH_5V_OC;
|
||||
#else
|
||||
system_power.periph_5v_oc = 0;
|
||||
#endif
|
||||
#ifdef BOARD_ADC_HIPOWER_5V_OC
|
||||
system_power.hipower_5v_oc = BOARD_ADC_HIPOWER_5V_OC;
|
||||
#else
|
||||
system_power.hipower_5v_oc = 0;
|
||||
#endif
|
||||
|
||||
/* lazily publish */
|
||||
if (_to_system_power != nullptr) {
|
||||
|
|
Loading…
Reference in New Issue