-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.h
More file actions
45 lines (37 loc) · 826 Bytes
/
Menu.h
File metadata and controls
45 lines (37 loc) · 826 Bytes
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
40
41
42
43
44
45
/*
* Menu.h
*
* Created on: Jul 14, 2014
* Author: mathias
*/
#ifndef MENU_H_
#define MENU_H_
#include "Arduino.h"
#include "SerialAdapter.h"
#include "State.h"
class Menu {
public:
Menu(State* state);
void init();
void parseInput();
private:
bool hasInput();
void printMenu();
void setNbrPhotos(String data);
void setExposureWaitTime(String data);
void setMotorRunTime(String data);
void setDirection(String data);
void resetTrolley();
void printStatus();
void start();
void stop();
void handleSubInput(String data);
State* state;
int currentMenuChoice;
static const int MENU_NONE = -1;
static const int MENU_SET_NBR_PHOTOS = 1;
static const int MENU_SET_EXPOSURE_TIME = 2;
static const int MENU_SET_MOTOR_RUN_TIME = 3;
static const int MENU_SET_DIRECTION = 4;
};
#endif /* MENU_H_ */