some improvements
This commit is contained in:
parent
bf7226afda
commit
fc926eb2e2
3 changed files with 9 additions and 6 deletions
|
|
@ -129,7 +129,7 @@ void onDataReceive(const esp_now_recv_info_t * esp_now_info, const uint8_t *inco
|
||||||
}
|
}
|
||||||
|
|
||||||
// on 'sent'
|
// on 'sent'
|
||||||
void onDataSent(const uint8_t *mac_addr, esp_now_send_status_t sendStatus) {
|
void onDataSent(const wifi_tx_info_t *mac_addr, esp_now_send_status_t sendStatus) {
|
||||||
char buff[256] = "";
|
char buff[256] = "";
|
||||||
sprintf(buff, "Delivery failed! -> %02X:%02X:%02X:%02X:%02X:%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
|
sprintf(buff, "Delivery failed! -> %02X:%02X:%02X:%02X:%02X:%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
|
||||||
if (sendStatus != 0) Serial.println(buff);
|
if (sendStatus != 0) Serial.println(buff);
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@
|
||||||
|
|
||||||
//============<identities>============
|
//============<identities>============
|
||||||
#define MY_GROUP_ID (80000)
|
#define MY_GROUP_ID (80000)
|
||||||
#define MY_ID (MY_GROUP_ID + 1)
|
#define MY_ID (MY_GROUP_ID + 3)
|
||||||
#define MY_SIGN ("RADIOOOO")
|
#define MY_SIGN ("RADIOOOO")
|
||||||
//============</identities>============
|
//============</identities>============
|
||||||
|
|
||||||
//============<parameters>============
|
//============<parameters>============
|
||||||
#define WIFI_SSID "Mullae 2F"
|
#define WIFI_SSID "TEEPOT"
|
||||||
#define WIFI_PASSWD "sfacsfac1!"
|
#define WIFI_PASSWD "3333388888"
|
||||||
//
|
//
|
||||||
#define WIFI_CHANNEL 1
|
#define WIFI_CHANNEL 1
|
||||||
//============</parameters>===========
|
//============</parameters>===========
|
||||||
|
|
@ -275,7 +275,7 @@ void onDataReceive(const esp_now_recv_info_t * esp_now_info, const uint8_t *inco
|
||||||
}
|
}
|
||||||
|
|
||||||
// on 'sent'
|
// on 'sent'
|
||||||
void onDataSent(const uint8_t *mac_addr, esp_now_send_status_t sendStatus) {
|
void onDataSent(const wifi_tx_info_t *mac_addr, esp_now_send_status_t sendStatus) {
|
||||||
char buff[256] = "";
|
char buff[256] = "";
|
||||||
sprintf(buff, "Delivery failed! -> %02X:%02X:%02X:%02X:%02X:%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
|
sprintf(buff, "Delivery failed! -> %02X:%02X:%02X:%02X:%02X:%02X", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
|
||||||
if (sendStatus != 0) Serial.println(buff);
|
if (sendStatus != 0) Serial.println(buff);
|
||||||
|
|
@ -372,6 +372,9 @@ void setup() {
|
||||||
Serial.println("-");
|
Serial.println("-");
|
||||||
Serial.println("\".-.-.-. :)\"");
|
Serial.println("\".-.-.-. :)\"");
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
|
radio_now = MY_ID - MY_GROUP_ID - 1;
|
||||||
|
radio_player_start_task.restartDelayed(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
default_fqbn: esp32:esp32:esp32:JTAGAdapter=default,PSRAM=enabled,PartitionScheme=huge_app,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none,ZigbeeMode=default
|
default_fqbn: esp32:esp32:esp32dev:UploadSpeed=921600
|
||||||
default_port: /dev/ttyUSB0
|
default_port: /dev/ttyUSB0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue