Commit 3dfef7aafc507ee1af9f98689f864533d67170ff

Authored by 김태훈
1 parent 5e7738dac4
Exists in master and in 2 other branches fhd, fhd-demo

프로토콜 변경 반영

app/app_oven_controller/app/oven_controller/rs485_serial.c
@@ -233,6 +233,7 @@ static void set_value( command_t *pcmd){ @@ -233,6 +233,7 @@ static void set_value( command_t *pcmd){
233 case TG_FAN2_RPM : addr = 0x1e; break; 233 case TG_FAN2_RPM : addr = 0x1e; break;
234 case TG_FAN1_DIRECTOIN : addr = 0x1f; break; 234 case TG_FAN1_DIRECTOIN : addr = 0x1f; break;
235 case TG_FAN2_DIRECTOIN : addr = 0x20; break; 235 case TG_FAN2_DIRECTOIN : addr = 0x20; break;
  236 + case TG_ERROR_CLEAR : addr = 0x31; break;
236 } 237 }
237 238
238 int value_high = ( pcmd->value >> 8) & 0xff; 239 int value_high = ( pcmd->value >> 8) & 0xff;
@@ -491,8 +492,6 @@ static void on_rcv_status( void){ @@ -491,8 +492,6 @@ static void on_rcv_status( void){
491 oven_error_bit = oven.state.system_error; // ¿¡·¯ ºñÆ® °ª º¯°æ 492 oven_error_bit = oven.state.system_error; // ¿¡·¯ ºñÆ® °ª º¯°æ
492 } 493 }
493 494
494 -  
495 -  
496 printf( "onoff_state1 = 0x%04x\n", oven.state.onoff_state1); 495 printf( "onoff_state1 = 0x%04x\n", oven.state.onoff_state1);
497 printf( "onoff_state2 = 0x%04x\n", oven.state.onoff_state2); 496 printf( "onoff_state2 = 0x%04x\n", oven.state.onoff_state2);
498 printf( "onoff_realy_load = 0x%04x\n", oven.state.onoff_relay_load); 497 printf( "onoff_realy_load = 0x%04x\n", oven.state.onoff_relay_load);
app/app_oven_controller/include/all_share.h
@@ -44,7 +44,8 @@ enum target_value_t { @@ -44,7 +44,8 @@ enum target_value_t {
44 TG_FAN1_RPM, 44 TG_FAN1_RPM,
45 TG_FAN2_RPM, 45 TG_FAN2_RPM,
46 TG_FAN1_DIRECTOIN, 46 TG_FAN1_DIRECTOIN,
47 - TG_FAN2_DIRECTOIN 47 + TG_FAN2_DIRECTOIN,
  48 + TG_ERROR_CLEAR
48 }; 49 };
49 50
50 enum target_onoff_t { 51 enum target_onoff_t {
@@ -142,6 +143,21 @@ typedef struct { @@ -142,6 +143,21 @@ typedef struct {
142 U16 fan2_direction; // 20 143 U16 fan2_direction; // 20
143 U16 manual_onoff21; // 21 144 U16 manual_onoff21; // 21
144 U16 manual_onoff22; // 22 145 U16 manual_onoff22; // 22
  146 + U16 reserved23; // 23
  147 + U16 reserved24; // 24
  148 + U16 reserved25; // 25
  149 + U16 reserved26; // 26
  150 + U16 reserved27; // 27
  151 + U16 reserved28; // 28
  152 + U16 reserved29; // 29
  153 + U16 reserved2a; // 2A
  154 + U16 reserved2b; // 2B
  155 + U16 reserved2c; // 2C
  156 + U16 reserved2d; // 2D
  157 + U16 reserved2e; // 2E
  158 + U16 reserved2f; // 2F
  159 + U16 reserved30; // 30
  160 + U16 error_clear; // 31
145 } STRUCT_PACK oven_control_t; 161 } STRUCT_PACK oven_control_t;
146 162
147 typedef struct { 163 typedef struct {
@@ -153,7 +169,7 @@ typedef struct { @@ -153,7 +169,7 @@ typedef struct {
153 I16 cooking_heat; // 05 169 I16 cooking_heat; // 05
154 U16 cooking_humidity; // 06 170 U16 cooking_humidity; // 06
155 U16 cooking_time; // 07 171 U16 cooking_time; // 07
156 - I16 curr_heat; // 08 172 + I16 curr_heat; // 08
157 U16 curr_humidity; // 09 173 U16 curr_humidity; // 09
158 U16 curr_time; // 0A 174 U16 curr_time; // 0A
159 U16 cleaning_sate; // 0B 175 U16 cleaning_sate; // 0B
@@ -192,8 +208,8 @@ typedef struct { @@ -192,8 +208,8 @@ typedef struct {
192 U16 reserved2c; // 2C 208 U16 reserved2c; // 2C
193 U16 reserved2d; // 2D 209 U16 reserved2d; // 2D
194 U16 system_error; // 2E 210 U16 system_error; // 2E
195 - U16 reserved2f; // 2F  
196 - U16 reserved30; // 30 211 + U16 communication_error; // 2F
  212 + U16 sensor_error; // 30
197 U16 reserved31; // 31 213 U16 reserved31; // 31
198 U16 error_cnt[16]; // ¿¡·¯ Ä«¿îÆ® 214 U16 error_cnt[16]; // ¿¡·¯ Ä«¿îÆ®
199 } STRUCT_PACK oven_state_t; 215 } STRUCT_PACK oven_state_t;