mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-13 16:10:12 +00:00
ESP-IDF Robot Controls
This commit is contained in:
@@ -65,8 +65,8 @@ static void rc_get_raw_data() {
|
|||||||
ESP_LOGI("Joystick F", "Position: %d", rescale_raw_val(adc_raw[0][1]));
|
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][1]) < 500) {
|
if (rescale_raw_val(adc_raw[0][1]) < -500 && rescale_raw_val(adc_raw[0][0]) < 500) {
|
||||||
if (rescale_raw_val(adc_raw[0][1]) > 0)
|
if (rescale_raw_val(adc_raw[0][0]) > 0)
|
||||||
ESP_LOGW("RC", "REVERSE");
|
ESP_LOGW("RC", "REVERSE");
|
||||||
}
|
}
|
||||||
// FORWARD
|
// FORWARD
|
||||||
|
Reference in New Issue
Block a user