Commit b81bc075 authored by 陈家乐's avatar 陈家乐

feat:增加手动功能

parent 17e9578a
......@@ -15,7 +15,7 @@ INT16U RT_10ms = 0,
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer1
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -29,7 +29,7 @@ void Api_SetTimer0(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : API_TimerOver
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -50,7 +50,7 @@ INT8U Api_TimerOver0(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer1
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -64,7 +64,7 @@ void Api_SetTimer1(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : API_TimerOver
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -85,7 +85,7 @@ INT8U Api_TimerOver1(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer1
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -99,7 +99,7 @@ void Api_SetTimer2(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : API_TimerOver
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -120,7 +120,7 @@ INT8U Api_TimerOver2(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer3
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -134,7 +134,7 @@ void Api_SetTimer3(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_TimerOver3
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -155,7 +155,7 @@ INT8U Api_TimerOver3(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer4
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -169,7 +169,7 @@ void Api_SetTimer4(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_TimerOver4
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -190,7 +190,7 @@ INT8U Api_TimerOver4(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer5
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -204,7 +204,7 @@ void Api_SetTimer5(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_TimerOver5
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -225,7 +225,7 @@ INT8U Api_TimerOver5(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer6
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -239,7 +239,7 @@ void Api_SetTimer6(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_TimerOver5
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -260,7 +260,7 @@ INT8U Api_TimerOver6(ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_SetTimer7
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -274,7 +274,7 @@ void Api_SetTimer7(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_TimerOver7
* Description : 设置定时器
* Description : ���ö�ʱ��
* Input :
* Output : None
* Return : None
......@@ -296,7 +296,7 @@ INT8U Api_TimerOver7(ClockType *T)
/*-------------------------------------------------------------------------
* Function Name : Api_SetAutoTimer
* Description : 设置自动切换定时器
* Description : �����Զ��л���ʱ��
* Input :
* Output : None
* Return : None
......@@ -310,7 +310,7 @@ void Api_SetAutoTimer(INT16U Second,ClockType *T)
}
/*-------------------------------------------------------------------------
* Function Name : Api_AutoTimerOver
* Description : 设置自动切换定时器
* Description : �����Զ��л���ʱ��
* Input :
* Output : None
* Return : None
......@@ -441,7 +441,7 @@ interrupt void Api_RTC_isr(void)
speed_value = speed_count;
Key.CAN_Step = k-1;
//Key.CAN_Step = k-1;
a = 0;
}
}
......@@ -496,7 +496,11 @@ interrupt void Api_RTC_isr(void)
if(RT_2s >= T_2s){
RT_2s = null;
//Key.CAN_Step++;
Key.CAN_Step++;
if(Key.CAN_Step > 10)
{
Key.CAN_Step = 1;
}
}
}
else
......
......@@ -2,7 +2,7 @@
#include "../App_Headers/includes.h"
#include "../Library/TimeCtrl.h"
#define STEP_MAX 34//����
#define STEP_MAX 10//34//����
void All_Lamp_TurnOn(void);
......@@ -45,28 +45,28 @@ void APP_Button_Proc(void){
}*/
if((Key.PushTime_2 > T_2s) || (Key.PushTime_1 > T_2s)){
Key.StepAuto = 1;
Key.StepAuto = Key.StepAuto==1 ? 0 : 1;
}
if(pSB1 == 1){
if((Key.PushTime_1 > T_50ms) && (!Key.StepAuto)){
count_flag_a = 1;
// Key.CAN_Step++;
// if(Key.CAN_Step > STEP_MAX){
// Key.CAN_Step = 0;
// }
//count_flag_a = 1;
Key.CAN_Step++;
if(Key.CAN_Step > STEP_MAX){
Key.CAN_Step = 1;
}
}
Key.PushTime_1 = null;
}
if(pSB2 == 1){
if((Key.PushTime_2 > T_50ms) && (!Key.StepAuto)){
count_flag_a = 0;
// if(Key.CAN_Step > 0){
// Key.CAN_Step--;
// }else{
// Key.CAN_Step = STEP_MAX;
// }
//count_flag_a = 0;
if(Key.CAN_Step > 0){
Key.CAN_Step--;
}else{
Key.CAN_Step = STEP_MAX;
}
}
Key.PushTime_2 = null;
}
......@@ -97,7 +97,7 @@ void APP_ICM_Proc(void) /*zh321*/ /*FS04*/
// CAN_lost_flag = 0;
// }
CurValueStr[MMCU_PowerMode ].val = 2;
if(count_flag_a==1)
//if(count_flag_a==1)
{//Format_CAN_Msg();
......@@ -110,6 +110,15 @@ void APP_ICM_Proc(void) /*zh321*/ /*FS04*/
// CurValueStr[ ].val = ;
case 1:
{
CurValueStr[BMCU_Moto1_Locked_RotorFault ].val = 0; //刀盘过载
CurValueStr[MMCU_SeatDetectState ].val = 0; //座椅检测
CurValueStr[MBMS_TOTALSigAcc ].val = 0; //钥匙接入
CurValueStr[MBMS_TOTALSigCharg ].val = 0; //充电指示灯
CurValueStr[MMCU_PowerMode ].val = 2; // READY灯 充电灯和ready冲突
CurValueStr[BMCU_PTOSwicthState ].val = 0;
//CurValueStr[ENUM_VSpeed ].val
CurValueStr[MBMS_Soc1 ].val = 10;
CurValueStr[MBMS_Soc2 ].val = 10;
......@@ -269,7 +278,8 @@ void APP_ICM_Proc(void) /*zh321*/ /*FS04*/
}break;
}
}else
}
//else
{
//Disable_CAN_Tx();
}
......
......@@ -10,7 +10,7 @@ Target=USBDM
Layout=C_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
CPU=HC12
MainFrame=0,1,-1,-1,-1,-1,1398,-920,2550,-255
MainFrame=0,1,-1,-1,-1,-1,1368,-956,2520,-291
TOOLBAR=57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
AEFWarningDialog=FALSE
......
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