From 00d6c2eca20571f1a53400f4f465c8dd7af557db Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 14 May 2024 15:21:21 +1000 Subject: save lra calibration data to nvs --- src/tangara/system_fsm/booting.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/tangara/system_fsm/booting.cpp') 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 +#include #include #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::Create())); sServices->touchwheel( std::unique_ptr{drivers::TouchWheel::Create()}); - sServices->haptics(std::make_unique( - sServices->nvs().HapticMotorIsErm() - ? std::variant( - drivers::ErmMotor()) - : drivers::LraMotor())); + sServices->haptics(std::make_unique(sServices->nvs())); auto adc = drivers::AdcBattery::Create(); sServices->battery(std::make_unique( -- cgit v1.2.3