mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-11-05 17:43:03 +00:00
ESP-IDF Robot Controls
This commit is contained in:
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
@@ -1 +1 @@
|
|||||||
aa19f5c0c6679e7255cbb2566374a71add7a8209
|
f95026601a5d80f45552e2229fc8195791405e76
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ static void rc_get_raw_data() {
|
|||||||
|
|
||||||
// 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][0]) < 500 && rescale_raw_val(adc_raw[0][1]) < 500) {
|
if (rescale_raw_val(adc_raw[0][0]) < 500 && rescale_raw_val(adc_raw[0][1]) < 500) {
|
||||||
|
// REVERSE
|
||||||
if (rescale_raw_val(adc_raw[0][1] < -1400))
|
if (rescale_raw_val(adc_raw[0][1] < -1400))
|
||||||
ESP_LOGW("RC", "REVERSE");
|
ESP_LOGW("RC", "REVERSE");
|
||||||
else {
|
else {
|
||||||
@@ -80,12 +81,6 @@ static void rc_get_raw_data() {
|
|||||||
ESP_LOGW("RC", "FORWARD");
|
ESP_LOGW("RC", "FORWARD");
|
||||||
//m.motor2_rpm_pcm = rescale_raw_val(adc_raw[0][1]);
|
//m.motor2_rpm_pcm = rescale_raw_val(adc_raw[0][1]);
|
||||||
}
|
}
|
||||||
// REVERSE
|
|
||||||
else if (rescale_raw_val(adc_raw[0][1]) <= 500 && rescale_raw_val(adc_raw[0][0]) < 500) {
|
|
||||||
m.motor1_rpm_pcm = rescale_raw_val(adc_raw[0][1]);
|
|
||||||
ESP_LOGW("RC", "REVERSE");
|
|
||||||
//m.motor2_rpm_pcm = rescale_raw_val(adc_raw[0][1]);
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
m.motor1_rpm_pcm = 0;
|
m.motor1_rpm_pcm = 0;
|
||||||
m.motor2_rpm_pcm = 0;
|
m.motor2_rpm_pcm = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user