Commit 262c52a2a92e104281393bd0e77898c8436c905a
1 parent
625bebad76
Exists in
master
and in
2 other branches
시간 포맷 Enum 추가
Showing
1 changed file
with
77 additions
and
7 deletions
Show diff stats
app/gui/oven_control/config.h
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | #define STRUCT_PACK __attribute__ ((packed)) |
9 | 9 | |
10 | 10 | |
11 | -#define MAX_CONFIG_COUNT 32 | |
11 | +#define MAX_CONFIG_COUNT 39 | |
12 | 12 | |
13 | 13 | namespace Define |
14 | 14 | { |
... | ... | @@ -45,7 +45,14 @@ namespace Define |
45 | 45 | config_netmask, |
46 | 46 | config_set_download, |
47 | 47 | config_set_upload, |
48 | - config_invalid = 65535 | |
48 | + config_set_half_energy, | |
49 | + config_set_auto_darkness, | |
50 | + config_set_ilc_cook_temphumi_ready, | |
51 | + config_set_load_ready, | |
52 | + config_duty_wash, | |
53 | + config_loading_door_monitoring, | |
54 | + config_cooking_door_monitoring, | |
55 | + config_invalid = MAX_CONFIG_COUNT | |
49 | 56 | }; |
50 | 57 | |
51 | 58 | typedef union _config_item{ |
... | ... | @@ -95,9 +102,28 @@ namespace Define |
95 | 102 | config_item netmask; |
96 | 103 | config_item set_download; |
97 | 104 | config_item set_upload; |
105 | + config_item set_half_energy; | |
106 | + config_item set_auto_darkness; | |
107 | + config_item set_ilc_cook_temphumi_ready; | |
108 | + config_item set_load_ready; | |
109 | + config_item duty_wash; | |
110 | + config_item loading_door_monitoring; | |
111 | + config_item cooking_door_monitoring; | |
112 | + | |
98 | 113 | }items; |
99 | 114 | }STRUCT_PACK config_lists; |
100 | 115 | |
116 | + | |
117 | + enum temp_type{ | |
118 | + temp_type_c=0, | |
119 | + temp_type_f, | |
120 | + }; | |
121 | + | |
122 | + enum time_type{ | |
123 | + time_type_24h = 0; | |
124 | + time_type_12h | |
125 | + }; | |
126 | + | |
101 | 127 | const char language_menu[3][20]{ |
102 | 128 | "한국어\0", |
103 | 129 | "中國語\0", |
... | ... | @@ -109,10 +135,7 @@ namespace Define |
109 | 135 | "am/pm\0" |
110 | 136 | }; |
111 | 137 | |
112 | - enum temp_type{ | |
113 | - temp_type_c=0, | |
114 | - temp_type_f, | |
115 | - }; | |
138 | + | |
116 | 139 | |
117 | 140 | const char temptype_menu[2][16]{ |
118 | 141 | "섭씨(℃)\0", |
... | ... | @@ -135,6 +158,37 @@ namespace Define |
135 | 158 | "잔여시간\0", |
136 | 159 | "타겟시간\0" |
137 | 160 | }; |
161 | + | |
162 | + const char on_off_menu[2][16]={ | |
163 | + "설정\0", | |
164 | + "설정취소\0" | |
165 | + }; | |
166 | + | |
167 | + const char active_on_off_menu[2][16]={ | |
168 | + "비활성\0", | |
169 | + "활성화\0" | |
170 | + }; | |
171 | + | |
172 | + typedef struct _config_1digit_set{ | |
173 | + char str_unit[8]; | |
174 | + int maxlen; | |
175 | + int min; | |
176 | + int max; | |
177 | + }config_1digit_set; | |
178 | + | |
179 | + const config_1digit_set auto_darkness_dlgset = { | |
180 | + "min\0", | |
181 | + 2, | |
182 | + 1, | |
183 | + 30, | |
184 | + }; | |
185 | + | |
186 | + const config_1digit_set load_ready_dlgset ={ | |
187 | + "min\0", | |
188 | + 2, | |
189 | + 2, | |
190 | + 10, | |
191 | + }; | |
138 | 192 | } |
139 | 193 | |
140 | 194 | |
... | ... | @@ -164,7 +218,9 @@ class Config : public QObject |
164 | 218 | const uint8_t config_data_type[MAX_CONFIG_COUNT] = { |
165 | 219 | 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, //Settings |
166 | 220 | 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, |
167 | - 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02 | |
221 | + 0x02, 0x02, 0x02,0x02, 0x02,0x02, 0x80, 0x80, 0x80, 0x02, 0x02, | |
222 | + 0x80, 0x00, 0x00,0x00, | |
223 | + 0x80, 0x00, 0x00 | |
168 | 224 | }; |
169 | 225 | |
170 | 226 | const char config_format_kr[MAX_CONFIG_COUNT][64]={ |
... | ... | @@ -200,6 +256,13 @@ class Config : public QObject |
200 | 256 | "%d.%d.%d.%d", //config_netmask, |
201 | 257 | "USB 삽입", //config_set_download, |
202 | 258 | "USB 삽입", //config_set_upload, |
259 | + "%s", //config_set_half_energy, | |
260 | + "%d", //config_set_auto_darkness, | |
261 | + "%d", //config_set_ilc_cook_temphumi_ready, | |
262 | + "%d", //config_set_load_ready, | |
263 | + "%s", //config_duty_wash, | |
264 | + "%d단계", //config_loading_door_monitoring, | |
265 | + "%d단계" //config_cooking_door_monitoring | |
203 | 266 | }; |
204 | 267 | |
205 | 268 | |
... | ... | @@ -238,6 +301,13 @@ class Config : public QObject |
238 | 301 | "IP 넷마스크", //config_netmask, |
239 | 302 | "기본설정 다운로드", //30 config_set_download, |
240 | 303 | "기본설정 업로드", //31 end of system config config_set_upload, |
304 | + "하프에너지", //config_set_half_energy, | |
305 | + "화면 밝기 자동 감소", //config_set_auto_darkness, | |
306 | + "ILC 조리 온습도 대기시간", //config_set_ilc_cook_temphumi_ready, | |
307 | + "적재중 대기 시간", //config_set_load_ready, | |
308 | + "의무 세척과정", //config_duty_wash, | |
309 | + "적재 중 문열림 시간 모니터링",//config_loading_door_monitoring, | |
310 | + "조리 중 문열림 시간 모니터링"//config_cooking_door_monitoring | |
241 | 311 | }; |
242 | 312 | |
243 | 313 | QSet<uint32_t> m_setFavorite; | ... | ... |