Merge pull request #27 from Devilbinder/dev

Fixed junk memory in peerInfo. Add debug macro.
This commit is contained in:
Timm Bogner 2022-06-29 12:36:08 -05:00 committed by GitHub
commit 3856518c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -25,6 +25,8 @@
#define USE_LORA
#define DEBUG
#ifdef DEBUG
#define DBG(a) (Serial.println(a))
#else