Commit c19a6df603933c38de143ba862ac5fd78376a294

Authored by 고영탁
1 parent a21bb5f670
Exists in master and in 2 other branches fhd, fhd-demo

모델추가

Showing 1 changed file with 33 additions and 7 deletions   Show diff stats
app/gui/oven_control/config.h
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 #define STRUCT_PACK __attribute__ ((packed)) 8 #define STRUCT_PACK __attribute__ ((packed))
9 9
10 10
11 -#define MAX_CONFIG_COUNT 45 11 +#define MAX_CONFIG_COUNT 46
12 #define MAX_SOFTWARE_INFO_CNT 3 12 #define MAX_SOFTWARE_INFO_CNT 3
13 #define MAX_HOTLINE_CHEF_CNT 3 13 #define MAX_HOTLINE_CHEF_CNT 3
14 #define MAX_HOTLINE_SERVICE_CNT 2 14 #define MAX_HOTLINE_SERVICE_CNT 2
@@ -62,6 +62,7 @@ namespace Define @@ -62,6 +62,7 @@ namespace Define
62 config_steam_wash, 62 config_steam_wash,
63 config_demo_mode, 63 config_demo_mode,
64 config_enter_engineer_mode, 64 config_enter_engineer_mode,
  65 + config_model,
65 config_invalid = MAX_CONFIG_COUNT 66 config_invalid = MAX_CONFIG_COUNT
66 }; 67 };
67 68
@@ -69,6 +70,9 @@ namespace Define @@ -69,6 +70,9 @@ namespace Define
69 uint32_t d32; 70 uint32_t d32;
70 float f32; 71 float f32;
71 struct{ 72 struct{
  73 + uint16_t d16[2];
  74 + }d16;
  75 + struct{
72 uint8_t d8_0; 76 uint8_t d8_0;
73 uint8_t d8_1; 77 uint8_t d8_1;
74 uint8_t d8_2; 78 uint8_t d8_2;
@@ -125,6 +129,7 @@ namespace Define @@ -125,6 +129,7 @@ namespace Define
125 config_item steam_wash; 129 config_item steam_wash;
126 config_item demo_mode; 130 config_item demo_mode;
127 config_item enter_engineer_mode; 131 config_item enter_engineer_mode;
  132 + config_item model;
128 }items; 133 }items;
129 }STRUCT_PACK config_lists; 134 }STRUCT_PACK config_lists;
130 135
@@ -139,6 +144,28 @@ namespace Define @@ -139,6 +144,28 @@ namespace Define
139 time_type_12h 144 time_type_12h
140 }; 145 };
141 146
  147 + enum model_type{
  148 + model_electric_10 = 0,
  149 + model_electric_20,
  150 + model_electric_24,
  151 + model_electric_40,
  152 +
  153 + model_gas_lpg_10,
  154 + model_gas_lpg_20,
  155 + model_gas_lpg_24,
  156 + model_gas_lpg_40,
  157 +
  158 + model_gas_lng_10,
  159 + model_gas_lng_20,
  160 + model_gas_lng_24,
  161 + model_gas_lng_40
  162 + };
  163 +
  164 + enum rest_time_type{
  165 + rest_time_rest=0,
  166 + rest_time_target
  167 + };
  168 +
142 const char language_menu[3][20]{ 169 const char language_menu[3][20]{
143 "한국어\0", 170 "한국어\0",
144 "中國語\0", 171 "中國語\0",
@@ -164,10 +191,7 @@ namespace Define @@ -164,10 +191,7 @@ namespace Define
164 "1100g" 191 "1100g"
165 }; 192 };
166 193
167 - enum rest_time_type{  
168 - rest_time_rest=0,  
169 - rest_time_target  
170 - }; 194 +
171 195
172 const char rest_time_type_menu[2][16] = { 196 const char rest_time_type_menu[2][16] = {
173 "잔여시간\0", 197 "잔여시간\0",
@@ -175,8 +199,8 @@ namespace Define @@ -175,8 +199,8 @@ namespace Define
175 }; 199 };
176 200
177 const char on_off_menu[2][16]={ 201 const char on_off_menu[2][16]={
178 - "설정\0",  
179 - "설정취소\0" 202 + "설정취소\0",
  203 + "설정\0"
180 }; 204 };
181 205
182 const char active_on_off_menu[2][16]={ 206 const char active_on_off_menu[2][16]={
@@ -362,6 +386,7 @@ class Config : public QObject @@ -362,6 +386,7 @@ class Config : public QObject
362 public: 386 public:
363 static Config *getInstance(QObject *parent=0); 387 static Config *getInstance(QObject *parent=0);
364 //static void init(); 388 //static void init();
  389 + bool initConfig(void);
365 bool loadConfig(void); 390 bool loadConfig(void);
366 bool saveConfig(void); 391 bool saveConfig(void);
367 Define::config_item getConfigValue(Define::ConfigType idx); 392 Define::config_item getConfigValue(Define::ConfigType idx);
@@ -378,6 +403,7 @@ public: @@ -378,6 +403,7 @@ public:
378 static QString getDateTimeString(uint32_t sec); 403 static QString getDateTimeString(uint32_t sec);
379 static QString getTempString(int cel_temp); 404 static QString getTempString(int cel_temp);
380 405
  406 +
381 void execConfigWindow(QWidget *parent, Define::ConfigType idx); 407 void execConfigWindow(QWidget *parent, Define::ConfigType idx);
382 408
383 409