diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-09-06 12:40:11 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-09-06 12:40:11 +1000 |
| commit | 172d31ec6d69d7372d46e1ba712a2a2187e19d2a (patch) | |
| tree | 41f08579a311a53db975f0123c3dfafbb12e95b5 /src/tangara/test/battery/test_battery.cpp | |
| parent | 0426dfd4f21861297850905bf27158659f9d959a (diff) | |
| download | tangara-fw-172d31ec6d69d7372d46e1ba712a2a2187e19d2a.tar.gz | |
Ignore comments within playlist files
Includes a general cleanup+restructure of playlist.cpp, and fixing the
tests and benchmarks
Diffstat (limited to 'src/tangara/test/battery/test_battery.cpp')
| -rw-r--r-- | src/tangara/test/battery/test_battery.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tangara/test/battery/test_battery.cpp b/src/tangara/test/battery/test_battery.cpp index 7b55bd59..cf6b19b0 100644 --- a/src/tangara/test/battery/test_battery.cpp +++ b/src/tangara/test/battery/test_battery.cpp @@ -26,9 +26,10 @@ class FakeAdc : public drivers::AdcBattery { TEST_CASE("battery charge state", "[unit]") { I2CFixture i2c; + std::unique_ptr<drivers::NvsStorage> nvs{drivers::NvsStorage::OpenSync()}; // FIXME: mock the SAMD21 as well. - std::unique_ptr<drivers::Samd> samd{drivers::Samd::Create()}; + auto samd = std::make_unique<drivers::Samd>(*nvs); FakeAdc* adc = new FakeAdc{}; // Freed by Battery. Battery battery{*samd, std::unique_ptr<drivers::AdcBattery>{adc}}; |
