mirror of
https://github.com/timmbogner/Farm-Data-Relay-System
synced 2024-11-10 07:10:42 +00:00
Merge pull request #27 from Devilbinder/dev
Fixed junk memory in peerInfo. Add debug macro.
This commit is contained in:
commit
3856518c8b
@ -109,6 +109,7 @@ void ESP_FDRSGateWay::init(uint8_t inturnal_mac[5]){
|
||||
|
||||
#if defined(ESP32)
|
||||
esp_now_peer_info_t peerInfo;
|
||||
memset(&peerInfo, 0, sizeof(peerInfo));
|
||||
peerInfo.channel = 0;
|
||||
peerInfo.encrypt = false;
|
||||
// Register first peer
|
||||
@ -199,6 +200,7 @@ void ESP_FDRSGateWay::list_peer(uint8_t peer_mac[6]){
|
||||
|
||||
#if defined(ESP32)
|
||||
esp_now_peer_info_t peerInfo;
|
||||
memset(&peerInfo, 0, sizeof(peerInfo));
|
||||
peerInfo.channel = 0;
|
||||
peerInfo.encrypt = false;
|
||||
memcpy(peerInfo.peer_addr, peer_mac, 6);
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
#define USE_LORA
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DBG(a) (Serial.println(a))
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user