Merge branch 'master' of http://ikuai.hua-hua.cn:3000/huahua/P417_SWTR
This commit is contained in:
commit
75537cb34c
@ -1,13 +1,13 @@
|
||||
#
|
||||
#Sat Sep 14 09:55:06 CST 2024
|
||||
#Sat Sep 28 18:59:32 CST 2024
|
||||
mcal.com-microchip-mplab-nbide-toolchain-xc32-XC32LanguageToolchain.md5=1eaf555a844840d91945cb14109201c3
|
||||
conf.ids=mcal
|
||||
mcal.languagetoolchain.version=4.10
|
||||
host.id=124p-5vo2-40
|
||||
configurations-xml=3c603a65e149702643d6cf2071da16f0
|
||||
mcal.Pack.dfplocation=E\:\\Program Files\\Microchip\\MPLABX\\v6.20\\packs\\Microchip\\SAME51_DFP\\3.7.242
|
||||
mcal.languagetoolchain.version=4.40
|
||||
host.id=32xa-mutq-k1
|
||||
configurations-xml=7fdab7bbeb77e28da32352067380d4c4
|
||||
mcal.Pack.dfplocation=C\:\\Program Files\\Microchip\\MPLABX\\v6.20\\packs\\Microchip\\SAME51_DFP\\3.7.242
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=f612087c95360c842296d189edfe3321
|
||||
proj.dir=F\:\\FCB_project\\P417\\CODE\\20240727HW06\\P417_SWTR\\firmware\\p417_SWTR.X
|
||||
proj.dir=E\:\\workspace\\P417\\P417\\code\\20240727HW06SW0401\\P417_SWTR\\firmware\\p417_SWTR.X
|
||||
mcal.platformTool.md5=null
|
||||
mcal.languagetoolchain.dir=E\:\\Program Files\\Microchip\\xc32\\v4.10\\bin
|
||||
mcal.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc32\\v4.40\\bin
|
||||
host.platform=windows
|
||||
|
@ -15,24 +15,24 @@
|
||||
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
|
||||
#
|
||||
SHELL=cmd.exe
|
||||
PATH_TO_IDE_BIN=E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
||||
PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/
|
||||
# Adding MPLAB X bin directory to path.
|
||||
PATH:=E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
||||
PATH:=C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
|
||||
# Path to java used to run MPLAB X when this makefile was created
|
||||
MP_JAVA_PATH="E:\Program Files\Microchip\MPLABX\v6.20\sys\java\zulu8.64.0.19-ca-fx-jre8.0.345-win_x64/bin/"
|
||||
MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\v6.20\sys\java\zulu8.64.0.19-ca-fx-jre8.0.345-win_x64/bin/"
|
||||
OS_CURRENT="$(shell uname -s)"
|
||||
MP_CC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-gcc.exe"
|
||||
MP_CPPC="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-g++.exe"
|
||||
MP_CC="C:\Program Files\Microchip\xc32\v4.40\bin\xc32-gcc.exe"
|
||||
MP_CPPC="C:\Program Files\Microchip\xc32\v4.40\bin\xc32-g++.exe"
|
||||
# MP_BC is not defined
|
||||
MP_AS="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-as.exe"
|
||||
MP_LD="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ld.exe"
|
||||
MP_AR="E:\Program Files\Microchip\xc32\v4.10\bin\xc32-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "E:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||
MP_CPPC_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||
MP_AS="C:\Program Files\Microchip\xc32\v4.40\bin\xc32-as.exe"
|
||||
MP_LD="C:\Program Files\Microchip\xc32\v4.40\bin\xc32-ld.exe"
|
||||
MP_AR="C:\Program Files\Microchip\xc32\v4.40\bin\xc32-ar.exe"
|
||||
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/v6.20/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
|
||||
MP_CC_DIR="C:\Program Files\Microchip\xc32\v4.40\bin"
|
||||
MP_CPPC_DIR="C:\Program Files\Microchip\xc32\v4.40\bin"
|
||||
# MP_BC_DIR is not defined
|
||||
MP_AS_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||
MP_LD_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||
MP_AR_DIR="E:\Program Files\Microchip\xc32\v4.10\bin"
|
||||
CMSIS_DIR=E:/Program Files/Microchip/MPLABX/v6.20/packs/arm/CMSIS/5.4.0
|
||||
DFP_DIR=E:/Program Files/Microchip/MPLABX/v6.20/packs/Microchip/SAME51_DFP/3.7.242
|
||||
MP_AS_DIR="C:\Program Files\Microchip\xc32\v4.40\bin"
|
||||
MP_LD_DIR="C:\Program Files\Microchip\xc32\v4.40\bin"
|
||||
MP_AR_DIR="C:\Program Files\Microchip\xc32\v4.40\bin"
|
||||
CMSIS_DIR=C:/Program Files/Microchip/MPLABX/v6.20/packs/arm/CMSIS/5.4.0
|
||||
DFP_DIR=C:/Program Files/Microchip/MPLABX/v6.20/packs/Microchip/SAME51_DFP/3.7.242
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -480,7 +480,7 @@
|
||||
<targetPluginBoard></targetPluginBoard>
|
||||
<platformTool>noID</platformTool>
|
||||
<languageToolchain>XC32</languageToolchain>
|
||||
<languageToolchainVersion>4.10</languageToolchainVersion>
|
||||
<languageToolchainVersion>4.40</languageToolchainVersion>
|
||||
<platform>3</platform>
|
||||
</toolsSet>
|
||||
<packs>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<confs>
|
||||
<conf name="mcal" type="2">
|
||||
<platformToolSN>noToolString</platformToolSN>
|
||||
<languageToolchainDir>E:\Program Files\Microchip\xc32\v4.10\bin</languageToolchainDir>
|
||||
<languageToolchainDir>C:\Program Files\Microchip\xc32\v4.40\bin</languageToolchainDir>
|
||||
<mdbdebugger version="1">
|
||||
<placeholder1>place holder 1</placeholder1>
|
||||
<placeholder2>place holder 2</placeholder2>
|
||||
|
@ -971,8 +971,7 @@ void RTE_Set_ACT_Vibration(uint8_t Sts)
|
||||
// Output CAN
|
||||
void RTE_Set_CAN_RiMFctActSgCe(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -981,8 +980,7 @@ void RTE_Set_CAN_RiMFctActSgCe(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_RiMFctActSgDn(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -991,8 +989,7 @@ void RTE_Set_CAN_RiMFctActSgDn(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_RiMFctActSgLe(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1001,8 +998,7 @@ void RTE_Set_CAN_RiMFctActSgLe(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_RiMFctActSgRi(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1011,8 +1007,7 @@ void RTE_Set_CAN_RiMFctActSgRi(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_RiMFctActSgUp(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1021,8 +1016,7 @@ void RTE_Set_CAN_RiMFctActSgUp(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_SteerWhlTouchBdVoice(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1066,8 +1060,7 @@ void RTE_Set_CAN_DiagcFailrTouchPanSWTRSnsrFltSts(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_SteerWhlTouchBdMenu(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1076,8 +1069,7 @@ void RTE_Set_CAN_SteerWhlTouchBdMenu(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_SteerWhlTouchBdDn(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1098,8 +1090,7 @@ void RTE_Set_CAN_SteerWhlTouchBdRiCntr(uint8_t Value)
|
||||
uint8_t g_last_SteerWhlTouchBdSts = BUTTON_RELEASE;
|
||||
void RTE_Set_CAN_SteerWhlTouchBdRiSteerWhlTouchBdSts(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1114,8 +1105,7 @@ void RTE_Set_CAN_SteerWhlTouchBdRiSteerWhlTouchBdSts(uint8_t Value)
|
||||
|
||||
void RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
@ -1124,8 +1114,7 @@ void RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnX(uint8_t Value)
|
||||
}
|
||||
void RTE_Set_CAN_SteerWhlTouchBdRiTouchPosnY(uint8_t Value)
|
||||
{
|
||||
uint16_t Press_signal = Get_forcedetect_force_value();
|
||||
if (Press_signal < 50 || Press_signal >= 2048)
|
||||
if (Get_forcedetect_allowed_send_flag() == 0)
|
||||
{
|
||||
Value = 0;
|
||||
}
|
||||
|
@ -15,7 +15,8 @@ extern forcesnsr_RxReg_un_type forcesnsr_reg_state_un_bak;
|
||||
static volatile STATE_UINT8 forcedetect_btn_val;
|
||||
detectforce_Reg_Cfg_Main_Str_typ detectforce_Reg_Str;
|
||||
|
||||
|
||||
static uint8_t press_allowed_send_signal_flag = 0;
|
||||
static uint16_t send_signal_flag_count = 0;
|
||||
/***************************static function define end ************************************/
|
||||
/*combind 8bit and 4bit data to uint16
|
||||
*/
|
||||
@ -72,6 +73,23 @@ void forcedetect_MainTask(void)
|
||||
{
|
||||
detectforce_Reg_Str.btn_state = FALSE;
|
||||
}
|
||||
|
||||
if (detectforce_Reg_Str.raw > 50 && detectforce_Reg_Str.raw < 2048)
|
||||
{
|
||||
press_allowed_send_signal_flag = 1;
|
||||
send_signal_flag_count = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (send_signal_flag_count < 50)//2ms*50
|
||||
{
|
||||
send_signal_flag_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
press_allowed_send_signal_flag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -110,3 +128,7 @@ STATE_UINT8 Get_forcedetect_preload_value(void)
|
||||
return detectforce_Reg_Str.preload;
|
||||
}
|
||||
|
||||
STATE_UINT8 Get_forcedetect_allowed_send_flag(void)
|
||||
{
|
||||
return press_allowed_send_signal_flag;
|
||||
}
|
||||
|
@ -63,6 +63,8 @@ extern STATE_UINT8 Get_forcedetect_SNSERR_value(void);
|
||||
|
||||
extern STATE_UINT8 Get_forcedetect_preload_value(void);
|
||||
|
||||
extern STATE_UINT8 Get_forcedetect_allowed_send_flag(void);
|
||||
|
||||
/***************************extern function end************************************/
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user