markqvist / RNode_Firmware

RNode is an open, free and flexible digital radio interface with many uses
https://unsigned.io/rnode
GNU General Public License v3.0
166 stars 56 forks source link

minor changes #13

Closed karamo closed 2 years ago

karamo commented 2 years ago

warning: comparison is always true due to limited range of data type warning: comparison is always false due to limited range of data type and add parentheses don't name a variable as a reserved word. (is good practice)

markqvist commented 2 years ago

Thanks @karamo. Is there any particular reason for the int for queue_cursor instead of uint16_t? I don't see why it would be better with int, but maybe I am missing it?

markqvist commented 2 years ago

Thanks @karamo. Is there any particular reason for the int for queue_cursor instead of uint16_t? I don't see why it would be better with int, but maybe I am missing it?

Ah, no of course, I see it. That was a mistake I made when I changed the datatypes for ESP32 compat. Interestingly, that mistake might be the source of the crashes we talked about on ESP32.

But it needs to have the type size defined for proper cross-platform compabitility, otherwise we risk the types being different sizes on different platforms, but don't worry about that now. I will merge this, correct the size, and test it on both AVR and ESP32.

Thanks karamo

markqvist commented 2 years ago

Also, I am going to revert the "vbyte" changes, in my opinion this is purely an aesthetic preference, and I don't agree with it ;)

"Byte" is not a reserved word in C++ or C, so it is perfectly fine to use as a variable name.