mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 14:48:28 -04:00
AP_BattMonitor: update disco battery lookup table
This commit is contained in:
parent
dac7f45326
commit
06cccd6d3b
@ -42,11 +42,28 @@ static const float bat_comp_polynomial_coeffs[5] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* battery percent lookup table */
|
/* battery percent lookup table */
|
||||||
#define BATTERY_PERCENT_LUT_SIZE 12
|
|
||||||
static const struct {
|
static const struct {
|
||||||
float voltage;
|
float voltage;
|
||||||
float percent;
|
float percent;
|
||||||
} bat_lut[BATTERY_PERCENT_LUT_SIZE] = {
|
} bat_lut[] = {
|
||||||
|
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
|
||||||
|
{9.5, 0},
|
||||||
|
{11.04, 5},
|
||||||
|
{11.11, 10},
|
||||||
|
{11.21, 15},
|
||||||
|
{11.3, 25},
|
||||||
|
{11.4, 45},
|
||||||
|
{11.6, 55},
|
||||||
|
{11.9, 79},
|
||||||
|
{12.02, 84},
|
||||||
|
{12.11, 88},
|
||||||
|
{12.19, 91},
|
||||||
|
{12.26, 94},
|
||||||
|
{12.35, 96},
|
||||||
|
{12.45, 98},
|
||||||
|
{12.5, 10}
|
||||||
|
#else
|
||||||
|
// bebop
|
||||||
{10.50f, 0.0f},
|
{10.50f, 0.0f},
|
||||||
{10.741699f, 2.6063901f},
|
{10.741699f, 2.6063901f},
|
||||||
{10.835779f, 5.1693798f},
|
{10.835779f, 5.1693798f},
|
||||||
@ -59,7 +76,9 @@ static const struct {
|
|||||||
{11.746556f, 79.496082f},
|
{11.746556f, 79.496082f},
|
||||||
{12.110226f, 94.874021f},
|
{12.110226f, 94.874021f},
|
||||||
{12.3f, 100.0f }
|
{12.3f, 100.0f }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
#define BATTERY_PERCENT_LUT_SIZE ARRAY_SIZE(bat_lut)
|
||||||
|
|
||||||
void AP_BattMonitor_Bebop::init(void)
|
void AP_BattMonitor_Bebop::init(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user