From eb764d88ce7331a5fcd5be69e7595b25031cf8a6 Mon Sep 17 00:00:00 2001 From: Alexander Bobkov Date: Tue, 31 Dec 2024 03:40:20 -0500 Subject: [PATCH] ESP-IDF Robot Controls --- ESP-IDF_Robot/main/rc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ESP-IDF_Robot/main/rc.h b/ESP-IDF_Robot/main/rc.h index 7e424c2a0..9edd982ef 100644 --- a/ESP-IDF_Robot/main/rc.h +++ b/ESP-IDF_Robot/main/rc.h @@ -68,7 +68,8 @@ static void rc_get_raw_data() { int y = rescale_raw_val(adc_raw[0][1]); if ((x > 0 && x < 500) && (y > 500)) { ESP_LOGW("RC", "FORWARD"); - m.motor1_rpm_pcm = rescale_raw_val(adc_raw(y)); + m.motor1_rpm_pcm = rescale_raw_val(y); + m.motor2_rpm_pcm = 0; } else if ((x > 0 && x < 500) && (y < -200)) ESP_LOGW("RC", "REVERSE");