@@ -35,7 +35,7 @@ Controller::Controller(Stream *consoleStream, Stream *commandStationStream, Disp
3535void Controller::begin () {
3636 _displayManager->startDisplays (); // Start displays
3737 _inputManager->startInput (); // Start input
38- LOG (LogLevel::MESSAGE , " EX-Display version %s" , VERSION);
38+ LOG (LogLevel::LOG_MESSAGE , " EX-Display version %s" , VERSION);
3939 _displayManager->displayStartupInfo (VERSION); // Display version info
4040}
4141
@@ -54,7 +54,7 @@ void Controller::update() {
5454 // Configurator
5555 // When the time has passed, turn the pause of and clear each display to enable normal display operation
5656 if (_pauseDisplayUpdates && millis () > _pauseDisplayUpdatesUntil) {
57- LOG (LogLevel::DEBUG , " _pauseDisplayUpdatesUntil time exceeded, resume display updates" );
57+ LOG (LogLevel::LOG_DEBUG , " _pauseDisplayUpdatesUntil time exceeded, resume display updates" );
5858 _pauseDisplayUpdatesUntil = 0 ;
5959 _pauseDisplayUpdates = false ;
6060 _displayManager->clearAllDisplays ();
@@ -79,9 +79,9 @@ void Controller::update() {
7979}
8080
8181void Controller::updateScreen (uint8_t screenId, uint8_t row, const char *text) {
82- LOG (LogLevel::DEBUG , " Controller::updateScreen(%d, %d, %s)" , screenId, row, text);
82+ LOG (LogLevel::LOG_DEBUG , " Controller::updateScreen(%d, %d, %s)" , screenId, row, text);
8383 if (_screenManager == nullptr ) {
84- LOG (LogLevel::DEBUG , " Controller::_screenManager == nullptr" );
84+ LOG (LogLevel::LOG_DEBUG , " Controller::_screenManager == nullptr" );
8585 return ;
8686 }
8787 Screen *screen = _screenManager->updateScreen (screenId);
@@ -91,7 +91,7 @@ void Controller::updateScreen(uint8_t screenId, uint8_t row, const char *text) {
9191}
9292
9393void Controller::onInputAction (InputAction action) {
94- LOG (LogLevel::DEBUG , " Controller::onInputAction(%d)" , action);
94+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(%d)" , action);
9595 // No inputs are valid if there are no displays or screens, so just bail out
9696 if (_displayManager == nullptr || _screenManager == nullptr || _displayManager->getFirstDisplay () == nullptr ||
9797 _screenManager->getFirstScreen () == nullptr ) {
@@ -101,33 +101,33 @@ void Controller::onInputAction(InputAction action) {
101101 switch (action) {
102102 // Left press selects the previous screen for display
103103 case InputAction::PRESS_LEFT: {
104- LOG (LogLevel::DEBUG , " Controller::onInputAction(InputAction::PRESS_LEFT)" );
104+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(InputAction::PRESS_LEFT)" );
105105 _selectPreviousScreen (display);
106106 break ;
107107 }
108108 // Right press selects the next screen for display
109109 case InputAction::PRESS_RIGHT: {
110- LOG (LogLevel::DEBUG , " Controller::onInputAction(InputAction::PRESS_RIGHT)" );
110+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(InputAction::PRESS_RIGHT)" );
111111 _selectNextScreen (display);
112112 break ;
113113 }
114114 // Up scrolls the screen up one row
115115 case InputAction::PRESS_UP: {
116- LOG (LogLevel::DEBUG , " Controller::onInputAction(InputAction::PRESS_UP)" );
116+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(InputAction::PRESS_UP)" );
117117 break ;
118118 }
119119 // Down scrolls the screen down one row
120120 case InputAction::PRESS_DOWN: {
121- LOG (LogLevel::DEBUG , " Controller::onInputAction(InputAction::PRESS_DOWN)" );
121+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(InputAction::PRESS_DOWN)" );
122122 break ;
123123 }
124124 // Centre moves input control to the next display - does nothing until multiple displays are supported
125125 case InputAction::PRESS_CENTRE: {
126- LOG (LogLevel::DEBUG , " Controller::onInputAction(InputAction::PRESS_CENTRE)" );
126+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(InputAction::PRESS_CENTRE)" );
127127 break ;
128128 }
129129 default : {
130- LOG (LogLevel::DEBUG , " Controller::onInputAction(Unknown)" );
130+ LOG (LogLevel::LOG_DEBUG , " Controller::onInputAction(Unknown)" );
131131 break ;
132132 }
133133 }
@@ -153,7 +153,7 @@ void Controller::_selectPreviousScreen(DisplayInterface *display) {
153153 previousId = _screenManager->getPreviousScreen (screen)->getId ();
154154 }
155155 display->setScreenId (previousId);
156- LOG (LogLevel::DEBUG , " Controller::_selectPreviousScreen: _displayId=%d|screenId=%d|previousId=%d" , display->getId (),
156+ LOG (LogLevel::LOG_DEBUG , " Controller::_selectPreviousScreen: _displayId=%d|screenId=%d|previousId=%d" , display->getId (),
157157 screenId, previousId);
158158}
159159
@@ -169,6 +169,6 @@ void Controller::_selectNextScreen(DisplayInterface *display) {
169169 nextId = _screenManager->getNextScreen (screen)->getId ();
170170 }
171171 display->setScreenId (nextId);
172- LOG (LogLevel::DEBUG , " Controller::_selectNextScreen: _displayId=%d|screenId=%d|nextId=%d" , display->getId (),
172+ LOG (LogLevel::LOG_DEBUG , " Controller::_selectNextScreen: _displayId=%d|screenId=%d|nextId=%d" , display->getId (),
173173 screenId, nextId);
174174}
0 commit comments