From 26eb580043ad176bdc58d996f30d470e1073ef00 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 2 May 2024 21:52:59 +1000 Subject: move driver includes into a subdir as well --- src/drivers/haptics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/drivers/haptics.cpp') diff --git a/src/drivers/haptics.cpp b/src/drivers/haptics.cpp index f7b18086..55fa9ad8 100644 --- a/src/drivers/haptics.cpp +++ b/src/drivers/haptics.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-only */ -#include "haptics.hpp" +#include "drivers/haptics.hpp" #include #include @@ -21,7 +21,7 @@ #include "hal/gpio_types.h" #include "hal/i2c_types.h" -#include "i2c.hpp" +#include "drivers/i2c.hpp" namespace drivers { @@ -54,7 +54,8 @@ Haptics::Haptics(const std::variant& motor) { // Set library // TODO(robin): try the other libraries and test response. C is marginal, D // too much? - WriteRegister(Register::kWaveformLibrary, static_cast(kDefaultErmLibrary)); + WriteRegister(Register::kWaveformLibrary, + static_cast(kDefaultErmLibrary)); } else if (std::holds_alternative(motor)) { ESP_LOGI(kTag, "Setting up LRA motor..."); @@ -75,7 +76,8 @@ Haptics::Haptics(const std::variant& motor) { ControlMask::kLraOpenLoop); // Set library; only option is the LRA one for, well, LRA motors. - WriteRegister(Register::kWaveformLibrary, static_cast(Library::LRA)); + WriteRegister(Register::kWaveformLibrary, + static_cast(Library::LRA)); } // Set mode (internal trigger, on writing 1 to Go register) @@ -123,7 +125,6 @@ auto Haptics::SetWaveformEffect(Effect effect) -> void { current_effect_ = effect; } - auto Haptics::TourEffects() -> void { TourEffects(Effect::kFirst, Effect::kLast, kDefaultErmLibrary); } @@ -174,7 +175,6 @@ auto Haptics::TourLibraries(Effect from, Effect to) -> void { } } - auto Haptics::PowerDown() -> void { WriteRegister(Register::kMode, static_cast(Mode::kInternalTrigger) | ModeMask::kStandby); -- cgit v1.2.3