Open superjax opened 4 years ago
@superjax Sure! Our lab work is significantly hampered right now due to world events, so it might be a few weeks, but I'll get to as soon as I can.
Finally got to look at this. It does work, but to get it to compile I had to checkout the branch ISSUE-319_rework_unit_tests on the ROSFlight firmware. If I try to compile it on the Master branch of the firmware then I get the following errors:
Building ROSflight boards/airbourne
cd boards/airbourne && make -j4 -l4 DEBUG= SERIAL_DEVICE=/dev/ttyACM0
make[1]: Entering directory '/home/vscl-2/Documents/firmware/boards/airbourne'
VPATH = :../../comms/mavlink:../..:../../src:../../lib/turbomath:airbourne/lib/startup:airbourne/lib/CMSIS/CM4/CoreSupport:airbourne/lib/CMSIS/CM4/DeviceSupport/ST/STM32F4xx:airbourne/lib/STM32F4xx_StdPeriph_Driver/src:airbourne/lib/STM32_USB_Device_Library/Core/src:airbourne/lib/STM32_USB_OTG_Driver/src:airbourne/lib/STM32_USB_Device_Library/Class/cdc/src:airbourne/lib/vcp:airbourne/src:../../boards/airbourne:
STARTUP_DIR = airbourne/lib/startup
%% param.cpp
%% sensors.cpp
%% rosflight.cpp
%% state_manager.cpp
%% estimator.cpp
%% controller.cpp
%% comm_manager.cpp
%% command_manager.cpp
%% rc.cpp
%% mixer.cpp
%% nanoprintf.cpp
%% turbomath.cpp
%% mavlink.cpp
%% airbourne_board.cpp
%% main.cpp
airbourne_board.cpp: In member function 'virtual bool rosflight_firmware::AirbourneBoard::gnss_present()':
airbourne_board.cpp:248:9: error: 'class UBLOX' has no member named 'check_connection_status'
gnss_.check_connection_status();
^~~~~~~~~~~~~~~~~~~~~~~
airbourne_board.cpp:249:16: error: 'class UBLOX' has no member named 'present'
return gnss_.present();
^~~~~~~
airbourne_board.cpp: In member function 'virtual rosflight_firmware::GNSSData rosflight_firmware::AirbourneBoard::gnss_read()':
airbourne_board.cpp:261:10: error: 'GNSSPVT' is not a member of 'UBLOX'
UBLOX::GNSSPVT gnss_pvt = gnss_.read();
^~~~~~~
airbourne_board.cpp:262:10: error: 'GNSSPosECEF' is not a member of 'UBLOX'
UBLOX::GNSSPosECEF pos_ecef = gnss_.read_pos_ecef();
^~~~~~~~~~~
airbourne_board.cpp:263:10: error: 'GNSSVelECEF' is not a member of 'UBLOX'
UBLOX::GNSSVelECEF vel_ecef = gnss_.read_vel_ecef();
^~~~~~~~~~~
airbourne_board.cpp:264:30: error: 'class UBLOX' has no member named 'get_last_pvt_timestamp'
uint64_t timestamp = gnss_.get_last_pvt_timestamp();
^~~~~~~~~~~~~~~~~~~~~~
airbourne_board.cpp:266:23: error: 'gnss_pvt' was not declared in this scope
gnss.time_of_week = gnss_pvt.time_of_week;
^~~~~~~~
airbourne_board.cpp:266:23: note: suggested alternative: 'gnss_'
gnss.time_of_week = gnss_pvt.time_of_week;
^~~~~~~~
gnss_
airbourne_board.cpp:281:28: error: 'pos_ecef' was not declared in this scope
if (gnss.time_of_week == pos_ecef.time_of_week)
^~~~~~~~
airbourne_board.cpp:290:28: error: 'vel_ecef' was not declared in this scope
if (gnss.time_of_week == vel_ecef.time_of_week)
^~~~~~~~
airbourne_board.cpp: In member function 'virtual rosflight_firmware::GNSSFull rosflight_firmware::AirbourneBoard::gnss_full_read()':
airbourne_board.cpp:302:32: error: 'class UBLOX' has no member named 'read_full'; did you mean 'read_cb'?
UBLOX::NAV_PVT_t pvt = gnss_.read_full();
^~~~~~~~~
read_cb
airbourne_board.cpp:305:19: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.year = pvt.time.year;
^~~~
airbourne_board.cpp:306:20: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.month = pvt.time.month;
^~~~
airbourne_board.cpp:307:18: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.day = pvt.time.day;
^~~~
airbourne_board.cpp:308:19: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.hour = pvt.time.hour;
^~~~
airbourne_board.cpp:309:18: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.min = pvt.time.min<
```;
^~~~
airbourne_board.cpp:310:18: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.sec = pvt.time.sec;
^~~~
airbourne_board.cpp:311:20: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.valid = pvt.time.valid;
^~~~
airbourne_board.cpp:312:20: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.t_acc = pvt.time.tAcc;
^~~<~
airbourne_board.cpp:313:19: error: 'struct UBLOX::NAV_PVT_t' has no member named 'time'
full.nano = pvt.time.nano;
^~~~
airbourne_board.cpp:330:36: error: 'class UBLOX' has no member named 'get_last_pvt_timestamp'
full.rosflight_timestamp = gnss_.get_last_pvt_timestamp();
^~~~~~~~~~~~~~~~~~~~~~
Makefile:197: recipe for target '../../boards/airbourne/build/rosflight/airbourne_board.o' failed
make[1]: *** [../../boards/airbourne/build/rosflight/airbourne_board.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/vscl-2/Documents/firmware/boards/airbourne'
Makefile:79: recipe for target 'all' failed
make: *** [all] Error 2
This addresses #51.
I"m unable to test this, since I do not have a Futaba transmitter.
@ccackam would you be able to test this?