Automatic tests fix

This commit is contained in:
Bertrand Songis
2015-09-05 14:34:34 +02:00
parent ffd49691f5
commit 57e26f4b5e
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -165,6 +165,7 @@ class TelemetryItem
};
extern TelemetryItem telemetryItems[MAX_SENSORS];
extern uint8_t allowNewSensors;
inline bool isTelemetryFieldAvailable(int index)
{
+4
View File
@@ -129,6 +129,8 @@ TEST(FrSky, Vfas_0x39_HiPrecision)
TELEMETRY_RESET();
EXPECT_EQ(telemetryItems[0].value, 0);
allowNewSensors = true;
// normal precision, resolution 0.1V
processHubPacket(VFAS_ID, 1234); // set value of 123.4V
EXPECT_EQ(telemetryItems[0].value, 12340); // stored value has resolution of 0.01V
@@ -148,6 +150,8 @@ TEST(FrSky, HubAltNegative)
TELEMETRY_RESET();
EXPECT_EQ(telemetryItems[0].value, 0);
allowNewSensors = true;
// altimeter auto offset
processHubPacket(BARO_ALT_BP_ID, 0);
processHubPacket(BARO_ALT_AP_ID, 0);