1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Fixed tests

This commit is contained in:
fgiudice98 2018-12-27 15:03:36 +01:00
parent 979e56e14d
commit f084840f06
3 changed files with 12 additions and 0 deletions

View file

@ -260,6 +260,9 @@ extern "C" {
uint16_t getBatteryVoltage(void) { uint16_t getBatteryVoltage(void) {
return testBatteryVoltage; return testBatteryVoltage;
} }
uint16_t getLegacyBatteryVoltage(void) {
return (testBatteryVoltage + 5) / 10;
}
uint16_t getBatteryAverageCellVoltage(void) { uint16_t getBatteryAverageCellVoltage(void) {
return 0; return 0;
} }

View file

@ -323,6 +323,10 @@ uint16_t getBatteryVoltage(void) {
return testBatteryVoltage; return testBatteryVoltage;
} }
uint16_t getLegacyBatteryVoltage(void) {
return (testBatteryVoltage + 5) / 10;
}
uint16_t getBatteryAverageCellVoltage(void) { uint16_t getBatteryAverageCellVoltage(void) {
return 0; return 0;
} }

View file

@ -285,6 +285,11 @@ uint16_t getBatteryVoltage(void)
return testBatteryVoltage; return testBatteryVoltage;
} }
uint16_t getLegacyBatteryVoltage(void)
{
return (testBatteryVoltage + 5) / 10;
}
int32_t getAmperage(void) { int32_t getAmperage(void) {
return testAmperage; return testAmperage;
} }