ESP-IDF Robot Controls

This commit is contained in:
2024-12-31 03:19:29 -05:00
parent 7984ce03e7
commit 151d98be9a

View File

@@ -64,7 +64,7 @@ static void rc_get_raw_data() {
ESP_LOGI("Joystick L/R", "Position: %d", rescale_raw_val(adc_raw[0][0]));
ESP_LOGI("Joystick F", "Position: %d", rescale_raw_val(adc_raw[0][1]));
// Cut-off readings that have values less than 700, i.e. when joystick is centered
/*// Cut-off readings that have values less than 700, i.e. when joystick is centered
if (rescale_raw_val(adc_raw[0][1]) < -500 && rescale_raw_val(adc_raw[0][0]) < 500) {
ESP_LOGW("RC", "REVERSE");
}
@@ -79,6 +79,7 @@ static void rc_get_raw_data() {
m.motor2_rpm_pcm = 0;
ESP_LOGW("RC", "STAD STILL");
}
*/
// LEFT or RIGHT
// RIGHT
/*if (rescale_raw_val(adc_raw[0][0]) >= 4000) {