mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-446 - Fix threshold names for FlightBatterySettings
This commit is contained in:
parent
cf1b64966e
commit
0a3b3dd82b
@ -8,7 +8,8 @@
|
||||
* @{
|
||||
*
|
||||
* @file battery.c
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @brief Module to read the battery Voltage and Current periodically and set alarms appropriately.
|
||||
*
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
@ -204,7 +205,7 @@ static void onTimer(__attribute__((unused)) UAVObjEvent *ev)
|
||||
|
||||
// FIXME: should make the battery voltage detection dependent on battery type.
|
||||
/*Not so sure. Some users will want to run their batteries harder than others, so it should be the user's choice. [KDS]*/
|
||||
if (flightBatteryData.Voltage < batterySettings.CellVoltageThresholds.Alarm * flightBatteryData.NbCells) {
|
||||
if (flightBatteryData.Voltage < batterySettings.CellVoltageThresholds.Critical * flightBatteryData.NbCells) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_BATTERY, SYSTEMALARMS_ALARM_CRITICAL);
|
||||
} else if (flightBatteryData.Voltage < batterySettings.CellVoltageThresholds.Warning * flightBatteryData.NbCells) {
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_BATTERY, SYSTEMALARMS_ALARM_WARNING);
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<field name="Type" units="" type="enum" elements="1" options="LiPo,A123,LiCo,LiFeSO4,None" defaultvalue="LiPo"/>
|
||||
<field name="NbCells" units="" type="uint8" elements="1" defaultvalue="0"/>
|
||||
<field name="Capacity" units="mAh" type="uint32" elements="1" defaultvalue="2200"/>
|
||||
<field name="CellVoltageThresholds" units="V" type="float" elementnames="Warning, Alarm" defaultvalue="3.4,3.1"/>
|
||||
<field name="Capacity" units="mAh" type="uint32" elements="1" defaultvalue="0"/>
|
||||
<field name="CellVoltageThresholds" units="V" type="float" elementnames="Warning, Critical" defaultvalue="3.8,3.5"/>
|
||||
<field name="SensorCalibrations" units="" type="float" elementnames="VoltageFactor, CurrentFactor, VoltageZero, CurrentZero" defaultvalue="1.0, 1.0, 0.0, 0.0"/>
|
||||
<field name="ResetConsumedEnergy" units="bool" type="enum" elements="1" options="False,True" defaultvalue="False"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user