Rev 1543 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1541 | - | 1 | package dongfang.mkt.version; |
2 | |||
3 | import dongfang.mkt.frames.FrameFactory; |
||
4 | import dongfang.mkt.frames.FrameFactory_V0_74; |
||
5 | |||
6 | public class MKVersion { |
||
7 | |||
8 | public enum MK_VERSION { |
||
9 | V0_74KILLAGREG, |
||
10 | V0_78, |
||
11 | DONGFANG_V0_74 |
||
12 | }; |
||
13 | |||
14 | public enum LCDPAGES { |
||
15 | VERSION("Version"), |
||
16 | HEIGHT("Height"), |
||
17 | ATTITUDE("Attitude"), |
||
18 | CHANNELS("Channels"), |
||
19 | CONTROLS("Controls"), |
||
20 | GYROS("Gyros"), |
||
21 | ACC("Acc. Meter"), |
||
22 | POWER("Power"), |
||
23 | COMPASS("Compass"), |
||
24 | VARIABLES("Variables"), |
||
25 | SERVOS("Servos"), |
||
26 | EXTERNALCONTROL("ExtControl"), |
||
27 | BLCERRORS("BLC Errors"), |
||
28 | BLCSDETECTED("BLCs"), |
||
29 | GPS("GPS"), |
||
30 | MM3("MM3"), |
||
31 | MM3RANGE("MM3Range"), |
||
32 | SIGNAL("Signal"), |
||
33 | VARS1("Variables 1"), |
||
34 | VARS2("Variables 2"), |
||
35 | TIMER("Timer"); |
||
36 | |||
37 | private String title; |
||
38 | |||
39 | LCDPAGES(String title) { |
||
40 | this.title = title; |
||
41 | } |
||
42 | |||
43 | public String getTitle() { |
||
44 | return title; |
||
45 | } |
||
46 | } |
||
47 | |||
48 | private static LCDPAGES[] LCDPAGES_074 = { |
||
49 | LCDPAGES.VERSION, |
||
50 | LCDPAGES.HEIGHT, |
||
51 | LCDPAGES.ATTITUDE, |
||
52 | LCDPAGES.CHANNELS, |
||
53 | LCDPAGES.CONTROLS, |
||
54 | LCDPAGES.GYROS, |
||
55 | LCDPAGES.ACC, |
||
56 | LCDPAGES.POWER, |
||
57 | LCDPAGES.COMPASS, |
||
58 | LCDPAGES.VARIABLES, |
||
59 | LCDPAGES.SERVOS, |
||
60 | LCDPAGES.EXTERNALCONTROL, |
||
61 | LCDPAGES.BLCERRORS, |
||
62 | LCDPAGES.BLCSDETECTED, |
||
63 | LCDPAGES.GPS, |
||
64 | LCDPAGES.MM3, |
||
65 | LCDPAGES.MM3RANGE |
||
66 | }; |
||
67 | |||
68 | private static LCDPAGES[] LCDPAGES_078 = { |
||
69 | LCDPAGES.VERSION, |
||
70 | LCDPAGES.HEIGHT, |
||
71 | LCDPAGES.ATTITUDE, |
||
72 | LCDPAGES.CHANNELS, |
||
73 | LCDPAGES.CONTROLS, |
||
74 | LCDPAGES.GYROS, |
||
75 | LCDPAGES.ACC, |
||
76 | LCDPAGES.POWER, |
||
77 | LCDPAGES.SIGNAL, |
||
78 | LCDPAGES.COMPASS, |
||
79 | LCDPAGES.VARS1, |
||
80 | LCDPAGES.VARS2, |
||
81 | LCDPAGES.SERVOS, |
||
82 | LCDPAGES.EXTERNALCONTROL, |
||
83 | LCDPAGES.BLCERRORS, |
||
84 | LCDPAGES.BLCSDETECTED, |
||
85 | LCDPAGES.TIMER |
||
86 | }; |
||
87 | |||
88 | public static FrameFactory getFrameFactory(MK_VERSION version) { |
||
89 | return new FrameFactory_V0_74(); |
||
90 | } |
||
91 | |||
92 | // dummy impl. |
||
93 | public static LCDPAGES[] getLCDPAGES() { |
||
94 | return LCDPAGES_074; |
||
95 | } |
||
96 | } |