summaryrefslogtreecommitdiff
path: root/src/drivers/haptics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/haptics.cpp')
-rw-r--r--src/drivers/haptics.cpp12
1 files changed, 6 insertions, 6 deletions
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 <stdint.h>
#include <cstdint>
@@ -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<ErmMotor, LraMotor>& motor) {
// Set library
// TODO(robin): try the other libraries and test response. C is marginal, D
// too much?
- WriteRegister(Register::kWaveformLibrary, static_cast<uint8_t>(kDefaultErmLibrary));
+ WriteRegister(Register::kWaveformLibrary,
+ static_cast<uint8_t>(kDefaultErmLibrary));
} else if (std::holds_alternative<LraMotor>(motor)) {
ESP_LOGI(kTag, "Setting up LRA motor...");
@@ -75,7 +76,8 @@ Haptics::Haptics(const std::variant<ErmMotor, LraMotor>& motor) {
ControlMask::kLraOpenLoop);
// Set library; only option is the LRA one for, well, LRA motors.
- WriteRegister(Register::kWaveformLibrary, static_cast<uint8_t>(Library::LRA));
+ WriteRegister(Register::kWaveformLibrary,
+ static_cast<uint8_t>(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<uint8_t>(Mode::kInternalTrigger) |
ModeMask::kStandby);