Factory firmware for the MultiTech Dotbox (MTDOT-BOX) and EVB (MTDOT-EVB) products.

Dependencies:   NCP5623B GpsParser ISL29011 libmDot-mbed5 MTS-Serial MMA845x DOGS102 MPL3115A2

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ModeDemo.h Source File

ModeDemo.h

00001 /* Copyright (c) <2016> <MultiTech Systems>, MIT License
00002  *
00003  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
00004  * and associated documentation files (the "Software"), to deal in the Software without restriction, 
00005  * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
00006  * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 
00007  * furnished to do so, subject to the following conditions:
00008  *
00009  * The above copyright notice and this permission notice shall be included in all copies or 
00010  * substantial portions of the Software.
00011  *
00012  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 
00013  * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
00014  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
00015  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
00016  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00017  */
00018 
00019 #ifndef __MODEDEMO_H__
00020 #define __MODEDEMO_H__
00021 
00022 #include "Mode.h"
00023 #include "LayoutHelp.h"
00024 #include "LayoutDemoSampling.h"
00025 
00026 class ModeDemo : public Mode {
00027     public:
00028         ModeDemo(DOGS102* lcd, ButtonHandler* buttons, mDot* dot, LoRaHandler* lora, GPSPARSER* gps, SensorHandler* sensors);
00029         ~ModeDemo();
00030 
00031         bool start();
00032 
00033     private:
00034         void displayHelp();
00035 
00036         typedef enum {
00037             show_help = 0,
00038             sampling,
00039             success,
00040             failure
00041         } state;
00042 
00043         typedef enum {
00044             trigger = 0,
00045             interval
00046         } mode;
00047 
00048         LayoutHelp _help;
00049         LayoutDemoSampling _sam;
00050         SensorItem _data;
00051         mode _mode;
00052         Timer _send_timer;
00053         uint8_t _interval;
00054         static const uint32_t _intervals[];
00055 };
00056 
00057 #endif