mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-11-23 13:59:40 +00:00
ESP-IDF Robot Controls
This commit is contained in:
@@ -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 L/R", "Position: %d", rescale_raw_val(adc_raw[0][0]));
|
||||||
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][0]) < 500) {
|
if (rescale_raw_val(adc_raw[0][1]) < -500 && rescale_raw_val(adc_raw[0][0]) < 500) {
|
||||||
ESP_LOGW("RC", "REVERSE");
|
ESP_LOGW("RC", "REVERSE");
|
||||||
}
|
}
|
||||||
@@ -79,6 +79,7 @@ static void rc_get_raw_data() {
|
|||||||
m.motor2_rpm_pcm = 0;
|
m.motor2_rpm_pcm = 0;
|
||||||
ESP_LOGW("RC", "STAD STILL");
|
ESP_LOGW("RC", "STAD STILL");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// LEFT or RIGHT
|
// LEFT or RIGHT
|
||||||
// RIGHT
|
// RIGHT
|
||||||
/*if (rescale_raw_val(adc_raw[0][0]) >= 4000) {
|
/*if (rescale_raw_val(adc_raw[0][0]) >= 4000) {
|
||||||
|
|||||||
Reference in New Issue
Block a user