From 89f2ce87a91db8d97298f5b7c1694d8ca037dd9a Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 30 Jul 2019 10:23:55 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 점화 아이콘이 표현되지 않는 문제 수정 - 점화 아이콘 표현 조건 변경 (해당 번지 값의 각 비트마다 다른 의미가 있음) - app-prime-modbus가 app-prime-gui에 보내는 UDP 패킷의 크기가 잘못된 문제 수정 --- app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c | 2 +- app/gui/oven_control/ignitionicon.cpp | 5 +---- app/gui/oven_control/udphandler.h | 6 +++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c b/app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c index 61b1dc4..80855b8 100644 --- a/app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c +++ b/app/app-prime-modbus/app/app-prime-modbus/rs485_serial.c @@ -443,7 +443,7 @@ static void on_rcv_control( void){ printf( "manual_onoff22 = 0x%04x\n", bit_onoff22); // GUI로 전송 - gui_send_data_to_gui( ( char *)&oven, sizeof( gui_oven_state_t)); + gui_send_data_to_gui( ( char *)&oven, sizeof( gui_oven_control_t)); // 다음 단계 실행 run_next_step_work(); diff --git a/app/gui/oven_control/ignitionicon.cpp b/app/gui/oven_control/ignitionicon.cpp index 2faf8f3..c89804d 100644 --- a/app/gui/oven_control/ignitionicon.cpp +++ b/app/gui/oven_control/ignitionicon.cpp @@ -6,13 +6,10 @@ QPixmap *IgnitionIcon::icon = Q_NULLPTR; IgnitionIcon::IgnitionIcon(QWidget *parent) : QLabel(parent) { - if (icon == Q_NULLPTR) - icon = new QPixmap(":/images/symbol/inigited.png"); - connect(&timer, SIGNAL(timeout()), SLOT(check())); timer.start(1000); - setPixmap(*icon); + setPixmap(QPixmap(":/images/symbol/ignited.png")); check(); } diff --git a/app/gui/oven_control/udphandler.h b/app/gui/oven_control/udphandler.h index 16c410b..23494ea 100644 --- a/app/gui/oven_control/udphandler.h +++ b/app/gui/oven_control/udphandler.h @@ -69,11 +69,11 @@ public: switch (num) { case 1: - return state.burner1_state != 0; + return (state.burner1_state & 0x08) != 0; case 2: - return state.burner2_state != 0; + return (state.burner2_state & 0x08) != 0; case 3: - return state.burner3_state != 0; + return (state.burner3_state & 0x08) != 0; default: return false; } -- 2.1.4