2021-03-21 22:29:31 +01:00
|
|
|
|
|
|
|
|
#include "System.h"
|
|
|
|
|
|
2022-06-28 21:26:53 +02:00
|
|
|
System::System() : _boardConfig(0), _userConfig(0), _isEthConnected(false), _isWifiConnected(false) {
|
2021-03-21 22:29:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
System::~System() {
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-19 00:44:37 +02:00
|
|
|
void System::setBoardConfig(BoardConfig const *const boardConfig) {
|
|
|
|
|
_boardConfig = boardConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void System::setUserConfig(Configuration const *const userConfig) {
|
|
|
|
|
_userConfig = userConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BoardConfig const *const System::getBoardConfig() const {
|
2021-03-21 22:29:31 +01:00
|
|
|
return _boardConfig;
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-19 00:44:37 +02:00
|
|
|
Configuration const *const System::getUserConfig() const {
|
2021-03-21 22:29:31 +01:00
|
|
|
return _userConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TaskManager &System::getTaskManager() {
|
|
|
|
|
return _taskManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Display &System::getDisplay() {
|
|
|
|
|
return _display;
|
|
|
|
|
}
|
2021-03-27 22:02:43 +01:00
|
|
|
|
2022-06-28 21:26:53 +02:00
|
|
|
bool System::isWifiOrEthConnected() const {
|
|
|
|
|
return _isEthConnected || _isWifiConnected;
|
2021-03-27 22:02:43 +01:00
|
|
|
}
|
|
|
|
|
|
2022-06-28 21:26:53 +02:00
|
|
|
void System::connectedViaEth(bool status) {
|
|
|
|
|
_isEthConnected = status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void System::connectedViaWifi(bool status) {
|
|
|
|
|
_isWifiConnected = status;
|
2021-03-27 22:02:43 +01:00
|
|
|
}
|
2022-03-20 01:03:42 +01:00
|
|
|
|
|
|
|
|
logging::Logger &System::getLogger() {
|
|
|
|
|
return _logger;
|
|
|
|
|
}
|