Merge pull request #1506 from jonny5532/feature/can-log-aliveness-test

Make CAN log base tests check for aliveness
This commit is contained in:
Daniel Öster 2025-09-08 11:36:13 +03:00 committed by GitHub
commit 69b0d23b45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);