Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
Z3dev-AllToOneFanPanel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
limm
Z3dev-AllToOneFanPanel
Commits
579396ac
Commit
579396ac
authored
Jan 12, 2021
by
limm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V1.5
parent
a5affd19
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
14 deletions
+39
-14
Code/海顿-多合一新风面板/APP/AllToOneThernmostatPannel.uvgui.11730
Code/海顿-多合一新风面板/APP/AllToOneThernmostatPannel.uvgui.11730
+0
-0
Code/海顿-多合一新风面板/APP/User/src/CC2530_transparent_analyze.c
Code/海顿-多合一新风面板/APP/User/src/CC2530_transparent_analyze.c
+2
-7
Code/海顿-多合一新风面板/APP/User/src/Key.c
Code/海顿-多合一新风面板/APP/User/src/Key.c
+3
-3
Code/海顿-多合一新风面板/APP/User/src/control_comm.c
Code/海顿-多合一新风面板/APP/User/src/control_comm.c
+33
-3
Code/海顿-多合一新风面板/APP/User/src/display_common.c
Code/海顿-多合一新风面板/APP/User/src/display_common.c
+1
-1
No files found.
Code/海顿-多合一新风面板/APP/AllToOneThernmostatPannel.uvgui.11730
View file @
579396ac
This diff is collapsed.
Click to expand it.
Code/海顿-多合一新风面板/APP/User/src/CC2530_transparent_analyze.c
View file @
579396ac
...
@@ -50,7 +50,7 @@ static void (*non_permeable_opcode_analysis)(PROTOCOL_DEAL protocol_data);
...
@@ -50,7 +50,7 @@ static void (*non_permeable_opcode_analysis)(PROTOCOL_DEAL protocol_data);
static
void
(
*
transparent_opcode_analysis
)(
PROTOCOL_DEAL
protocol_data
);
static
void
(
*
transparent_opcode_analysis
)(
PROTOCOL_DEAL
protocol_data
);
static
TP_ErrorStatus
transparent_protocol_analysis
(
TP_uc8
*
data
,
TP_uc8
len
);
static
TP_ErrorStatus
transparent_protocol_analysis
(
TP_uc8
*
data
,
TP_uc8
len
);
static
u8
Record_Last_Seq
=
0xFF
;
/**************************************************************************************************************
/**************************************************************************************************************
全局变量,用于 transparent_protocol_send
全局变量,用于 transparent_protocol_send
***************************************************************************************************************/
***************************************************************************************************************/
...
@@ -464,22 +464,17 @@ static TP_ErrorStatus transparent_protocol_analysis(TP_uc8 *data, TP_uc8 len)
...
@@ -464,22 +464,17 @@ static TP_ErrorStatus transparent_protocol_analysis(TP_uc8 *data, TP_uc8 len)
}
}
Usart_protocol_deal
.
SEQ
=
*
(
data
+
4
);
//记录 seq 的值
Usart_protocol_deal
.
SEQ
=
*
(
data
+
4
);
//记录 seq 的值
if
(
Usart_protocol_deal
.
SEQ
==
Record_Last_Seq
)
return
TP_ERROR
;
if
(
BYTE_MOVE
(
*
(
data
+
len
-
2
),
*
(
data
+
len
-
1
))
!=
CreateCrc16
(
data
+
3
,
len
-
5
))
//CRC校验
if
(
BYTE_MOVE
(
*
(
data
+
len
-
2
),
*
(
data
+
len
-
1
))
!=
CreateCrc16
(
data
+
3
,
len
-
5
))
//CRC校验
{
//校验不对
{
//校验不对
send_crc_error
(
Usart_protocol_deal
.
SEQ
);
send_crc_error
(
Usart_protocol_deal
.
SEQ
);
return
TP_ERROR
;
return
TP_ERROR
;
}
}
Record_Last_Seq
=
Usart_protocol_deal
.
SEQ
;
Usart_protocol_deal
.
Opcode
=
BYTE_MOVE
(
*
(
data
+
7
),
*
(
data
+
8
));
//赋值功能码
Usart_protocol_deal
.
Opcode
=
BYTE_MOVE
(
*
(
data
+
7
),
*
(
data
+
8
));
//赋值功能码
Usart_protocol_deal
.
Channel_ID
=
*
(
data
+
6
);
Usart_protocol_deal
.
Channel_ID
=
*
(
data
+
6
);
Usart_protocol_deal
.
ControlField
=
*
(
data
+
3
);
Usart_protocol_deal
.
ControlField
=
*
(
data
+
3
);
Usart_protocol_deal
.
ARG
=
(
data
+
9
);
Usart_protocol_deal
.
ARG
=
(
data
+
9
);
Usart_protocol_deal
.
ARG_len
=
(
*
(
data
+
2
)
-
6
);
//根据协议,此处应该 data + 2
Usart_protocol_deal
.
ARG_len
=
(
*
(
data
+
2
)
-
6
);
//根据协议,此处应该 data + 2
//DEBUG_USATR1("[cc->stm]RECIVE OPCODE: %16x \r\n",Usart_protocol_deal.Opcode);
//DEBUG_USATR1("[cc->stm]RECIVE OPCODE: %16x \r\n",Usart_protocol_deal.Opcode);
if
((
Usart_protocol_deal
.
ControlField
&
0x80
)
==
0x80
)
//非透传的数据
if
((
Usart_protocol_deal
.
ControlField
&
0x80
)
==
0x80
)
//非透传的数据
...
...
Code/海顿-多合一新风面板/APP/User/src/Key.c
View file @
579396ac
...
@@ -1898,7 +1898,7 @@ void Tap_Init(void)
...
@@ -1898,7 +1898,7 @@ void Tap_Init(void)
{
{
Fan_Speed_Control
(
Oled_Display_Info
.
FAN_Device
.
wind_speed
);
//默认打开
Fan_Speed_Control
(
Oled_Display_Info
.
FAN_Device
.
wind_speed
);
//默认打开
if
((
Oled_Display_Info
.
FAN_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
))
//开机状态且没处于15min-4h老化期间
if
((
Oled_Display_Info
.
FAN_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
&&
(
First_Exit_Factory_Mode
==
0
)
)
//开机状态且没处于15min-4h老化期间
{
{
Fan_PassbyONOFF_By_Mode_Trans
(
Oled_Display_Info
.
FAN_Device
.
system_type
,
1
);
Fan_PassbyONOFF_By_Mode_Trans
(
Oled_Display_Info
.
FAN_Device
.
system_type
,
1
);
Fan_Speed_Control
(
Oled_Display_Info
.
FAN_Device
.
wind_speed
);
Fan_Speed_Control
(
Oled_Display_Info
.
FAN_Device
.
wind_speed
);
...
@@ -1965,7 +1965,7 @@ void Fan_Speed_Control(u8 wind_speed)
...
@@ -1965,7 +1965,7 @@ void Fan_Speed_Control(u8 wind_speed)
void
Tap_Status_Scan
(
void
)
void
Tap_Status_Scan
(
void
)
{
{
#if DEVICE_TYPE_FLOOR_HEATING
#if DEVICE_TYPE_FLOOR_HEATING
if
((
Oled_Display_Info
.
FLOOR_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
))
//开机状态且没处于15min-4h老化期间
if
((
Oled_Display_Info
.
FLOOR_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
&&
(
First_Exit_Factory_Mode
==
0
)
)
//开机状态且没处于15min-4h老化期间
{
{
if
(
Oled_Display_Info
.
FLOOR_Device
.
system_type
==
SYSTEM_MODE_MANUAL
)
if
(
Oled_Display_Info
.
FLOOR_Device
.
system_type
==
SYSTEM_MODE_MANUAL
)
{
{
...
@@ -1993,7 +1993,7 @@ void Tap_Status_Scan(void)
...
@@ -1993,7 +1993,7 @@ void Tap_Status_Scan(void)
}
}
}
}
#elif DEVICE_TYPE_FAN
#elif DEVICE_TYPE_FAN
if
((
Oled_Display_Info
.
FAN_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
))
//开机状态且没处于15min-4h老化期间
if
((
Oled_Display_Info
.
FAN_Device
.
on_off
==
1
)
&&
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
&&
(
First_Exit_Factory_Mode
==
0
)
)
//开机状态且没处于15min-4h老化期间
{
{
if
(
Oled_Display_Info
.
FAN_Device
.
system_type
!=
SYSTEM_MODE_ROLL
)
if
(
Oled_Display_Info
.
FAN_Device
.
system_type
!=
SYSTEM_MODE_ROLL
)
return
;
return
;
...
...
Code/海顿-多合一新风面板/APP/User/src/control_comm.c
View file @
579396ac
...
@@ -365,7 +365,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
...
@@ -365,7 +365,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
if
(
index
==
0
)
if
(
index
==
0
)
{
{
*
write_data
=
0
;
*
write_data
=
0
;
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
if
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
...
@@ -422,7 +423,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
...
@@ -422,7 +423,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
if
(
index
==
0
)
if
(
index
==
0
)
{
{
*
write_data
=
0
;
*
write_data
=
0
;
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
if
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
...
@@ -465,7 +467,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
...
@@ -465,7 +467,8 @@ static u8 Save_Data(u8 device_type,u8 index,u32 *write_data)
if
(
index
==
0
)
if
(
index
==
0
)
{
{
*
write_data
=
0
;
*
write_data
=
0
;
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
if
(
Oled_Display_Info
.
aging_test_flag
!=
1
)
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
aging_test_flag
)
<<
8
;
//保存老化标志位
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
*
write_data
=
(
*
write_data
|
Oled_Display_Info
.
binding_device
)
<<
8
;
//保存绑定信息
...
@@ -1072,6 +1075,8 @@ static void aging_test(void)
...
@@ -1072,6 +1075,8 @@ static void aging_test(void)
if
(
Board_test_time
>=
FAST_AGING_STEP2_TIME
)
//8小时
if
(
Board_test_time
>=
FAST_AGING_STEP2_TIME
)
//8小时
{
{
aging_step
=
2
;
aging_step
=
2
;
aging_test_stop
();
Board_test_time
=
0
;
First_Exit_Factory_Mode
=
1
;
First_Exit_Factory_Mode
=
1
;
Oled_Display_Info
.
aging_test_flag
=
2
;
//
Oled_Display_Info
.
aging_test_flag
=
2
;
//
save_data
();
//老化完成,写入标志位
save_data
();
//老化完成,写入标志位
...
@@ -1906,6 +1911,31 @@ void transparent_data_analyze(PROTOCOL_DEAL recv_data)
...
@@ -1906,6 +1911,31 @@ void transparent_data_analyze(PROTOCOL_DEAL recv_data)
}
}
state_change_report
(
OPCODE_GENERAL_REPORT_STATUS
,
1
);
state_change_report
(
OPCODE_GENERAL_REPORT_STATUS
,
1
);
}
}
else
if
((
Oled_Display_Info
.
screen_page
==
2
)
&&
(
Oled_Display_Info
.
FLOOR_Device
.
error
==
2
))
//通讯故障
{
Oled_Display_Info
.
FLOOR_Device
.
error
=
0
;
if
(
Get_Display_Status
())
{
LCDShowTemp_state_t
.
LCD_place
=
DELAY_OFF_TIME_DISPLAY
;
LCDShowTemp_state_t
.
LCD_display_count
=
0
;
LCDShowTemp_state_t
.
LCD_state
=
OFF
;
LcdShowCTR
(
LCDShowTemp_state_t
);
}
state_change_report
(
OPCODE_GENERAL_REPORT_STATUS
,
2
);
}
else
if
((
Oled_Display_Info
.
screen_page
==
3
)
&&
(
Oled_Display_Info
.
FAN_Device
.
error
==
2
))
//通讯故障
{
Oled_Display_Info
.
FAN_Device
.
error
=
0
;
if
(
Get_Display_Status
())
{
LCDShowTemp_state_t
.
LCD_place
=
DELAY_OFF_TIME_DISPLAY
;
LCDShowTemp_state_t
.
LCD_display_count
=
0
;
LCDShowTemp_state_t
.
LCD_state
=
OFF
;
LcdShowCTR
(
LCDShowTemp_state_t
);
}
state_change_report
(
OPCODE_GENERAL_REPORT_STATUS
,
3
);
}
break
;
break
;
}
}
case
OPCODE_GENERAL_BING_DEVICE
:
//绑定设备
case
OPCODE_GENERAL_BING_DEVICE
:
//绑定设备
...
...
Code/海顿-多合一新风面板/APP/User/src/display_common.c
View file @
579396ac
...
@@ -11,7 +11,7 @@ extern Lcd_Status_Info_t LCDShowTemp_state_t;
...
@@ -11,7 +11,7 @@ extern Lcd_Status_Info_t LCDShowTemp_state_t;
#elif DEVICE_TYPE_FLOOR_HEATING
#elif DEVICE_TYPE_FLOOR_HEATING
OLED_ALL_DSD
Oled_Display_Info
=
{
2
,
0
,
2
,
0
,
0
,
0x11
,
0
,
0
,
0
,
0
,{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},{
1
,
0
,
0
,
0
,
260
,
0
,
3
,
0
,
5
,
0
,
2
,
1
,
0
,
0
,
3000
,
0
,
0xff
,
0xff
,
0
},{
1
,
0
,
0
,
0
,
260
,
0
,
2
,
0
,
DEV_TYPE
,
0
,
0
,
0
},{
1
,
0
,
0
,
0
,
0
,
2
,
1
,
0
,
0
,
0
,
3000
,
0
}};
OLED_ALL_DSD
Oled_Display_Info
=
{
2
,
0
,
2
,
0
,
0
,
0x11
,
0
,
0
,
0
,
0
,{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},{
1
,
0
,
0
,
0
,
260
,
0
,
3
,
0
,
5
,
0
,
2
,
1
,
0
,
0
,
3000
,
0
,
0xff
,
0xff
,
0
},{
1
,
0
,
0
,
0
,
260
,
0
,
2
,
0
,
DEV_TYPE
,
0
,
0
,
0
},{
1
,
0
,
0
,
0
,
0
,
2
,
1
,
0
,
0
,
0
,
3000
,
0
}};
#elif DEVICE_TYPE_FAN
#elif DEVICE_TYPE_FAN
OLED_ALL_DSD
Oled_Display_Info
=
{
3
,
0
,
3
,
0
,
0
,
0x1
4
,
0
,
0
,
0
,
0
,{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},{
1
,
0
,
0
,
0
,
260
,
0
,
3
,
0
,
5
,
0
,
2
,
1
,
0
,
0
,
3000
,
0
,
0xff
,
0xff
,
0
},{
1
,
0
,
0
,
0
,
260
,
0
,
2
,
0
,
0
,
0
,
0
,
0
},{
1
,
0
,
0
,
0
,
0
,
2
,
1
,
0
,
0
,
0
,
3000
,
0
}};
OLED_ALL_DSD
Oled_Display_Info
=
{
3
,
0
,
3
,
0
,
0
,
0x1
5
,
0
,
0
,
0
,
0
,{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
},{
1
,
0
,
0
,
0
,
260
,
0
,
3
,
0
,
5
,
0
,
2
,
1
,
0
,
0
,
3000
,
0
,
0xff
,
0xff
,
0
},{
1
,
0
,
0
,
0
,
260
,
0
,
2
,
0
,
0
,
0
,
0
,
0
},{
1
,
0
,
0
,
0
,
0
,
2
,
1
,
0
,
0
,
0
,
3000
,
0
}};
#endif
#endif
Key_Operation_Status
gKey_Press_Info
=
{
0
};
Key_Operation_Status
gKey_Press_Info
=
{
0
};
// .device_type = 1, //AIR_CONDITION
// .device_type = 1, //AIR_CONDITION
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment