DeskControl/src/lib/screen/move-sensorerror.h

31 lines
650 B
C
Raw Normal View History

#ifndef __screen_move_sensorerror
#define __screen_move_sensorerror
#include "../screen.h"
#include "../Control.h"
/*
* Move sensor error screen
* Shows a warning that the height sensor is not providing valid values.
* Can only be dismissed after the sensor is stable again.
*/
class MoveSensorErrorScreen : public BaseScreen
{
public:
MoveSensorErrorScreen(ScreenManager* screenManager) : BaseScreen(screenManager) { }
void onShow();
void onButton(Button button);
void onTick();
private:
uint32_t lastRefresh;
uint8_t currentHeightY;
uint16_t lastTextWidth = 0;
void drawCurrentHeight();
};
#endif