NOTE:These are changes that BREAK backwards compatibility.
After this PR is approved, the changes I have made to mcp calls to the modbus API will no longer be compatible with libraries found on Debian 8 versions of the flight computers.
Apologies once again to all reviewers for another big PR. A lot of unit test development and build system improvements have been dammed behind moving to Ubuntu 20.04. There are a total of 48 new individual unit tests, bringing the current total to 76. Thankfully, this PR only touches a few areas of code, so it shouldn't be too cumbersome to review.
Change Summary
Build system updates
CMakeLists.txt cleanup
CMake policy updates to be more compatible with newer CMake
Compiler flag updates to be compatible with newer linker
Debug mode compiles with -g3 to enable printing #define'd symbols in the debugger
NEW CMake option: run unit tests upon building the CMake target under test, ON by default
NEW CMake option: run gcov to get insight on code coverage metrics, OFF by default
CMake option: compile unit tests, now ON by default
GitHub action to build flight software on an Ubuntu 20.04 runner upon PR or push to main branch
Code changes
Update modbus_set_response_timeout() function signature
Tests for actuators.c, and:
Formatting cleanup
Refector DoLock(): separate into two functions, GetLockAction() and DoLockAction() to simplify testing
NOTE: These are changes that BREAK backwards compatibility. After this PR is approved, the changes I have made to
mcp
calls to the modbus API will no longer be compatible with libraries found on Debian 8 versions of the flight computers.Apologies once again to all reviewers for another big PR. A lot of unit test development and build system improvements have been dammed behind moving to Ubuntu 20.04. There are a total of 48 new individual unit tests, bringing the current total to 76. Thankfully, this PR only touches a few areas of code, so it shouldn't be too cumbersome to review.
Change Summary
Build system updates
-g3
to enable printing#define
'd symbols in the debuggergcov
to get insight on code coverage metrics, OFF by defaultmain
branchCode changes
modbus_set_response_timeout()
function signatureactuators.c
, and:DoLock()
: separate into two functions,GetLockAction()
andDoLockAction()
to simplify testingbalance.c
, and:magnetometer.c
formatting cleanup