Make the CAN log tests check for aliveness

This commit is contained in:
Jonny 2025-09-07 22:46:11 +01:00
parent 5555b38fea
commit 036f9aa4b9
2 changed files with 6 additions and 0 deletions

View file

@ -5,4 +5,7 @@
# highest cell
(0.002) RX0 7ef [8] 00 00 00 31 40 ee ee ee
# indicate the pack is still alive
(0.003) RX0 244 [8] 00 00 00 00 00 00 00 00
# this is enough to pass (all the other params have defaults)

View file

@ -94,8 +94,11 @@ class BaseValuesPresentTest : public CanLogTestFixture {
public:
explicit BaseValuesPresentTest(fs::path path) : CanLogTestFixture(path) {}
void TestBody() override {
datalayer.battery.status.CAN_battery_still_alive = 10;
ProcessLog();
EXPECT_GT(datalayer.battery.status.CAN_battery_still_alive, 10);
EXPECT_NE(datalayer.battery.status.voltage_dV, 0);
// TODO: Current isn't actually a requirement? check power instead?
//EXPECT_NE(datalayer.battery.status.current_dA, INT16_MIN);