diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-05-14 15:21:21 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-05-14 15:21:21 +1000 |
| commit | 00d6c2eca20571f1a53400f4f465c8dd7af557db (patch) | |
| tree | 3c509cdec622f256fbb9be58cf2a5b35da743da1 /src/tangara/system_fsm/booting.cpp | |
| parent | defe838ab01da8502de13d3c75e008624d1e675a (diff) | |
| download | tangara-fw-00d6c2eca20571f1a53400f4f465c8dd7af557db.tar.gz | |
save lra calibration data to nvs
Diffstat (limited to 'src/tangara/system_fsm/booting.cpp')
| -rw-r--r-- | src/tangara/system_fsm/booting.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/tangara/system_fsm/booting.cpp b/src/tangara/system_fsm/booting.cpp index 09d9de80..22a0fcac 100644 --- a/src/tangara/system_fsm/booting.cpp +++ b/src/tangara/system_fsm/booting.cpp @@ -4,12 +4,9 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "collation.hpp" -#include "drivers/haptics.hpp" -#include "drivers/spiffs.hpp" #include "system_fsm/system_fsm.hpp" -#include <stdint.h> +#include <cstdint> #include <memory> #include "assert.h" @@ -23,16 +20,19 @@ #include "audio/audio_fsm.hpp" #include "audio/track_queue.hpp" #include "battery/battery.hpp" +#include "collation.hpp" #include "database/tag_parser.hpp" #include "drivers/adc.hpp" #include "drivers/bluetooth.hpp" #include "drivers/bluetooth_types.hpp" #include "drivers/display_init.hpp" #include "drivers/gpios.hpp" +#include "drivers/haptics.hpp" #include "drivers/i2c.hpp" #include "drivers/nvs.hpp" #include "drivers/samd.hpp" #include "drivers/spi.hpp" +#include "drivers/spiffs.hpp" #include "drivers/touchwheel.hpp" #include "events/event_queue.hpp" #include "system_fsm/service_locator.hpp" @@ -89,11 +89,7 @@ auto Booting::entry() -> void { sServices->samd(std::unique_ptr<drivers::Samd>(drivers::Samd::Create())); sServices->touchwheel( std::unique_ptr<drivers::TouchWheel>{drivers::TouchWheel::Create()}); - sServices->haptics(std::make_unique<drivers::Haptics>( - sServices->nvs().HapticMotorIsErm() - ? std::variant<drivers::ErmMotor, drivers::LraMotor>( - drivers::ErmMotor()) - : drivers::LraMotor())); + sServices->haptics(std::make_unique<drivers::Haptics>(sServices->nvs())); auto adc = drivers::AdcBattery::Create(); sServices->battery(std::make_unique<battery::Battery>( |
