moshe-braner / Open-Glider-Network-Groundstation

Open Glider Network Receiver based on TTGO T-Beam ESP32 hardware.
https://ros-it.ch/open-glider-network-base-station/
GNU General Public License v3.0
7 stars 4 forks source link

RF compile issues #6

Closed rocketman768 closed 1 year ago

rocketman768 commented 1 year ago

I copied the libraries/ folder to my arduino libraries, but there are a lot of missing definitions and constants with the "RF" module that prevent compilation. Here is where it starts.

Protocol_Legacy.cpp:57:22: error: 'RF_TIMING_2SLOTS_PPS_SYNC' was not declared in this scope
   .tm_type         = RF_TIMING_2SLOTS_PPS_SYNC,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~
RF.cpp:64:34: error: 'RF_TIMING_INTERVAL' was not declared in this scope
 static uint8_t       RF_timing = RF_TIMING_INTERVAL;   // default but we won't use it
                                  ^~~~~~~~~~~~~~~~~~
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/RF.cpp:64:34: note: suggested alternative: 'TCP_TMR_INTERVAL'
 static uint8_t       RF_timing = RF_TIMING_INTERVAL;   // default but we won't use it
                                  ^~~~~~~~~~~~~~~~~~
                                  TCP_TMR_INTERVAL
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/RF.cpp: In function 'byte RF_setup()':
RF.cpp:174:32: error: 'const rf_proto_desc_t' {aka 'const struct RF_PROTOCOL'} has no member named 'tm_type'; did you mean 'type'?
         RF_timing         = p->tm_type;
                                ^~~~~~~
                                type
RF.cpp:177:32: error: 'const rf_proto_desc_t' {aka 'const struct RF_PROTOCOL'} has no member named 'air_time'
         ts->air_time      = p->air_time;
                                ^~~~~~~~
Protocol_Legacy.cpp:62:1: error: 'const rf_proto_desc_t' {aka 'const RF_PROTOCOL'} has no non-static data member named 'air_time'
 };
 ^
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/Web.cpp: In function 'void handleUpdate(AsyncWebServerRequest*)':
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/Web.cpp:120:18: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     char* html = "<form method='POST' action='/doUpdate' enctype='multipart/form-data'><input type='file' name='update'><input type='submit' value='Update'></form>";
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/Web.cpp: In function 'void Web_setup(ufo_t*)':
Web.cpp:406:27: error: 'RF_BAND_IL' was not declared in this scope
              (ogn_band == RF_BAND_IL ? "selected" : ""), RF_BAND_IL,
                           ^~~~~~~~~~
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/Web.cpp:406:27: note: suggested alternative: 'RF_BAND_IN'
              (ogn_band == RF_BAND_IL ? "selected" : ""), RF_BAND_IL,
                           ^~~~~~~~~~
                           RF_BAND_IN
Web.cpp:407:27: error: 'RF_BAND_KR' was not declared in this scope
              (ogn_band == RF_BAND_KR ? "selected" : ""), RF_BAND_KR,
                           ^~~~~~~~~~
/Users/philip/Documents/code/Open-Glider-Network-Groundstation/ognbase/Web.cpp:407:27: note: suggested alternative: 'RF_BAND_IN'
              (ogn_band == RF_BAND_KR ? "selected" : ""), RF_BAND_KR,
                           ^~~~~~~~~~
                           RF_BAND_IN
moshe-braner commented 1 year ago

The libraries setup is a bit confusing, sorry for that. OGNbase was originally developed based on SoftRF, using mostly the same libraries, but some are older versions. I compile both apps, within the Arduino IDE on Linux, and to get that to work I copied the SoftRF libraries to the Arduino "sketch" folder. The compilation does not actually use the libraries folder within OGNbase that is reflected here on github. The libraries related to RF.cpp are lmic (e.g., "RF_TIMING_2SLOTS_PPS_SYNC") and OGN (e.g., "RF_BAND_KR"). I will try and synchronize the copies of the libraries one of these days.

moshe-braner commented 1 year ago

Today compared all the libraries (arduino/sketch vs. OGNbase repo) and copied newer and modified files to the repo. If still running into errors when compiling, let me know.