SmartRC-CC1101-Driver-Lib icon indicating copy to clipboard operation
SmartRC-CC1101-Driver-Lib copied to clipboard

Examples Crashing

Open CarlosDanielDev opened this issue 10 months ago • 1 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.

CarlosDanielDev avatar Mar 28 '24 17:03 CarlosDanielDev

Did you check thet you update the lastest lib and did not include any .ccp file in the sketch Esp32C3 work Success compile both new and old: image image

feyhong1112 avatar Apr 08 '24 14:04 feyhong1112