Remove pingpong mode completely

- Remove pingpong method declarations and member variables from motor.h
- Remove pingpong implementation (startPingpong, stopPingpong, updatePingpong, etc.) from motor.cpp
- Remove pingpong UI section, handlers, and routes from webserver.cpp
- Remove stopPingpong call from stall callback in main.cpp
This commit is contained in:
devdesk
2026-02-05 22:01:50 +02:00
parent ca37f1939e
commit c8d990b1cd
4 changed files with 1 additions and 293 deletions

View File

@@ -26,15 +26,6 @@ public:
void setStallCallback(StallCallback callback);
void resetStallDetection();
// Pingpong mode (time-based only)
void startPingpong(int speed, int timeMs, int speedRandomPercent, int timeRandomPercent);
void stopPingpong();
bool isPingpongActive();
int getPingpongSpeed();
int getPingpongTime();
int getPingpongSpeedRandom();
int getPingpongTimeRandom();
private:
int _speed = 0;
int _direction = 0;
@@ -45,17 +36,6 @@ private:
int _adcOffsetRight = 0;
int _adcOffsetLeft = 0;
// Pingpong state
bool _pingpongActive = false;
int _pingpongBaseSpeed = 50;
int _pingpongBaseTime = 2000;
int _pingpongSpeedRandomPercent = 0;
int _pingpongTimeRandomPercent = 0;
int _pingpongCurrentSpeed = 50;
int _pingpongCurrentTime = 2000;
unsigned long _pingpongLastSwitch = 0;
int _pingpongDirection = 1;
// Stall detection state
bool _stalled = false;
int _stallConfirmCount = 0;
@@ -65,8 +45,6 @@ private:
void applyMotorState();
float readCurrentSense(int pin);
void calibrateCurrentOffset();
void updatePingpong();
int applyRandomness(int baseValue, int randomPercent);
void checkStall();
};