forked from Archive/PX4-Autopilot
Fixed bracketing error
This commit is contained in:
parent
0f0dc5ba06
commit
3e037d40de
|
@ -901,16 +901,19 @@ PX4IO::task_main()
|
||||||
int32_t voltage_scaling_val;
|
int32_t voltage_scaling_val;
|
||||||
param_t voltage_scaling_param;
|
param_t voltage_scaling_param;
|
||||||
|
|
||||||
/* see if bind parameter has been set, and reset it to -1 */
|
/* set battery voltage scaling */
|
||||||
param_get(voltage_scaling_param = param_find("BAT_V_SCALE_IO"), &voltage_scaling_val);
|
param_get(voltage_scaling_param = param_find("BAT_V_SCALE_IO"), &voltage_scaling_val);
|
||||||
|
|
||||||
/* send channel config to IO */
|
/* send scaling voltage to IO */
|
||||||
uint16_t scaling = voltage_scaling_val;
|
uint16_t scaling = voltage_scaling_val;
|
||||||
int pret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_VBATT_SCALE, &scaling, 1);
|
int pret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_VBATT_SCALE, &scaling, 1);
|
||||||
|
|
||||||
if (pret != OK) {
|
if (pret != OK) {
|
||||||
log("voltage scaling upload failed");
|
log("voltage scaling upload failed");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
perf_end(_perf_update);
|
perf_end(_perf_update);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue