Commit c4090e9e authored by 王佳伟's avatar 王佳伟

feat:硕上传

parent 0ed24376
This diff is collapsed.
...@@ -348,7 +348,8 @@ INT16U direction_espeed = 1; ...@@ -348,7 +348,8 @@ INT16U direction_espeed = 1;
INT16U kseenSeven = 0; INT16U kseenSeven = 0;
INT16U speed_count = 0; INT16U speed_count = 0;
INT16U water_temp[]= {55,65,75,85,95,119,125}; INT16U water_temp[]= {55,65,75,85,95,119,125};
interrupt void Api_RTC_isr(void) INT16U time_3s = 0;
interrupt void Api_RTC_isr(void)
{ {
RT_10ms++; RT_10ms++;
...@@ -369,83 +370,11 @@ interrupt void Api_RTC_isr(void) ...@@ -369,83 +370,11 @@ interrupt void Api_RTC_isr(void)
if(pSB2 == 0){ if(pSB2 == 0){
Key.PushTime_2++; Key.PushTime_2++;
} }
if(count_flag_a==1) if(RT_10ms >= 10){
{ if(Key.CAN_Step>9||Key.CAN_Step<1)
a++;
if(a>=300)
{
if(direction_speed == 1)
{
speed_count++;
if(speed_count>199)
{
direction_speed = 0;
}
}
else
{
speed_count--;
if(speed_count < 1)
{
direction_speed = 1;
}
}
c++;
if(c>4)
{
c = 0;
i++;
if(i>=11)
{
i = 0;
if(direction_water==1)
{
j++;
if(j>6)
{
direction_water = 0;
}
}
else
{
j--;
if(j==1)
{
direction_water = 1;
}
}
}
if(direction_espeed==1)
{
k++;
if(k>12)
{
direction_espeed = 0;
}
}
else
{
k--;
if(k==2)
{ {
direction_espeed = 1; Key.CAN_Step = 1;
}
}
}
water_value = water_temp[j-1];
speed_value = speed_count;
Key.CAN_Step = k-1;
a = 0;
}
} }
if(RT_10ms >= 10){
RT_10ms_En = 1; RT_10ms_En = 1;
RT_10ms = null; RT_10ms = null;
} }
...@@ -489,22 +418,18 @@ interrupt void Api_RTC_isr(void) ...@@ -489,22 +418,18 @@ interrupt void Api_RTC_isr(void)
if(RT_1s >= T_1s){ if(RT_1s >= T_1s){
RT_1s_En = 1; RT_1s_En = 1;
RT_1s = null; if(Key_Dodging_flag==0)
} {
time_3s++;
if(Key.StepAuto == 1){ if(time_3s>2)
if(RT_2s >= T_2s){ {
RT_2s = null; time_3s = 0;
Key.CAN_Step++;
//Key.CAN_Step++;
} }
} }
else RT_1s = null;
{
RT_2s = null;
} }
Timer_1ms_Base(); Timer_1ms_Base();
if(Clock.TEnable0) if(Clock.TEnable0)
......
This diff is collapsed.
...@@ -40,7 +40,7 @@ typedef struct{ ...@@ -40,7 +40,7 @@ typedef struct{
enum enum
{ {
ENUM_VSpeed = 0,//锟斤拷锟斤拷 ENUM_VSpeed = 0,//锟斤拷锟斤拷
ENUM_RSpeed ,//�??�?? ENUM_RSpeed ,//锟???锟???
ENUM_WaterTemp ,// 娓╁害 ENUM_WaterTemp ,// 娓╁害
TCS_Warning_Lamp ,//鍓嶈疆鑳庡帇 TCS_Warning_Lamp ,//鍓嶈疆鑳庡帇
TCS_Work_Mode ,//鍚庤疆鑳庡帇 TCS_Work_Mode ,//鍚庤疆鑳庡帇
...@@ -68,7 +68,7 @@ static const s_CAN_List CAN_List[] = ...@@ -68,7 +68,7 @@ static const s_CAN_List CAN_List[] =
}; };
extern unsigned int Key_Dodging_flag;
extern unsigned int lost_flag; extern unsigned int lost_flag;
extern unsigned int CAN_init_flag; extern unsigned int CAN_init_flag;
extern unsigned int water_value; extern unsigned int water_value;
......
OPEN source 0 0 60 39 OPEN source 0 0 60 70
Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
OPEN assembly 60 0 40 31 OPEN assembly 60 0 40 31
Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0xC054 Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0x49F8
OPEN procedure 0 39 60 17 OPEN procedure 0 39 60 17
Procedure < attributes VALUES on,TYPES off Procedure < attributes VALUES on,TYPES off
OPEN register 60 31 40 25 OPEN register 60 31 40 25
......
...@@ -8,7 +8,6 @@ void main(void) { ...@@ -8,7 +8,6 @@ void main(void) {
unsigned char i; unsigned char i;
step_cycle = 0; step_cycle = 0;
count_flag_a = 0;
Api_Sys_Init(); Api_Sys_Init();
App_State_Init(); App_State_Init();
App_Load_Data(); App_Load_Data();
......
...@@ -10,7 +10,7 @@ Target=TBDML ...@@ -10,7 +10,7 @@ Target=TBDML
Layout=C_layout.hwl Layout=C_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
CPU=HC12 CPU=HC12
MainFrame=0,1,-1,-1,-1,-1,508,143,1438,860 MainFrame=0,1,-1,-1,-1,-1,412,144,1341,862
TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806 TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
AEFWarningDialog=FALSE AEFWarningDialog=FALSE
Configuration=TBDML.hwc Configuration=TBDML.hwc
...@@ -65,14 +65,14 @@ NV_AUTO_ID=1 ...@@ -65,14 +65,14 @@ NV_AUTO_ID=1
[Recent Applications File List] [Recent Applications File List]
File0=D:\GIT\일뺏憩\列떴쇱꿎憩\Test_Bench\bin\Project.abs.s19 File0=E:\일뺏憩\긍陋匡숭\750va_key_9_6.s19
File1=C:\Users\葺屢퓻\Desktop\莖團일뺏憩\Project.abs.s19 File1=E:\일뺏憩\긍陋匡숭\750va_Can_AllLight.s19
File2=D:\TYW1\列떴쇱꿎憩\Test_Bench\bin\Project.abs File2=E:\일뺏憩\750va일뺏憩\Project.abs.s19
File3=C:\Users\葺屢퓻\Desktop\TYW\列떴쇱꿎憩\Test_Bench\bin\Project.abs File3=D:\GIT\일뺏憩\列떴쇱꿎憩\Test_Bench\bin\Project.abs.s19
LoadFlags0=CODEONLY AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags0=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags1=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags1=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags2=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags2=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
LoadFlags3=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main" LoadFlags3=CODEONLY AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
[Recent Layout File List] [Recent Layout File List]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment