Examples Crashing
CarlosDanielDev opened this issue · comments
When attempting to run the minimal receiver example from the Arduino library for the CC1101 module, I encountered several compilation errors and warnings. These occurred in the ELECHOUSE_CC1101_SRC_DRV.cpp file.
Steps to Reproduce:
- Opened the minimal receiver example in the Arduino IDE.
- Compiled the code for my esp32.
Error Messages:
The specific errors and warnings I encountered are:
ELECHOUSE_CC1101_SRC_DRV.cpp:149:3: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
while(digitalRead(MISO_PIN));
^~~~~
ELECHOUSE_CC1101_SRC_DRV.cpp:150:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
digitalWrite(SS_PIN, HIGH);
^~~~~~~~~~~~
ELECHOUSE_CC1101_SRC_DRV.cpp:533:11: warning: comparison is always false due to limited range of data type [-Wtype-limits]
if (freq0 > 255){freq1+=1;freq0-=256;}
~~~~~~^~~~~
ELECHOUSE_CC1101_SRC_DRV.cpp:983:5: error: unused variable 's2' [-Werror=unused-variable]
int s2 = 0;
^~
ELECHOUSE_CC1101_SRC_DRV.cpp:500:13: error: 'a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
PA_TABLE[0] = a;
~~~~~~~~~~~~^~~
cc1plus: some warnings being treated as errors
I would appreciate any help in understanding and resolving these issues.