summaryrefslogtreecommitdiff
path: root/Mode/ModeDemo.h
blob: cf469e0fef1a5a6c22cddf5da02b0b084af416eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __MODEDEMO_H__
#define __MODEDEMO_H__

#include "Mode.h"
#include "LayoutHelp.h"
#include "LayoutDemoSampling.h"

class ModeDemo : public Mode {
    public:
        ModeDemo(DOGS102* lcd, ButtonHandler* buttons, mDot* dot, LoRaHandler* lora, GPSPARSER* gps, SensorHandler* sensors);
        ~ModeDemo();

        bool start();

    private:
        void displayHelp();

        typedef enum {
            show_help = 0,
            sampling,
            success,
            failure
        } state;

        typedef enum {
            trigger = 0,
            interval
        } mode;

        LayoutHelp _help;
        LayoutDemoSampling _sam;
        SensorItem _data;
        mode _mode;
        Timer _send_timer;
        uint8_t _interval;
        static const uint32_t _intervals[];
};

#endif