PS_Fgen_FW  4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
ScreenManager.h File Reference

Containing a class and functions for screen handling. More...

#include <Arduino.h>
#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include "../Encoder/Encoder.h"
#include "../KeyPad/KeyPad.h"
#include "../Configuration.h"
#include "UI_Lib.h"
#include "Icons.h"
#include <string.h>
#include "XPT2046.h"

Go to the source code of this file.

Classes

class  ScreenManagerClass
 Class that is used to control the screen. More...
 

Macros

#define DISPLAY_WIDTH   320
 Width of the display.
 
#define DISPLAY_HEIGHT   240
 Height of the display.
 
#define STATUS_BAR_HEIGHT   30
 Height of the status bar in the lower region of the screen.
 
#define MSG_DIALOG_MARGIN   20
 Margin around the message dialogs.
 

Typedefs

typedef enum ScreenTypes ScreenTypes_t
 Available screen types.
 

Enumerations

enum  TouchEventStates { TOUCH_EVENTS_WAIT_FOR_TOUCH , TOUCH_EVENTS_WAIT_LONG_TOUCH_DELAY , TOUCH_EVENTS_LONG_TOUCH_DETECTED }
 Available states for the touch handling state machine. More...
 
enum  ScreenTypes {
  SCREEN_PS , SCREEN_DDS , SCREEN_MEAS , SCREEN_CONF ,
  NUM_SCREEN_ELEMENTS
}
 Available screen types. More...
 

Functions

UIElement * uiBuildSplashScreen ()
 Build the SplashScreen by linking all necessary components together.
 
UIElement * uiBuildScreenPS ()
 Build the PowerSupply screen by linking all necessary components together.
 
UIElement * uiBuildScreenDDS ()
 Build the DDS screen by linking all necessary components together.
 
UIElement * uiBuildScreenMeasure ()
 Build the Measure screen by linking all necessary components together.
 
UIElement * uiBuildScreenSettings ()
 Build the Settings screen by linking all necessary components together.
 
UIElement * uiBuildScreenCalibration ()
 Build the Calibration screen by linking all necessary components together.
 
UIElement * StartCalibration ()
 Start the calibration by initializing all calibration screen components and the calibration state machine.
 
void updateDmmNegativeWarningVisibility ()
 Update the visibility of the DMM channel negative warning icons.
 
void ScreenDDSUpdateVisibility ()
 Update the visibility of all controls on the DDS screen.
 

Detailed Description

Containing a class and functions for screen handling.

Date
05.11.2020 18:45:19
Author
Markus Scheich

Typedef Documentation

◆ ScreenTypes_t

typedef enum ScreenTypes ScreenTypes_t

Available screen types.

Enumeration with all different screens of the device, dependent on the enabled subsystems. The enumeration value is used to determine the index of the screen in the tab control.

Enumeration Type Documentation

◆ ScreenTypes

Available screen types.

Enumeration with all different screens of the device, dependent on the enabled subsystems. The enumeration value is used to determine the index of the screen in the tab control.

Enumerator
SCREEN_PS 

Power supply screen.

SCREEN_DDS 

DDS screen.

SCREEN_MEAS 

Measurement screen.

SCREEN_CONF 

Configuration screen.

NUM_SCREEN_ELEMENTS 

The last element is used to determine the number of elements in the enumeration.

◆ TouchEventStates

Available states for the touch handling state machine.

Enumerator
TOUCH_EVENTS_WAIT_FOR_TOUCH 

No touch has occured yet.

TOUCH_EVENTS_WAIT_LONG_TOUCH_DELAY 

A touch has occured.

Wait until the long touch delay is over or the display isn't touched anymore.

TOUCH_EVENTS_LONG_TOUCH_DETECTED 

A long touch was detected.

Wait in this state until the display isn't touched anymore.

Function Documentation

◆ ScreenDDSUpdateVisibility()

void ScreenDDSUpdateVisibility ( )

Update the visibility of all controls on the DDS screen.

Do this e.g. after loading all settings.

◆ StartCalibration()

UIElement * StartCalibration ( )

Start the calibration by initializing all calibration screen components and the calibration state machine.

Returns
UIElement representing the top level element of the Calibration screen.

Start the calibration by initializing all calibration screen components and the calibration state machine.

This initializes all UI elements to the neccessary states and returns a pointer to the calibration screen.

Returns
Pointer to the calibration screen. Use this to display the calibration screen.

◆ uiBuildScreenCalibration()

UIElement * uiBuildScreenCalibration ( )

Build the Calibration screen by linking all necessary components together.

Returns
UIElement representing the top level element of the Calibration screen.

◆ uiBuildScreenDDS()

UIElement * uiBuildScreenDDS ( )

Build the DDS screen by linking all necessary components together.

Returns
UIElement representing the top level element of the DDS screen.

◆ uiBuildScreenMeasure()

UIElement * uiBuildScreenMeasure ( )

Build the Measure screen by linking all necessary components together.

Returns
UIElement representing the top level element of the Measure screen.

◆ uiBuildScreenPS()

UIElement * uiBuildScreenPS ( )

Build the PowerSupply screen by linking all necessary components together.

Returns
UIElement representing the top level element of the PowerSupply screen.

◆ uiBuildScreenSettings()

UIElement * uiBuildScreenSettings ( )

Build the Settings screen by linking all necessary components together.

Returns
UIElement representing the top level element of the Settings screen.

◆ uiBuildSplashScreen()

UIElement * uiBuildSplashScreen ( )

Build the SplashScreen by linking all necessary components together.

Returns
UIElement representing the top level element of the SplashScreen.