mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Make the CAN log tests check for aliveness
This commit is contained in:
parent
5555b38fea
commit
036f9aa4b9
2 changed files with 6 additions and 0 deletions
|
@ -5,4 +5,7 @@
|
||||||
# highest cell
|
# highest cell
|
||||||
(0.002) RX0 7ef [8] 00 00 00 31 40 ee ee ee
|
(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)
|
# this is enough to pass (all the other params have defaults)
|
|
@ -94,8 +94,11 @@ class BaseValuesPresentTest : public CanLogTestFixture {
|
||||||
public:
|
public:
|
||||||
explicit BaseValuesPresentTest(fs::path path) : CanLogTestFixture(path) {}
|
explicit BaseValuesPresentTest(fs::path path) : CanLogTestFixture(path) {}
|
||||||
void TestBody() override {
|
void TestBody() override {
|
||||||
|
datalayer.battery.status.CAN_battery_still_alive = 10;
|
||||||
|
|
||||||
ProcessLog();
|
ProcessLog();
|
||||||
|
|
||||||
|
EXPECT_GT(datalayer.battery.status.CAN_battery_still_alive, 10);
|
||||||
EXPECT_NE(datalayer.battery.status.voltage_dV, 0);
|
EXPECT_NE(datalayer.battery.status.voltage_dV, 0);
|
||||||
// TODO: Current isn't actually a requirement? check power instead?
|
// TODO: Current isn't actually a requirement? check power instead?
|
||||||
//EXPECT_NE(datalayer.battery.status.current_dA, INT16_MIN);
|
//EXPECT_NE(datalayer.battery.status.current_dA, INT16_MIN);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue