From 62e60979083b5492850c412cf559875baf660caa Mon Sep 17 00:00:00 2001 From: Sergi Hernandez <shernand@iri.upc.edu> Date: Mon, 22 Feb 2021 15:17:57 +0100 Subject: [PATCH] Removed the parameter from the emergency_stop() function. --- include/model_car_actuators.h | 2 +- src/model_car_actuators.cpp | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/model_car_actuators.h b/include/model_car_actuators.h index 9849d08..47378ac 100644 --- a/include/model_car_actuators.h +++ b/include/model_car_actuators.h @@ -20,7 +20,7 @@ class CModelCarActuators: public CModelCarDriverBase public: CModelCarActuators(std::string name); void send_command(double speed,double steering); - void emergency_stop(bool active); + void emergency_stop(void); void enable_ultrasounds(void); void disable_ultrasounds(void); ~CModelCarActuators(void); diff --git a/src/model_car_actuators.cpp b/src/model_car_actuators.cpp index 2f74566..27a16eb 100644 --- a/src/model_car_actuators.cpp +++ b/src/model_car_actuators.cpp @@ -43,14 +43,9 @@ void CModelCarActuators::send_command(double speed,double steering) this->send_request(ID_ARD_ACT_STEER_SERVO,1, &cmd); } -void CModelCarActuators::emergency_stop(bool active) +void CModelCarActuators::emergency_stop(void) { - uint8_t cmd; - - if(active) - cmd=1; - else - cmd=0; + uint8_t cmd=1; this->send_request(ID_ARD_ACT_EMERGENCY_STOP,1,&cmd); } -- GitLab