🌹 Switches to an explicit sense plan act flow

This commit is contained in:
Rune Harlyk
2024-11-14 10:36:44 +01:00
committed by Rune Harlyk
parent e919b2aa41
commit f3d2fec0e9
5 changed files with 62 additions and 111 deletions
@@ -7,7 +7,6 @@
#include <stateful_service.h>
#include <stateful_service_endpoint.h>
#include <MathUtils.h>
#include <timing.h>
#include <settings/servo_settings.h>
#define EVENT_SERVO_CONFIGURATION_SETTINGS "servoPWM"
@@ -73,10 +72,6 @@ class ServoController : public StatefulService<ServoSettings> {
}
}
void loop() {
EXECUTE_EVERY_N_MS(ServoInterval, { updateServoState(); });
}
StatefulHttpEndpoint<ServoSettings> endpoint;
private:
@@ -84,8 +79,6 @@ class ServoController : public StatefulService<ServoSettings> {
FSPersistence<ServoSettings> _persistence;
bool is_active {true};
constexpr static int ServoInterval = 2;
float angles[12] = {0, 90, -145, 0, 90, -145, 0, 90, -145, 0, 90, -145};
float target_angles[12] = {0, 90, -145, 0, 90, -145, 0, 90, -145, 0, 90, -145};
};