utra-robosoccer / soccer-embedded

Collection of embedded programs for an autonomous humanoid soccer robot
http://utrahumanoid.ca
32 stars 8 forks source link

SystemConf.h: make UART handle declarations macros / fix unit tests #173

Closed rfairley closed 5 years ago

rfairley commented 5 years ago

The previous constexpr declarations here caused linkage problems, when building RobotTest configurations. Making these inline allows us to keep using constexpr, where the variable definition must occur at the variable declaration.

rfairley commented 5 years ago

Note: just noticed it only gives a compiler warning on one laptop, but a compiler error on my older laptop where C++17 features are not available.

rfairley commented 5 years ago

We discovered the root cause of the unit tests requiring the huart symbols is actually a bug in how we set up SystemConf.h - this file should be used to configure the app code only and not component code.

rfairley commented 5 years ago

we will make these macros rather than use inline variables

rfairley commented 5 years ago

^ getting another build error for unit tests right now; hold on review for now

rfairley commented 5 years ago

Updated include paths for #171 - now building and ready for review