mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Watt Hours Drawn OSD Element and Post Flight Stat
The Watt hours used element was added per a feature request to give another way of interpreting the battery usage. It was also added as a post flight stat to show consumption similar to the mAh post flight stat. This once again is just giving pilots another option that some may find useful.
This commit is contained in:
parent
8d909fbe99
commit
a2d356dc78
8 changed files with 58 additions and 2 deletions
|
@ -479,6 +479,7 @@ extern "C" {
|
|||
uint16_t getBatteryAverageCellVoltage() { return 420; }
|
||||
int32_t getAmperage() { return 0; }
|
||||
int32_t getMAhDrawn() { return 0; }
|
||||
float getWhDrawn() { return 0.0; }
|
||||
int32_t getEstimatedAltitudeCm() { return 0; }
|
||||
int32_t getEstimatedVario() { return 0; }
|
||||
int32_t blackboxGetLogNumber() { return 0; }
|
||||
|
|
|
@ -100,6 +100,7 @@ extern "C" {
|
|||
uint16_t simulationBatteryVoltage;
|
||||
uint32_t simulationBatteryAmperage;
|
||||
uint32_t simulationMahDrawn;
|
||||
float simulationWhDrawn;
|
||||
int32_t simulationAltitude;
|
||||
int32_t simulationVerticalSpeed;
|
||||
uint16_t simulationCoreTemperature;
|
||||
|
@ -128,6 +129,7 @@ void setDefaultSimulationState()
|
|||
simulationBatteryVoltage = 1680;
|
||||
simulationBatteryAmperage = 0;
|
||||
simulationMahDrawn = 0;
|
||||
simulationWhDrawn = 0;
|
||||
simulationAltitude = 0;
|
||||
simulationVerticalSpeed = 0;
|
||||
simulationCoreTemperature = 0;
|
||||
|
@ -1324,6 +1326,10 @@ extern "C" {
|
|||
return simulationMahDrawn;
|
||||
}
|
||||
|
||||
float getWhDrawn() {
|
||||
return simulationWhDrawn;
|
||||
}
|
||||
|
||||
int32_t getEstimatedAltitudeCm() {
|
||||
return simulationAltitude;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue