增加按摩
This commit is contained in:
parent
51c390d3ec
commit
e48f760811
@ -3523,7 +3523,7 @@ DataFlash
|
||||
</Effect>
|
||||
</IICA0>
|
||||
<ProjectName Name="PrjName" Text="ECU_APP" />
|
||||
<ProjectPath Name="PrjPath" Text="E:\workspace\M20\CODE\APP" />
|
||||
<ProjectPath Name="PrjPath" Text="F:\work\M20\CODE\APP" />
|
||||
<ProjectKind Name="PrjKind" Text="Project78K0R" />
|
||||
<DeviceName Name="DeviceName" Fixed="" Text="RL78G12" />
|
||||
<MCUName Name="MCUName" Text="RL78G12_30pin" />
|
||||
|
@ -225,7 +225,7 @@
|
||||
</Effect>
|
||||
</IICA0>
|
||||
<ProjectName Name="PrjName" Text="ECU_APP" />
|
||||
<ProjectPath Name="PrjPath" Text="E:\workspace\M20\CODE\APP" />
|
||||
<ProjectPath Name="PrjPath" Text="F:\work\M20\CODE\APP" />
|
||||
<ProjectKind Name="PrjKind" Text="Project78K0R" />
|
||||
<DeviceName Name="DeviceName" Fixed="" Text="RL78G12" />
|
||||
<MCUName Name="MCUName" Text="RL78G12_30pin" />
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,16 +1,16 @@
|
||||
QualityReport
|
||||
2024年5月19日 19:52:40
|
||||
2024年5月19日 20:25:34
|
||||
|
||||
------ Start build(ECU_APP, DefaultBuild) ------
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe user\appTask.c -cpu=S2 -o DefaultBuild\appTask.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F103AA.DVF" -g -g_line -I . -I user -I DataFlash -c -msg_lang=english
|
||||
W0511106:The folder "DataFlash" specified by the "-I" option is not found.
|
||||
user\appTask.c(41):W0520177:Variable "temp" was declared but never referenced
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\rlink.exe -subcommand=DefaultBuild\ECU_APP.clnk
|
||||
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 28 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
|
||||
RAMDATA SECTION: 00000062 Byte(s)
|
||||
ROMDATA SECTION: 000000c7 Byte(s)
|
||||
PROGRAM SECTION: 00000b7a Byte(s)
|
||||
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 28 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
|
||||
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 59 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
|
||||
RAMDATA SECTION: 00000068 Byte(s)
|
||||
ROMDATA SECTION: 000000d7 Byte(s)
|
||||
PROGRAM SECTION: 00000c37 Byte(s)
|
||||
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 59 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
|
||||
Renesas Optimizing Linker Completed
|
||||
------ Build ended(Error:0, Warning:4)(ECU_APP, DefaultBuild) ------
|
||||
|
||||
@ -64,13 +64,13 @@ DefaultBuild\ECU_APP.clnk :
|
||||
|
||||
|
||||
--- SHA1 hash value of output files ---
|
||||
E:\workspace\M20\CODE\APP\DefaultBuild\ECU_APP.abs: 509887d9f4ba8fd498fc13455afeff80fa44f480
|
||||
E:\workspace\M20\CODE\APP\DefaultBuild\ECU_APP.mot: ef1a9987e3a9c8ac4c8804d103195c2eae6d16d3
|
||||
F:\work\M20\CODE\APP\DefaultBuild\ECU_APP.abs: 1fc1cca1a7f1a6d469041651f984dd0cb7dbd9e2
|
||||
F:\work\M20\CODE\APP\DefaultBuild\ECU_APP.mot: d24f11d93bb802db580a1092bdb817869473d90e
|
||||
|
||||
|
||||
--- System Information ---
|
||||
*OS Version
|
||||
Microsoft Windows 10 企业版 LTSC (-, 10.0.17763, WOW64)
|
||||
Microsoft Windows 10 企业版 LTSC (-, 10.0.19044, WOW64)
|
||||
*Language
|
||||
中文(中国)
|
||||
*.NET Framework Version
|
||||
@ -93,13 +93,13 @@ E:\workspace\M20\CODE\APP\DefaultBuild\ECU_APP.mot: ef1a9987e3a9c8ac4c8804d10319
|
||||
C:\Program Files (x86)\Renesas Electronics\CS+\CC
|
||||
*Memory Usage
|
||||
*Private Working Set
|
||||
267 MB
|
||||
292 MB
|
||||
*Number of GDI Objects
|
||||
2019
|
||||
2047
|
||||
*Number of USER Objects
|
||||
1011
|
||||
1161
|
||||
*Opened Files
|
||||
1 editors, 1 files, 5 KB
|
||||
3 editors, 3 files, 18 KB
|
||||
|
||||
--- Build Tool Plug-in Information ---
|
||||
RH850 Build tool CC-RH Plug-in
|
||||
@ -228,7 +228,7 @@ Device Information Common Interface
|
||||
DeviceInformation.dll
|
||||
|
||||
--- Main Project Information ---
|
||||
E:\workspace\M20\CODE\APP\ECU_APP.mtpj
|
||||
F:\work\M20\CODE\APP\ECU_APP.mtpj
|
||||
Microcontroller Information
|
||||
*R5F103AA
|
||||
*File Name: Version
|
||||
|
@ -5,4 +5,78 @@
|
||||
#include "PINdef.h"
|
||||
#include "appTask.h"
|
||||
|
||||
static uint8_t amCtrl_state = 0,am_state_machine = 0;
|
||||
static uint16_t am_state_machine_counter = 0;
|
||||
const uint8_t am_state_machine_arr[3][3] = {
|
||||
//0,1,2
|
||||
{1,2,0},
|
||||
{2,0,1},
|
||||
{1,2,0},
|
||||
};
|
||||
|
||||
|
||||
void amCtrl_Init(void)
|
||||
{
|
||||
amCtrl_state = 0;
|
||||
am_state_machine_counter = 0;
|
||||
}
|
||||
|
||||
void amCtrl_SetState(uint8_t state)
|
||||
{
|
||||
amCtrl_state = state;
|
||||
}
|
||||
|
||||
void amCtrl_Task(void)//50ms
|
||||
{
|
||||
if (amCtrl_state == 0)
|
||||
{
|
||||
setPumpState(PUMP_OFF);
|
||||
am_state_machine = 0;
|
||||
am_state_machine_counter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
setPumpState(PUMP_ON);
|
||||
switch (am_state_machine)
|
||||
{
|
||||
case 0:
|
||||
setValveState(VALVE4,VALVE_ON);
|
||||
setValveState(VALVE5,VALVE_OFF);
|
||||
setValveState(VALVE6,VALVE_OFF);
|
||||
am_state_machine_counter++;
|
||||
if (am_state_machine_counter >= 20)
|
||||
{
|
||||
am_state_machine_counter = 0;
|
||||
am_state_machine = am_state_machine_arr[amCtrl_state][am_state_machine];
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
setValveState(VALVE4,VALVE_OFF);
|
||||
setValveState(VALVE5,VALVE_ON);
|
||||
setValveState(VALVE6,VALVE_OFF);
|
||||
am_state_machine_counter++;
|
||||
if (am_state_machine_counter >= 20)
|
||||
{
|
||||
am_state_machine_counter = 0;
|
||||
am_state_machine = am_state_machine_arr[amCtrl_state][am_state_machine];
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
setValveState(VALVE4,VALVE_OFF);
|
||||
setValveState(VALVE5,VALVE_OFF);
|
||||
setValveState(VALVE6,VALVE_ON);
|
||||
am_state_machine_counter++;
|
||||
if (am_state_machine_counter >= 20)
|
||||
{
|
||||
am_state_machine_counter = 0;
|
||||
am_state_machine = am_state_machine_arr[amCtrl_state][am_state_machine];
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -3,35 +3,9 @@
|
||||
|
||||
#include "r_cg_macrodriver.h"
|
||||
|
||||
#define MOTOR1 0
|
||||
#define MOTOR2 1
|
||||
#define MOTOR3 2
|
||||
#define MOTOR4 3
|
||||
#define MOTOR5 4
|
||||
#define MOTOR6 5
|
||||
void amCtrl_Task(void);
|
||||
void amCtrl_SetState(uint8_t state);
|
||||
void amCtrl_Init(void);
|
||||
|
||||
void OverCurrentPro(uint8_t ovmotor);
|
||||
void CurrentDetecte(void);
|
||||
void MotorCtrl(void);
|
||||
void HallDetecte(void);
|
||||
void MotorValueInit(void);
|
||||
|
||||
|
||||
void StartAutoCal(void);
|
||||
void StopAutoCal(void);
|
||||
|
||||
|
||||
|
||||
|
||||
void setMotorState(uint8_t motorid,uint8_t act);
|
||||
|
||||
void MotorMemoryKeyM1Press(void);
|
||||
void MotorMemoryKeyM1Release(void);
|
||||
void MotorMemoryKeyM2Press(void);
|
||||
void MotorMemoryKeyM2Release(void);
|
||||
void MotorMemoryKeyM3Press(void);
|
||||
void MotorMemoryKeyM3Release(void);
|
||||
void MotorMemoryKeyMMPress(void);
|
||||
void MotorMemoryKeyMMRelease(void);
|
||||
|
||||
#endif
|
||||
|
@ -28,7 +28,7 @@ uint8_t RxFlag=0;
|
||||
|
||||
const uint8_t fan_duty_arr[4] = {0,100,50,25};
|
||||
const uint8_t heat_duty_arr[4] = {0,80,65,50};
|
||||
static uint8_t heat_state=0,fan_state=0;
|
||||
static uint8_t heat_state=0,fan_state=0,amCtrl_state=0;
|
||||
|
||||
void Batt_State_Ctrl(void);
|
||||
void PowerDetect(void);
|
||||
@ -67,6 +67,7 @@ void Apply_task(void)
|
||||
{
|
||||
Timer_50ms_flag = 0;
|
||||
PowerDetect();
|
||||
amCtrl_Task();
|
||||
}
|
||||
if (Timer_1000ms_flag == 1)
|
||||
{
|
||||
@ -278,7 +279,7 @@ void HardWare_Init(void)
|
||||
void value_init(void)
|
||||
{
|
||||
|
||||
|
||||
amCtrl_Init();
|
||||
//MotorValueInit();
|
||||
}
|
||||
|
||||
@ -469,23 +470,39 @@ void MsgPro(uint8_t len)
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Rxdata[1])
|
||||
{
|
||||
case 0x0A:
|
||||
amCtrl_state = 1;
|
||||
break;
|
||||
case 0x0B:
|
||||
amCtrl_state = 2;
|
||||
break;
|
||||
|
||||
case 0x0C:
|
||||
amCtrl_state = 3;
|
||||
break;
|
||||
|
||||
case 0x0D:
|
||||
amCtrl_state = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (gIGN_State == 1 && battState == BattStatus_Normal)
|
||||
{
|
||||
SendTFJRmsg(fan_state,heat_state);
|
||||
setFanDuty(fan_duty_arr[fan_state]);
|
||||
setHeatDuty(heat_duty_arr[heat_state]);
|
||||
amCtrl_SetState(amCtrl_state);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
switch (Rxdata[2])
|
||||
{
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,12 @@ typedef enum {
|
||||
|
||||
#define KEY_NUM 5
|
||||
|
||||
#define PUMP_ON 1
|
||||
#define PUMP_OFF 0
|
||||
|
||||
#define VALVE_ON 1
|
||||
#define VALVE_OFF 0
|
||||
|
||||
|
||||
|
||||
|
||||
@ -47,7 +53,7 @@ uint8_t GetKeyState(uint8_t keyno);
|
||||
uint8_t getKeyReleaseFlag(uint8_t id);
|
||||
uint8_t getKeyPressFlag(uint8_t id);
|
||||
uint8_t GetIOState(uint8_t keyno);
|
||||
|
||||
void setPumpState(uint8_t state);
|
||||
void setValveState(uint8_t valve_id,uint8_t state);
|
||||
void setHeatDuty(uint8_t duty);
|
||||
void setFanDuty(uint8_t duty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user