File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313#include < user_interaction/guiEngine_factory_interface.hpp>
1414#include < user_interaction/keypad_factory_interface.hpp>
1515#include < user_interaction/statusindicators_factory_interface.hpp>
16+ #include < version.hpp>
1617
1718void setup ()
1819{
1920 serial_port::initialize ();
2021 serial_port::cout << " \x1b [20h" ; // Tell the terminal to use CR/LF for newlines instead of just CR.
21- static constexpr const auto programIdentificationString = __FILE__ " compiled at " __DATE__ " " __TIME__;
22- serial_port::cout << std::endl
23- << " begin program '" << programIdentificationString << std::endl;
22+
23+ constexpr const auto programIdentificationString = []() {
24+ constexpr const auto versionString = getVersionString ();
25+ if constexpr (versionString)
26+ {
27+ return versionString.value ();
28+ }
29+ else
30+ {
31+ return " compiled at " __DATE__ " " __TIME__;
32+ }
33+ }();
34+
35+ serial_port::cout
36+ << std::endl
37+ << " begin program '" << __FILE__ << programIdentificationString << std::endl;
2438 serial_port::setCallbackForLineReception ([](const serial_port::String &commandLine) {
2539 ProtocolHandler::execute (commandLine.c_str ());
2640 });
You can’t perform that action at this time.
0 commit comments