Closed cindyli-13 closed 2 years ago
wow. a pr with a well documented description 😮
wow. a pr with a well documented description open_mouth
Hopefully people read it XD
Does std::endl not work?
Otherwise lgtm
Logger doesn't support std::endl at the moment...
Moving forward, the fw repo will follow our custom modules structure. This PR lays the foundation for writing apps that are based on modules.
Our 2021 rover apps did not follow the modules structure. Some porting effort has been made to transition the 2021 apps to the new modules structure but this effort is currently on hold and may not be completed as our current focus is on developing our 2022 apps. Moving forward, we will not be supporting past apps that do not follow the modules structure.
This PR keeps the 2021 apps buildable under the modules structure, but with little to no actual functionality. The original source code for 2021 apps are still kept for reference as we design our 2022 apps - they will eventually be deleted from
master
when the modules transition is complete. The branchrover-apps-2021-archive
archives all 2021 source code.FW Modules Structure
All rover apps (eg. apps that get flashed to our rover boards) will be built using the same
main.cpp
underrover-apps/common/src/main.cpp
.main.cpp
contains the following generic periodic tasks that are run at their respective rates:All modules are C++ classes derived from the
Module
virtual base class underrover-apps/common/include/Module.h
.All rover apps will contain a
AppConfig.h
header underrover-apps/<app_name>/include
that defines thestd::vector<Module*> gModules
global.gModules
is a list of references to all modules that are part of the app. Seerover-apps/pdb_2021/include/AppConfig.h
for an example.Modules that are common to multiple rover apps will be placed under
rover-apps/common
(eg. watchdog, CAN driver). Modules that are specific to a single app are placed under that app's folder:rover-apps/<app_name>
.