From 52da495de9cfa2ed4d7429f62ca50ba57f30c1d6 Mon Sep 17 00:00:00 2001 From: Sieren Date: Fri, 10 Apr 2020 21:07:05 +0200 Subject: [PATCH] Fix missing Hardware Configuration Reading out the HW configuration was missing as well as setting the screen rotation angle at the right point. --- main/AppScreen.ipp | 2 +- main/fs/ConfigReader.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main/AppScreen.ipp b/main/AppScreen.ipp index e999bc3..a1fb2d8 100644 --- a/main/AppScreen.ipp +++ b/main/AppScreen.ipp @@ -131,7 +131,7 @@ namespace gfx registerWifiCallback(); mpAppContext->registerStateCallback(std::bind(&AppScreen::appContextChanged, this, _1)); mpAppContext->getMQTTConnection()->registerConnectionStatusCallback(std::bind(&UIStatusBarWidget::mqttConnectionChanged, mpStatusBar.get(), _1)); - + mTft.setRotation(mpAppContext->getModel().mHardwareConfig.mScreenRotationAngle); mpSubViews.clear(); presentMenu(); } diff --git a/main/fs/ConfigReader.cpp b/main/fs/ConfigReader.cpp index 13c74e2..478d886 100644 --- a/main/fs/ConfigReader.cpp +++ b/main/fs/ConfigReader.cpp @@ -35,6 +35,7 @@ namespace fs model.mTimeZone = getTimeZone(rootObj); model.mMQTTServerConfig = getMQTTConfig(rootObj); model.mMQTTGroups = getMQTTGroups(rootObj); + model.mHardwareConfig = getHardwareConfig(rootObj); return model; }