// src/timing/speed_controller.h #pragma once #include "mbed.h" class SpeedController { private: int ground_speed = 1; public: SpeedController() = default; void set_ground_speed(int spd); int get_ground_speed() const { return ground_speed; } // Calculates how many frames to advance for current tick. int frame_advance_for(int object_speed, int tick_counter) const; };