mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 11:10:53 +00:00
ESP-NOW Transmitter
This commit is contained in:
@@ -151,7 +151,6 @@ void rc_send_data_task()
|
||||
while (true) {
|
||||
if (esp_now_is_peer_exist((uint8_t*)receiver_mac)) {
|
||||
sendData();
|
||||
//sendRawData();
|
||||
}
|
||||
vTaskDelay (1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
@@ -161,7 +160,7 @@ void transmission_init()
|
||||
{
|
||||
esp_err_t espnow_ret = esp_now_init();
|
||||
if (espnow_ret != ESP_OK) {
|
||||
//ESP_LOGE(TAG, "Error initializing ESPNOW: %s", espnow_ret);
|
||||
ESP_LOGE(TAG, "Error initializing ESPNOW: %s", espnow_ret);
|
||||
ESP_LOGE(TAG, "esp_now_init() failed: %s", esp_err_to_name(espnow_ret));
|
||||
return;
|
||||
}
|
||||
|
@@ -10,10 +10,10 @@ typedef struct {
|
||||
int x_axis; // Joystick x-position
|
||||
int y_axis; // Joystick y-position
|
||||
bool nav_bttn; // Joystick push button
|
||||
uint8_t motor1_rpm_pcm; // PWMs for 4 DC motors
|
||||
uint8_t motor2_rpm_pcm;
|
||||
uint8_t motor3_rpm_pcm;
|
||||
uint8_t motor4_rpm_pcm;
|
||||
uint8_t motor1_rpm_pwm; // PWMs for 4 DC motors
|
||||
uint8_t motor2_rpm_pwm;
|
||||
uint8_t motor3_rpm_pwm;
|
||||
uint8_t motor4_rpm_pwm;
|
||||
} __attribute__((packed)) sensors_data_t;
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user