#pragma once #include #include #include #include "AbHal.hpp" #include "DcMotor.hpp" #include "Utils.hpp" using TimeStamp = decltype(millis()); class ServoGrp { public: ServoGrp(int pin) : _pin(pin) {} void attach() { _srv.attach(_pin); } void detach() { _srv.detach(); } void write(int pos) { _pos = pos; _srv.write(_pos); } private: Servo _srv; int _pin; int _pos{}; };