diff --git a/source/application/shell_commands.c b/source/application/shell_commands.c index 9e671e8..ed5d2d8 100644 --- a/source/application/shell_commands.c +++ b/source/application/shell_commands.c @@ -78,8 +78,10 @@ int shell_commands_init(void) static void *drive_turn_right_cb(const char *param) { int speed = drive_ctrl_get_speed_value(); - drive_ctrl_set_speed_left(speed); - drive_ctrl_set_speed_right(0); + drive_ctrl_set_speed_left(abs(speed)); + if(speed > 0) + speed *= -1; + drive_ctrl_set_speed_right(speed); return NULL; } @@ -87,8 +89,10 @@ static void *drive_turn_right_cb(const char *param) static void *drive_turn_left_cb(const char *param) { int speed = drive_ctrl_get_speed_value(); - drive_ctrl_set_speed_left(0); - drive_ctrl_set_speed_right(speed); + drive_ctrl_set_speed_right(abs(speed)); + if(speed > 0) + speed *= -1; + drive_ctrl_set_speed_left(speed); return NULL; }