#ifndef COMPLIB_SERVER_IRSENSORS_HPP #define COMPLIB_SERVER_IRSENSORS_HPP #include #include #include "include/Cache.hpp" #include "include/Robot.hpp" class IRSensors { public: static IRSensors &getInstance() { static IRSensors instance; return instance; } IRSensors(IRSensors const &) = delete; void operator=(IRSensors const &) = delete; static void enable(); static void disable(); std::array read(); private: IRSensors() = default; Cache cache{ROBOT_IR_RATE_HZ}; std::array cached_values = {0}; }; #endif //COMPLIB_SERVER_IRSENSORS_HPP