8#ifndef SCREENMANAGER_H_
9#define SCREENMANAGER_H_
13#include "Adafruit_GFX.h"
14#include "Adafruit_ILI9341.h"
27#define DISPLAY_WIDTH 320
28#define DISPLAY_HEIGHT 240
29#define STATUS_BAR_HEIGHT 30
30#define MSG_DIALOG_MARGIN 20
51#ifdef PS_SUBSYSTEM_ENABLED
54#ifdef DDS_SUBSYSTEM_ENABLED
57#ifdef MEASURE_SUBSYSTEM_ENABLED
64#ifdef SPLASHSCREEN_ENABLED
72#ifdef PS_SUBSYSTEM_ENABLED
80#ifdef DDS_SUBSYSTEM_ENABLED
88#ifdef MEASURE_SUBSYSTEM_ENABLED
114#ifdef MEASURE_SUBSYSTEM_ENABLED
121#ifdef DDS_SUBSYSTEM_ENABLED
207 bool TouchInput(uint16_t x, uint16_t y, TouchTypes touchType);
Containing different defines for device configuration.
Containing functions to handle the rotary encoder.
Containing definitions for various icons.
Containing a function to check which key of the KeyPad is pressed.
void updateDmmNegativeWarningVisibility()
Update the visibility of the DMM channel negative warning icons.
Definition ScreenMeasure.cpp:38
UIElement * uiBuildScreenMeasure()
Build the Measure screen by linking all necessary components together.
Definition ScreenMeasure.cpp:44
UIElement * uiBuildScreenPS()
Build the PowerSupply screen by linking all necessary components together.
Definition ScreenPS.cpp:74
void ScreenDDSUpdateVisibility()
Update the visibility of all controls on the DDS screen.
Definition ScreenDDS.cpp:93
UIElement * uiBuildScreenSettings()
Build the Settings screen by linking all necessary components together.
Definition ScreenSettings.cpp:102
UIElement * uiBuildScreenCalibration()
Build the Calibration screen by linking all necessary components together.
Definition ScreenCalibration.cpp:275
ScreenTypes
Available screen types.
Definition ScreenManager.h:50
@ NUM_SCREEN_ELEMENTS
The last element is used to determine the number of elements in the enumeration.
Definition ScreenManager.h:61
@ SCREEN_CONF
Configuration screen.
Definition ScreenManager.h:60
@ SCREEN_PS
Power supply screen.
Definition ScreenManager.h:52
@ SCREEN_DDS
DDS screen.
Definition ScreenManager.h:55
@ SCREEN_MEAS
Measurement screen.
Definition ScreenManager.h:58
TouchEventStates
Available states for the touch handling state machine.
Definition ScreenManager.h:37
@ TOUCH_EVENTS_LONG_TOUCH_DETECTED
A long touch was detected.
Definition ScreenManager.h:40
@ TOUCH_EVENTS_WAIT_FOR_TOUCH
No touch has occured yet.
Definition ScreenManager.h:38
@ TOUCH_EVENTS_WAIT_LONG_TOUCH_DELAY
A touch has occured.
Definition ScreenManager.h:39
UIElement * uiBuildScreenDDS()
Build the DDS screen by linking all necessary components together.
Definition ScreenDDS.cpp:108
enum ScreenTypes ScreenTypes_t
Available screen types.
UIElement * uiBuildSplashScreen()
Build the SplashScreen by linking all necessary components together.
Definition SplashScreen.cpp:20
UIElement * StartCalibration()
Start the calibration by initializing all calibration screen components and the calibration state mac...
Definition ScreenCalibration.cpp:150
void UpdateVisibilities()
Update the visibility of all screens.
Definition ScreenManager.cpp:114
XPT2046 _ts
XPT2046 touchscreen handle.
Definition ScreenManager.h:138
bool CurrentScreenNeedsPeriodicRedraw
Flag that indicates if the current displayed screen needs to be periodically redrawn.
Definition ScreenManager.h:151
unsigned long _touchStartTime
Start time of the touch.
Definition ScreenManager.h:139
void ShowUiMainPage()
This method can be used to show the main page (no MessageDialog or calibration page).
Definition ScreenManager.cpp:151
void ShowHideDeviceRWLMessage(bool showMessage)
Show or hide a message indicating that the device is in RWL state (only controllable via SCPI command...
Definition ScreenManager.cpp:195
bool RedrawScreenRequest
Flag that indicates that the screen should be redrawn.
Definition ScreenManager.h:150
void UpdateSettingsChangedIndicator(bool settingsChanged)
Update the settings changed indicator (star indicating that there are unstored settings).
Definition ScreenManager.cpp:163
void UpdateCalibrationValidIndicator(bool calibrationValid)
Update the calibration valid indicator (calibration icon indicating that the calibration factors are ...
Definition ScreenManager.cpp:169
ScreenManagerClass()
Constructor of the ScreenManagerClass.
Definition ScreenManager.cpp:77
void KeyInput(Keys_t key)
Method that is used to input keys (and encoder inputs) into the screen subsystem (and the UI_Lib).
Definition ScreenManager.cpp:235
uint16_t TimeCounter_SplashScreen_ms
Timer conter value that is used to measure the time, the SplashScreen is shown.
Definition ScreenManager.h:154
bool TouchInput(uint16_t x, uint16_t y, TouchTypes touchType)
Process a touch input at the given point (x, y)
Definition ScreenManager.cpp:241
void uiBuildTree()
Build the VisualTree for all screens used for drawing.
Definition ScreenManager.cpp:121
TouchEventStates _touchEventState
Current state of the touch detection state machine.
Definition ScreenManager.h:140
void TouchHandlingISR()
Call this method cyclic for touch handling.
Definition ScreenManager.cpp:246
uint16_t TimeCounter_ScreenRedraw_ms
Variable used for measuring the time to the next screen redraw.
Definition ScreenManager.h:155
void DeviceTimerTickISR()
This method is called periodically by the device timer ISR and runs in the ISR context.
Definition ScreenManager.cpp:207
bool IsSplashScreenShown
Variable used to keep track if the SplashScreen is shown.
Definition ScreenManager.h:153
void ShowUiCalibrationMenu()
This method can be used to start the calibration and show the calibration page.
Definition ScreenManager.cpp:157
uint16_t TimeCounter_TouchHandling_ms
Variable used for measuring the time to the next touch handling.
Definition ScreenManager.h:157
void DoDraw()
Evaluate, if the screen should be redrawn.
Definition ScreenManager.cpp:175
Adafruit_ILI9341 _tft
ILI9341 graphics handle that is used with all drawing related methods.
Definition ScreenManager.h:135
void Init()
Initialize the ScreenManager.
Definition ScreenManager.cpp:84
Containing defines and functions for basic SPI initialization and handling.