fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

CarVacrebase to configurator818d962

gram
969 B38 linesraw
1#ifndef _DISPLAY_INPUTDISPLAY_HPP
2#define _DISPLAY_INPUTDISPLAY_HPP
3
4#include "display/DisplayMode.hpp"
5
6typedef struct _InputViewerButton {
7    Button button;
8    uint8_t center_x;
9    uint8_t center_y;
10    uint8_t radius;
11} InputViewerButton;
12
13class InputDisplay : public DisplayMode {
14  public:
15    InputDisplay(
16        InputViewerButton *input_viewer_buttons,
17        size_t input_viewer_buttons_count,
18        CommunicationBackendId backend_id
19    );
20    DisplayModeId GetId();
21    void HandleControls(
22        IntegratedDisplay *instance,
23        const DisplayControls &controls,
24        Button button
25    );
26    void UpdateDisplay(IntegratedDisplay *instance, Adafruit_GFX &display);
27    void UpdateButtonLayout(
28        InputViewerButton *input_viewer_buttons,
29        size_t input_viewer_buttons_count
30    );
31
32  protected:
33    InputViewerButton *_input_viewer_buttons;
34    size_t _input_viewer_buttons_count;
35    CommunicationBackendId _backend_id;
36};
37
38#endif