PWM rescaling

This commit is contained in:
2025-06-26 03:09:36 -04:00
parent 063f01ccfd
commit dbc7442e72

View File

@@ -131,7 +131,7 @@ static void update_pwm (int rc_x, int rc_y) {
m.motor4_rpm_pcm = 0; m.motor4_rpm_pcm = 0;
}*/ }*/
// FORWARD AND REVERSE // FORWARD AND REVERSE
if ((x > 670) && (y > 1000 && y < 1100)) { if ((x > 670) && (y > 1000 && y < 1300)) {
//if ((x > 0) && (y > 0 && y < 500)) { //if ((x > 0) && (y > 0 && y < 500)) {
//ESP_LOGW("ESP-NOW", "REVERSE"); //ESP_LOGW("ESP-NOW", "REVERSE");
// Both sides rotate in forward direction. // Both sides rotate in forward direction.
@@ -140,7 +140,7 @@ static void update_pwm (int rc_x, int rc_y) {
m.motor3_rpm_pcm = 0; m.motor3_rpm_pcm = 0;
m.motor4_rpm_pcm = 0; m.motor4_rpm_pcm = 0;
} }
else if ((x < 0) && (y > 1000 && y < 1100)) { else if ((x < 0) && (y > 1000 && y < 1300)) {
//else if ((x < -300) && (y > 0 && y < 500)) { //else if ((x < -300) && (y > 0 && y < 500)) {
//else if ((x > 0 && x < 500) && (y < -200)) { //else if ((x > 0 && x < 500) && (y < -200)) {
//ESP_LOGW("ESP-NOW", "FORWARD"); //ESP_LOGW("ESP-NOW", "FORWARD");