Automatic tests fix
This commit is contained in:
@@ -165,6 +165,7 @@ class TelemetryItem
|
||||
};
|
||||
|
||||
extern TelemetryItem telemetryItems[MAX_SENSORS];
|
||||
extern uint8_t allowNewSensors;
|
||||
|
||||
inline bool isTelemetryFieldAvailable(int index)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user