mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-10 22:04:23 +00:00
ESP-IDF Robot Controls
This commit is contained in:
@@ -74,8 +74,12 @@ static void rc_get_raw_data() {
|
||||
m.motor1_rpm_pcm = 0;
|
||||
m.motor2_rpm_pcm = 0;
|
||||
}
|
||||
if (rescale_raw_val(adc_raw[0][0]) >= 4000)
|
||||
if (rescale_raw_val(adc_raw[0][0]) >= 4000) {
|
||||
m.motor1_rpm_pcm = rescale_raw_val(adc_raw[0][0]);
|
||||
}
|
||||
else if (rescale_raw_val(adc_raw[0][0]) < 4000) {
|
||||
m.motor1_rpm_pcm = -rescale_raw_val(adc_raw[0][0]);
|
||||
}
|
||||
|
||||
// Cut-off power if joystick is nearly center
|
||||
/*if (rescale_raw_val(adc_raw[0][0]) < 4000)
|
||||
|
Reference in New Issue
Block a user