 |
RSeries astromech firmware
|
|
Go to the documentation of this file. 1 #ifndef CommandScreenHandlerSSD1306_h
2 #define CommandScreenHandlerSSD1306_h
5 #include <Adafruit_GFX.h>
6 #include <Adafruit_SSD1306.h>
19 Adafruit_SSD1306(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1),
20 fDial(pinManager, PIN_ENCODER_A,
45 getTextBounds(text, 0, 0, &x1, &y1, &w, &h);
46 setCursor(SCREEN_WIDTH / 2 - w / 2, 0);
73 if (currentScr ==
nullptr)
76 if (keyRepeatRate == 0)
77 keyRepeatRate = KEY_REPEAT_RATE_MS;
Definition: CommandScreen.h:260
virtual void buttonLeftPressed(bool repeat=false)
Definition: CommandScreen.h:313
long fDialValue
Definition: CommandScreenHandlerSSD1306.h:176
void switchToScreen(ScreenID id, bool popStack=true)
Definition: CommandScreen.h:162
bool fSkipButtonReleased
Definition: CommandScreenHandlerSSD1306.h:179
CommandScreen * current()
Definition: CommandScreen.h:154
virtual void buttonInReleased()
Definition: CommandScreen.h:321
void remoteActive()
Definition: CommandScreenHandlerSSD1306.h:64
uint32_t fLastKeyEvent
Definition: CommandScreenHandlerSSD1306.h:177
uint8_t getButtonPressedMask() const
Definition: AnoRotaryEncoder.h:50
Definition: AnoRotaryEncoder.h:7
Definition: CommandScreen.h:147
AnoRotaryEncoder fDial
Definition: CommandScreenHandlerSSD1306.h:175
bool isButtonReleased(byte pin) const
Definition: AnoRotaryEncoder.h:71
void drawTextCentered(String text)
Definition: CommandScreenHandlerSSD1306.h:41
long getValue()
Returns current value.
Definition: RotaryEncoder.h:102
void remoteButtonEvent(uint8_t id, bool pressed, bool repeat)
Definition: CommandScreenHandlerSSD1306.h:56
virtual void buttonRightPressed(bool repeat=false)
Definition: CommandScreen.h:315
virtual void sleepDevice() override
Definition: CommandScreenHandlerSSD1306.h:33
Definition: CommandScreenHandlerSSD1306.h:15
virtual void buttonLeftReleased()
Definition: CommandScreen.h:318
CommandScreenHandlerSSD1306(PinManager &pinManager)
Definition: CommandScreenHandlerSSD1306.h:18
ScreenID ID() const
Definition: CommandScreen.h:273
bool isSleeping() const
Definition: CommandScreen.h:210
void remoteDialEvent(long newValue, long oldValue)
Definition: CommandScreenHandlerSSD1306.h:50
unsigned getKeyRepeatRate() const
Definition: CommandScreen.h:304
virtual void buttonDial(long newValue, long oldValue=0)
Definition: CommandScreen.h:322
virtual void buttonUpPressed(bool repeat=false)
Definition: CommandScreen.h:312
Definition: PinManager.h:6
bool hasChanged()
Returns true if value has changed since last animated event.
Definition: RotaryEncoder.h:94
virtual void buttonDownReleased()
Definition: CommandScreen.h:319
ScreenID fLastScreenID
Definition: CommandScreenHandlerSSD1306.h:178
virtual void buttonUpReleased()
Definition: CommandScreen.h:317
bool isButtonPressed(byte pin) const
Definition: AnoRotaryEncoder.h:61
virtual void buttonRightReleased()
Definition: CommandScreen.h:320
virtual void buttonInPressed(bool repeat=false)
Definition: CommandScreen.h:316
virtual void buttonDownPressed(bool repeat=false)
Definition: CommandScreen.h:314
virtual bool handleEvent() override
Definition: CommandScreenHandlerSSD1306.h:69
bool hasButtonStateChanged() const
Definition: AnoRotaryEncoder.h:45