simulator base

adds stop
This commit is contained in:
2024-08-19 09:48:21 +02:00
parent 61ba25ea98
commit b2dacb6868
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -29,6 +29,11 @@ UI_item* SimulatorBase::get_UI_item(std::string id) const {
} }
void SimulatorBase::run() { void SimulatorBase::run() {
// Run the simulator // Start the timer
p_timer.setInterval(std::chrono::milliseconds(100)); p_timer.setInterval(std::chrono::milliseconds(100));
}
void SimulatorBase::stop() {
// Stop the simulator
p_timer.stop();
} }
+1
View File
@@ -14,6 +14,7 @@ class SimulatorBase {
UI_item* get_UI_item(std::string id) const; UI_item* get_UI_item(std::string id) const;
void run(); void run();
void stop();
virtual void timer() {}; virtual void timer() {};
protected: protected: