mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 22:32:11 +08:00
batterry_status: fix checking default v_div
This commit is contained in:
@@ -105,7 +105,7 @@ AnalogBattery::updateParams()
|
||||
param_get(_analog_param_handles.i_channel, &_analog_params.i_channel);
|
||||
param_get(_analog_param_handles.v_offs_cur, &_analog_params.v_offs_cur);
|
||||
|
||||
if (_analog_params.v_div <= 0.0f) {
|
||||
if (_analog_params.v_div < 0.0f) {
|
||||
/* apply scaling according to defaults if set to default */
|
||||
_analog_params.v_div = BOARD_BATTERY1_V_DIV;
|
||||
param_set_no_notification(_analog_param_handles.v_div, &_analog_params.v_div);
|
||||
|
||||
Reference in New Issue
Block a user