things4u / ESP-1ch-Gateway-v5.0--OLD

Version 5 of Single Channel LoRa Gateway
MIT License
311 stars 162 forks source link

use of struct LoraUp parameter in sensorPacket messageSent #5

Closed maurocordioli closed 6 years ago

maurocordioli commented 6 years ago

when we enable GATEWAYNODE , in sensorPacket /_sensor.ino the function messageSent is called with may be , an outdated parameter list (using message and message length) instead of use of struct LoraUp parameter .... something like this : ( but I don't know yet the use of other members of the struc, I have just tried my first program from my new ESP32 pair ) ` //MC start struct LoraUp LU; memcpy( LU.payLoad, message, mlength*sizeof(uint8_t) ); LU.payLength= mlength ;

int buff_index = buildPacket(tmst, buff_up,LU,  true);

// old call int buff_index = buildPacket(tmst, buff_up,(uint8_t *) (message), mlength, true); //MC end`

iotlearner0level commented 6 years ago

Thanks maurocordioli for sharing. worked for me!

Great!!

platenspeler commented 6 years ago

Thanks for finding this bug! I have patched the latest 5.2.1 version.