Commit 174377d7c8e57122f2de89e2548a82887a2f318d
1 parent
5228da6302
Exists in
master
and in
2 other branches
프로토콜 추가 후 모드버스로 다 읽지 않는 문제 수정
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c
@@ -468,7 +468,7 @@ static void on_rcv_status( void){ | @@ -468,7 +468,7 @@ static void on_rcv_status( void){ | ||
468 | // ���� ó�� | 468 | // ���� ó�� |
469 | 469 | ||
470 | oven.header = HDR_OVEN_STATE; | 470 | oven.header = HDR_OVEN_STATE; |
471 | - memcpy( ( char *)&oven.state, &rx_data[3], 0x32 * 2); // 0x32 : ���� ���� ���� 2����Ʈ ���� | 471 | + memcpy( ( char *)&oven.state, &rx_data[3], sizeof(oven_state_t) - sizeof(oven.state.error_cnt)); // 0x32 : ���� ���� ���� 2����Ʈ ���� |
472 | 472 | ||
473 | bit_onoff21 = oven.state.onoff_state1; // ���� ���� ���¸� �ݿ� | 473 | bit_onoff21 = oven.state.onoff_state1; // ���� ���� ���¸� �ݿ� |
474 | bit_onoff22 = oven.state.onoff_state2; // ���� ���� ���¸� �ݿ� | 474 | bit_onoff22 = oven.state.onoff_state2; // ���� ���� ���¸� �ݿ� |
@@ -697,9 +697,9 @@ static void run_step_work( int n_step){ | @@ -697,9 +697,9 @@ static void run_step_work( int n_step){ | ||
697 | msleep( 50); // ���� ��� ��û ���� ���� ������ ������ �� �Ǵ� ��찡 ���� | 697 | msleep( 50); // ���� ��� ��û ���� ���� ������ ������ �� �Ǵ� ��찡 ���� |
698 | 698 | ||
699 | switch( step_work){ | 699 | switch( step_work){ |
700 | - case STEP_CONTROL : modbus_func03( 0x00, 0x00, sizeof( oven_control_t) /2); break; // ������ ��û ���� /2: word ������ ����, 2���� ��û�ϸ� 4 ����Ʈ ���� | ||
701 | - case STEP_STATE : modbus_func04( 0x00, 0x00, 0x32 ); break; // oven_stae_t�� error_cnt[] ������ �־ ���� �Է� | ||
702 | - case STEP_CHECK : check_gui_cmd(); break; // GUI ��û Ȯ�� | 700 | + case STEP_CONTROL : modbus_func03( 0x00, 0x00, sizeof( oven_control_t) /2); break; // ������ ��û ���� /2: word ������ ����, 2���� ��û�ϸ� 4 ����Ʈ ���� |
701 | + case STEP_STATE : modbus_func04( 0x00, 0x00, (sizeof( oven_state_t) - sizeof(U16) * 16) /2); break; // oven_stae_t�� error_cnt[] ������ �־ ���� �Է� | ||
702 | + case STEP_CHECK : check_gui_cmd(); break; // GUI ��û Ȯ�� | ||
703 | default : | 703 | default : |
704 | msleep( 100); // 100mm sec ��, ��� ���� ���� | 704 | msleep( 100); // 100mm sec ��, ��� ���� ���� |
705 | run_next_step_work(); // ���� STEP ���� | 705 | run_next_step_work(); // ���� STEP ���� |