/** * @file testMode.h * @author Alexander Klein (alex@kleiax.de) * @brief * @version 0.1 * @date 2022-09-08 * * @copyright Copyright (c) 2022 * */ #ifndef TEST_MODE_H #define TEST_MODE_H #include "moveControl.h" #include "driveModi/driveModi.h" class TestMode : public DriveModi { public: TestMode(MoveControl *MoveControl); ~TestMode(); void loop() override; void setSpeed(int16_t speed); void setRotationSpeed(int16_t speed); bool drive(int16_t cm = 0, int16_t degree = 0); bool leftEngine(int16_t powerPercentage, int16_t seconds); bool rightEngine(int16_t powerPercentage, int16_t seconds); bool bothEngine(int16_t powerPercentage, int16_t seconds); private: MoveControl *moveControl; double speed = 0; double rotationSpeed = 0; bool busy = false; uint8_t delay = 10; uint32_t maneuverTime = 0; uint32_t lastMillis = 0; uint32_t actionStart = 0; }; #endif // TEST_MODE_H