Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1702 - 1
#if !defined(__EOSCONSOLE_H__)
2
#define __EOSCONSOLE_H__
3
 
4
#include <inttypes.h>
5
#include <avr/pgmspace.h>
6
#include <qep_port.h>
7
#include <WProgram.h>
8
#include <canoneos.h>
9
 
10
enum TextMenuSignals
11
{
12
    MENU_SELECT_SIG = Q_USER_SIG,
13
    TICK_SIG
14
};
15
 
16
struct TickEvt : public QEvent
17
{
18
    uint8_t fine_time;                              // the fine 1/10 s counter
19
};
20
 
21
struct MenuSelectEvt : public QEvent
22
{
23
    uint8_t  item_index;
24
};
25
 
26
class EOSConsole : public QHsm
27
{
28
    static void PrintMenuTitles(uint8_t count, const char **menu);
29
    static void ShowParams();
30
 
31
public:
32
    EOSConsole()
33
        : QHsm((QStateHandler)&EOSConsole::Initial)
34
    {};
35
    int8_t MenuSelect();
36
 
37
protected:
38
    static QState Initial(EOSConsole *me, QEvent const *e);
39
    static QState Inactive(EOSConsole *me, QEvent const *e);
40
    static QState Active(EOSConsole *me, QEvent const *e);
41
    static QState MainMenu(EOSConsole *me, QEvent const *e);
42
    static QState ChangeSettingsMenu(EOSConsole *me, QEvent const *e);
43
    static QState ChangeApertureMenu(EOSConsole *me, QEvent const *e);
44
    static QState ChangeShutterSpeedMenu(EOSConsole *me, QEvent const *e);
45
    static QState ChangeWBMenu(EOSConsole *me, QEvent const *e);
46
    static QState ChangePStyleMenu(EOSConsole *me, QEvent const *e);
47
    static QState ChangeExpCompMenu(EOSConsole *me, QEvent const *e);
48
    static QState ChangeIsoMenu(EOSConsole *me, QEvent const *e);
49
};
50
 
51
#endif // __EOSCONSOLE_H__