G4lile0 / tinyGS

📡 Open Ground Station Network 🛰
GNU General Public License v3.0
924 stars 177 forks source link

Unsigned RadioLib status codes #63

Closed jgromes closed 3 years ago

jgromes commented 3 years ago

Hey guys,

I noticed RadioLib status codes are logged as unsigned numbers, e.g.:

https://github.com/G4lile0/tinyGS/blob/2128f1410cfd229b9b5478a122446e393b41a0a2/tinyGS/src/Radio/Radio.cpp#L185

RadioLib status codes are signed 16-bit integers, so for example, printing ERR_INVALID_OUTPUT_POWER which is defined as -13 will show 4294967283, making it a bit uncomfortable to debug config issues.

4m1g0 commented 3 years ago

Hello,

I am aware of this, the problem was that the ack we used for MQTT commands initially expected a uint16_t so I quickly set all the status codes as unsigned without thinking too much, and now it's all a little messed up. I will fix and clean this up when we finish the super urgent stuff.

Thanks!