mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-12 18:07:02 +00:00
RC
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 @@
|
|||||||
a0c216bbb3b6a046e15e8ec52376b79557f1bbb7
|
084a76ccee30d8467861867aaf16738507272033
|
||||||
|
@@ -815,8 +815,8 @@ void onDataReceived (const uint8_t *mac_addr, const uint8_t *data, uint8_t data_
|
|||||||
ESP_LOGI(TAG, "PCM 2: 0x%04X", buf.motor2_rpm_pcm);
|
ESP_LOGI(TAG, "PCM 2: 0x%04X", buf.motor2_rpm_pcm);
|
||||||
ESP_LOGI(TAG, "PCM 3: 0x%04X", buf.motor3_rpm_pcm);
|
ESP_LOGI(TAG, "PCM 3: 0x%04X", buf.motor3_rpm_pcm);
|
||||||
ESP_LOGI(TAG, "PCM 4: 0x%04X", buf.motor4_rpm_pcm);
|
ESP_LOGI(TAG, "PCM 4: 0x%04X", buf.motor4_rpm_pcm);
|
||||||
rc_x = buf.y_axis;
|
rc_x = buf.x_axis;
|
||||||
rc_y = buf.x_axis;
|
rc_y = buf.y_axis;
|
||||||
|
|
||||||
//update_pwm(buf.x_axis, buf.y_axis);
|
//update_pwm(buf.x_axis, buf.y_axis);
|
||||||
update_pwm(rc_x, rc_y);
|
update_pwm(rc_x, rc_y);
|
||||||
|
@@ -120,7 +120,7 @@ static void update_pwm (int x, int y) {
|
|||||||
m.motor4_rpm_pcm = x;
|
m.motor4_rpm_pcm = x;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ESP_LOGW("ESP-NOW", "STAND STILL (%d, %d)", x, y);
|
ESP_LOGW("ESP-NOW", "STAND STILL");
|
||||||
m.motor1_rpm_pcm = 0;
|
m.motor1_rpm_pcm = 0;
|
||||||
m.motor2_rpm_pcm = 0;
|
m.motor2_rpm_pcm = 0;
|
||||||
m.motor3_rpm_pcm = 0;
|
m.motor3_rpm_pcm = 0;
|
||||||
|
Reference in New Issue
Block a user