summaryrefslogtreecommitdiff
path: root/src/displayapp/DisplayApp.cpp
diff options
context:
space:
mode:
authorRaupinger <fgrauper@gmail.com>2021-02-23 08:01:58 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-06-11 04:07:35 (GMT)
commit7f08e2c63608185b741fd5270a0aee4bd225f140 (patch)
tree4609699c5608e4d8c23659c8c5dfc31097b28a74 /src/displayapp/DisplayApp.cpp
parent2ecb4a6fc7b862280281d9ac762953cb14b7eea6 (diff)
Add Calculator screen as new App
A calculator based on the Shunting-yard algorithm as described here: https://en.wikipedia.org/wiki/Shunting-yard_algorithm Moving the Motion App into the Settings screen to use the tile in the ApplicationList for the Calculator.
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
-rw-r--r--src/displayapp/DisplayApp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 376f73a..a8d6281 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -25,6 +25,7 @@
#include "displayapp/screens/SystemInfo.h"
#include "displayapp/screens/Tile.h"
#include "displayapp/screens/Twos.h"
+#include "displayapp/screens/Calculator.h"
#include "displayapp/screens/FlashLight.h"
#include "displayapp/screens/BatteryInfo.h"
#include "displayapp/screens/Steps.h"
@@ -481,6 +482,9 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
case Apps::Steps:
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
break;
+ case Apps::Calculator:
+ currentScreen = std::make_unique<Screens::Calculator>(this, motorController);
+ break;
}
currentApp = app;
}