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