第一次提交计算机温控
This commit is contained in:
330
User.c.bak
Normal file
330
User.c.bak
Normal file
@@ -0,0 +1,330 @@
|
||||
#include "MAIN.H"
|
||||
//can<61><6E>Ϣ
|
||||
UnInfCan UnInfCan_1 = {0};
|
||||
UnSwSample UnSwSample_1 = {0};
|
||||
UnSwOut UnSwOut_1 = {0};
|
||||
|
||||
//CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uword CntCan_1 = 0;
|
||||
bit FlgCan_1 = 0;
|
||||
//<2F><>һ<EFBFBD>βɼ<CEB2><C9BC><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>ָʾ
|
||||
bit FlgOneTime = 0;
|
||||
|
||||
uword RgCanPerid = 1000;
|
||||
|
||||
//PWM 20181227
|
||||
ubyte PwmH[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
//-----------------------------------------------------------------------
|
||||
//RTC<54><43>ʱ<EFBFBD><CAB1>
|
||||
//-----------------------------------------------------------------------
|
||||
void RTCProcess(void)
|
||||
{
|
||||
//************************************************************************
|
||||
//////CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if(FlgCan_1){CntCan_1++;if(CntCan_1 >= RgCanPerid){FlgCan_1=0; CntCan_1=0;}}else{CntCan_1=0;}
|
||||
|
||||
//************************************************************************
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>PWM 20181227
|
||||
/*
|
||||
ubyte *pStt, ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
bit Cmd, ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD>룬1<EBA3AC><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PwmH<6D><48>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
||||
bit Out, ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ubyte *pCnt, <09><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ubyte *pPwmH ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PWM<57>ĸߵ<C4B8>ƽʱ<C6BD><CAB1>
|
||||
*/
|
||||
bit funcPwmOut(ubyte *pStt,bit Cmd,ubyte *pCnt,ubyte *pPwmH)
|
||||
{
|
||||
ubyte PwmL = 0;
|
||||
bit Out = 0;
|
||||
//------------------------------------------------------------------------------------------------
|
||||
if((*pPwmH) > dfPwmH)(*pPwmH) = dfPwmH; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
PwmL = dfPwmH - (*pPwmH);//<2F><><EFBFBD><EFBFBD>PWM<57>͵<EFBFBD>ƽ
|
||||
|
||||
if((1 == Cmd) )
|
||||
{
|
||||
if(0 == (*pPwmH)) //<2F>ߵ<EFBFBD>ƽΪ0<CEAA><30><EFBFBD><EFBFBD>ʾPWM<57><4D>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>Cmd<6D><64><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>CmdΪ1<CEAA><31><EFBFBD><EFBFBD>1<EFBFBD><31>CmdΪ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0
|
||||
{
|
||||
Out = 1;
|
||||
(*pStt) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch((*pStt))
|
||||
{
|
||||
case 0:
|
||||
(*pCnt) = 0;
|
||||
(*pStt) = 1;
|
||||
Out = 1;
|
||||
break;
|
||||
case 1:
|
||||
if((*pCnt) >= (*pPwmH))
|
||||
{
|
||||
(*pCnt) = 0;
|
||||
(*pStt) = 2;
|
||||
Out = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
(*pCnt)++;
|
||||
(*pStt) = 1;
|
||||
Out = 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if((*pCnt) >= PwmL)
|
||||
{
|
||||
(*pCnt) = 0;
|
||||
(*pStt) = 1;
|
||||
Out = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
(*pCnt)++;
|
||||
(*pStt) = 2;
|
||||
Out = 0;
|
||||
}
|
||||
break;
|
||||
//-----------------------------------------------------
|
||||
default:;
|
||||
}//switch
|
||||
}//else
|
||||
}//if
|
||||
else
|
||||
{
|
||||
Out = 0;
|
||||
(*pStt) = 0;
|
||||
}
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD>ݽ<EFBFBD><DDBD>յ<EFBFBD>CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>̣ţ<CCA3>ָʾ<D6B8>ơ<EFBFBD>
|
||||
void LedDr(void)
|
||||
{
|
||||
static ubyte RgSTT[16] = {0};
|
||||
static ubyte CntTime[16] = {0};
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
dfOut_01 = funcPwmOut(&RgSTT[0 ],dfCmd_01,&CntTime[0 ],&PwmH[0 ]);
|
||||
dfOut_02 = funcPwmOut(&RgSTT[1 ],dfCmd_02,&CntTime[1 ],&PwmH[1 ]);
|
||||
dfOut_03 = funcPwmOut(&RgSTT[2 ],dfCmd_03,&CntTime[2 ],&PwmH[2 ]);
|
||||
dfOut_04 = funcPwmOut(&RgSTT[3 ],dfCmd_04,&CntTime[3 ],&PwmH[3 ]);
|
||||
dfOut_05 = funcPwmOut(&RgSTT[4 ],dfCmd_05,&CntTime[4 ],&PwmH[4 ]);
|
||||
dfOut_06 = funcPwmOut(&RgSTT[5 ],dfCmd_06,&CntTime[5 ],&PwmH[5 ]);
|
||||
dfOut_07 = funcPwmOut(&RgSTT[6 ],dfCmd_07,&CntTime[6 ],&PwmH[6 ]);
|
||||
dfOut_08 = funcPwmOut(&RgSTT[7 ],dfCmd_08,&CntTime[7 ],&PwmH[7 ]);
|
||||
dfOut_09 = funcPwmOut(&RgSTT[8 ],dfCmd_09,&CntTime[8 ],&PwmH[8 ]);
|
||||
dfOut_10 = funcPwmOut(&RgSTT[9 ],dfCmd_10,&CntTime[9 ],&PwmH[9 ]);
|
||||
dfOut_11 = funcPwmOut(&RgSTT[10],dfCmd_11,&CntTime[10],&PwmH[10]);
|
||||
dfOut_12 = funcPwmOut(&RgSTT[11],dfCmd_12,&CntTime[11],&PwmH[11]);
|
||||
dfOut_13 = funcPwmOut(&RgSTT[12],dfCmd_13,&CntTime[12],&PwmH[12]);
|
||||
dfOut_14 = funcPwmOut(&RgSTT[13],dfCmd_14,&CntTime[13],&PwmH[13]);
|
||||
dfOut_15 = funcPwmOut(&RgSTT[14],dfCmd_15,&CntTime[14],&PwmH[14]);
|
||||
dfOut_16 = funcPwmOut(&RgSTT[15],dfCmd_16,&CntTime[15],&PwmH[15]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//can<61><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void CanErrorProcess(void)
|
||||
{
|
||||
ubyte ubNSRL;
|
||||
ubyte ubNSRH;
|
||||
ubyte ubResetLEC = 0x3F;
|
||||
//-------------------------------------------
|
||||
EA = 0;
|
||||
|
||||
CAN_pushAMRegs(); // push the CAN Access Mediator Registers
|
||||
SFR_PAGE(_su0, SST0); // switch to page 0
|
||||
|
||||
CAN_vWriteCANAddress(CAN_NSR0);
|
||||
CAN_vReadEN();
|
||||
ubNSRL = CAN_DATA0;
|
||||
ubNSRH = CAN_DATA1;
|
||||
if (ubNSRL & 0x20) // if ALERT
|
||||
{
|
||||
CAN_vInit();
|
||||
}
|
||||
if (ubNSRL & 0x07) // if LEC
|
||||
{
|
||||
ubResetLEC = 0x38;
|
||||
}
|
||||
//// Reset LEC, TXOK, RXOK, ALERT, EWRN, BOFF, LLE, LOE (if set)
|
||||
CAN_vWriteCANAddress(CAN_NSR0); // Addressing CAN_NSR0
|
||||
CAN_DATA0 = ~(ubNSRL & ubResetLEC); // load CAN_NSR0 status register[7-0]
|
||||
CAN_DATA1 = ~(ubNSRH); // load CAN_NSR0 status register[15-8]
|
||||
CAN_vWriteEN(D0_VALID+D1_VALID); // Data0 and Data1 are Valid for
|
||||
|
||||
SFR_PAGE(_su0, RST0); // restore the old SCU page
|
||||
CAN_popAMRegs(); // restore the CAN Access Mediator Registers
|
||||
|
||||
EA = 1;
|
||||
}
|
||||
|
||||
|
||||
////Ч<><D0A7><EFBFBD>㷨
|
||||
//void Password(void)
|
||||
//{
|
||||
// ubyte i;
|
||||
////---------------------------------
|
||||
// for(i=0;i<5;i++)
|
||||
// {
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][3];//CAN <20><>0<EFBFBD><30><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][2];//CAN <20><>1<EFBFBD><31><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][1];//CAN <20><>2<EFBFBD><32><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][0];//CAN <20><>3<EFBFBD><33><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][7];//CAN <20><>4<EFBFBD><34><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][6];//CAN <20><>5<EFBFBD><35><EFBFBD>ֽ<EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][4] ^= UnInfCan_1.ArrData.Arr[0][5];//CAN <20><>6<EFBFBD><36><EFBFBD>ֽ<EFBFBD>
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
void CanTransmit(void)
|
||||
{
|
||||
// ulong i;
|
||||
//----------------- --------
|
||||
CAN_waitTransmit(DF_SwTx);//<2F><><EFBFBD><EFBFBD>ǰ<EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD>һ֡<D2BB><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᶪ֡
|
||||
// Password();
|
||||
|
||||
CAN_vLoadData(DF_SwTx, (ulong *)(&UnInfCan_1.ArrData.Arr[0][0])); // װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CAN_vTransmit(DF_SwTx);
|
||||
}
|
||||
|
||||
|
||||
//CAN<41><4E><EFBFBD><EFBFBD>һ֡
|
||||
void CanTX(void)
|
||||
{
|
||||
//-----------------------------------
|
||||
if(1 == SwOut09)UnInfCan_1.ArrData.Arr[0][3] |= (~0x01);else UnInfCan_1.ArrData.Arr[0][3] &= 0x01; //KGF1 //20200303<30><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>Ϊһ<CEAA><D2BB>
|
||||
if(1 == SwOut10)UnInfCan_1.ArrData.Arr[0][3] |= (~0x02);else UnInfCan_1.ArrData.Arr[0][3] &= 0x02; //KGF2
|
||||
if(1 == SwOut04)UnInfCan_1.ArrData.Arr[0][3] |= (~0x04);else UnInfCan_1.ArrData.Arr[0][3] &= 0x04; //KGF3
|
||||
if(1 == SwOut03)UnInfCan_1.ArrData.Arr[0][3] |= (~0x08);else UnInfCan_1.ArrData.Arr[0][3] &= 0x08; //KGF4
|
||||
if(1 == SwOut06)UnInfCan_1.ArrData.Arr[0][3] |= (~0x10);else UnInfCan_1.ArrData.Arr[0][3] &= 0x10; //KGF5
|
||||
if(1 == SwOut05)UnInfCan_1.ArrData.Arr[0][3] |= (~0x20);else UnInfCan_1.ArrData.Arr[0][3] &= 0x20; //KGF6
|
||||
if(1 == SwOut15)UnInfCan_1.ArrData.Arr[0][3] |= (~0x40);else UnInfCan_1.ArrData.Arr[0][3] &= 0x40; //KGF7
|
||||
if(1 == SwOut16)UnInfCan_1.ArrData.Arr[0][3] |= (~0x80);else UnInfCan_1.ArrData.Arr[0][3] &= 0x80; //KGF8
|
||||
if(1 == SwOut13)UnInfCan_1.ArrData.Arr[0][2] |= (~0x01);else UnInfCan_1.ArrData.Arr[0][2] &= 0x01; //KGF9
|
||||
if(1 == SwOut14)UnInfCan_1.ArrData.Arr[0][2] |= (~0x02);else UnInfCan_1.ArrData.Arr[0][2] &= 0x02; //KGF10
|
||||
if(1 == SwOut08)UnInfCan_1.ArrData.Arr[0][2] |= (~0x04);else UnInfCan_1.ArrData.Arr[0][2] &= 0x04; //KGF11
|
||||
if(1 == SwOut07)UnInfCan_1.ArrData.Arr[0][2] |= (~0x08);else UnInfCan_1.ArrData.Arr[0][2] &= 0x08; //KGF12
|
||||
if(1 == SwOut02)UnInfCan_1.ArrData.Arr[0][2] |= (~0x10);else UnInfCan_1.ArrData.Arr[0][2] &= 0x10; //KGF13
|
||||
if(1 == SwOut01)UnInfCan_1.ArrData.Arr[0][2] |= (~0x20);else UnInfCan_1.ArrData.Arr[0][2] &= 0x20; //KGF14
|
||||
if(1 == SwOut11)UnInfCan_1.ArrData.Arr[0][2] |= (~0x40);else UnInfCan_1.ArrData.Arr[0][2] &= 0x40; //KGF15
|
||||
if(1 == SwOut12)UnInfCan_1.ArrData.Arr[0][2] |= (~0x80);else UnInfCan_1.ArrData.Arr[0][2] &= 0x80; //KGF16
|
||||
|
||||
if(1 == SwIn01 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x01);else UnInfCan_1.ArrData.Arr[0][1] |= 0x01; //Dia01 20200225<32><EFBFBD>Ϊ0<CEAA><30><EFBFBD>ݱ<EFBFBD>Ϊ1,1<><31><EFBFBD>ݱ<EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CPU<50><55><EFBFBD>㴦<EFBFBD><E3B4A6>
|
||||
if(1 == SwIn02 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x02);else UnInfCan_1.ArrData.Arr[0][1] |= 0x02; //Dia02
|
||||
if(1 == SwIn03 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x04);else UnInfCan_1.ArrData.Arr[0][1] |= 0x04; //Dia03
|
||||
if(1 == SwIn04 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x08);else UnInfCan_1.ArrData.Arr[0][1] |= 0x08; //Dia04
|
||||
if(1 == SwIn05 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x10);else UnInfCan_1.ArrData.Arr[0][1] |= 0x10; //Dia05
|
||||
if(1 == SwIn06 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x20);else UnInfCan_1.ArrData.Arr[0][1] |= 0x20; //Dia06
|
||||
if(1 == SwIn07 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x40);else UnInfCan_1.ArrData.Arr[0][1] |= 0x40; //Dia07
|
||||
if(1 == SwIn08 )UnInfCan_1.ArrData.Arr[0][1] &= (~0x80);else UnInfCan_1.ArrData.Arr[0][1] |= 0x80; //Dia08
|
||||
|
||||
UnInfCan_1.ArrData.Arr[0][0] = 0;
|
||||
UnInfCan_1.ArrData.Arr[0][7] = 0;
|
||||
UnInfCan_1.ArrData.Arr[0][6] = 0;
|
||||
UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(RgCanPerid>>8);
|
||||
UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(RgCanPerid);
|
||||
|
||||
CanTransmit();
|
||||
}
|
||||
|
||||
//CAN<41><4E><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>
|
||||
void CanRXTX(void)
|
||||
{
|
||||
stCAN_SWObj StrCanRx = {0};
|
||||
uword tmp = 0;
|
||||
ubyte i = 0,j = 0;
|
||||
//------------------------------------
|
||||
if(CAN_ubNewData(DF_SwRx))
|
||||
{
|
||||
CAN_vGetMsgObj(DF_SwRx, &StrCanRx);
|
||||
|
||||
UnInfCan_1.ArrData.ArrRX[0][3] = StrCanRx.ulDATAL.ubDB[0];
|
||||
UnInfCan_1.ArrData.ArrRX[0][2] = StrCanRx.ulDATAL.ubDB[1];
|
||||
UnInfCan_1.ArrData.ArrRX[0][1] = StrCanRx.ulDATAL.ubDB[2];
|
||||
UnInfCan_1.ArrData.ArrRX[0][0] = StrCanRx.ulDATAL.ubDB[3];
|
||||
UnInfCan_1.ArrData.ArrRX[0][7] = StrCanRx.ulDATAH.ubDB[0];
|
||||
UnInfCan_1.ArrData.ArrRX[0][6] = StrCanRx.ulDATAH.ubDB[1];
|
||||
UnInfCan_1.ArrData.ArrRX[0][5] = StrCanRx.ulDATAH.ubDB[2];
|
||||
UnInfCan_1.ArrData.ArrRX[0][4] = StrCanRx.ulDATAH.ubDB[3];
|
||||
|
||||
CAN_vReleaseObj(DF_SwRx);
|
||||
|
||||
//CAN<41><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 50-5000ms
|
||||
tmp = (uword)UnInfCan_1.ArrData.ArrRX[0][6];
|
||||
tmp = (tmp << 8);
|
||||
tmp |= ((uword)UnInfCan_1.ArrData.ArrRX[0][7]);
|
||||
if(tmp >= 50)RgCanPerid = tmp;
|
||||
if(tmp >= 5000)RgCanPerid = 5000;
|
||||
|
||||
// UnInfCan_1.ArrData.Arr[0][3] = UnInfCan_1.ArrData.ArrRX[0][0];
|
||||
// UnInfCan_1.ArrData.Arr[0][2] = UnInfCan_1.ArrData.ArrRX[0][1];
|
||||
// UnInfCan_1.ArrData.Arr[0][1] = UnInfCan_1.ArrData.ArrRX[0][2]; 20200225ע<35>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][0] = UnInfCan_1.ArrData.ArrRX[0][3];
|
||||
// UnInfCan_1.ArrData.Arr[0][7] = UnInfCan_1.ArrData.ArrRX[0][4];
|
||||
// UnInfCan_1.ArrData.Arr[0][6] = UnInfCan_1.ArrData.ArrRX[0][5];
|
||||
// UnInfCan_1.ArrData.Arr[0][5] = (ubyte)(RgCanPerid>>8);
|
||||
// UnInfCan_1.ArrData.Arr[0][4] = (ubyte)(RgCanPerid);
|
||||
// CanTransmit(); 20200730<33><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
}
|
||||
|
||||
if(CAN_ubNewData(DF_SwRxPwm))
|
||||
{
|
||||
CAN_vGetMsgObj(DF_SwRxPwm, &StrCanRx);
|
||||
|
||||
UnInfCan_1.ArrData.ArrRX[1][2] = StrCanRx.ulDATAL.ubDB[0];
|
||||
UnInfCan_1.ArrData.ArrRX[1][3] = StrCanRx.ulDATAL.ubDB[1];
|
||||
UnInfCan_1.ArrData.ArrRX[1][0] = StrCanRx.ulDATAL.ubDB[2];
|
||||
UnInfCan_1.ArrData.ArrRX[1][1] = StrCanRx.ulDATAL.ubDB[3];
|
||||
UnInfCan_1.ArrData.ArrRX[1][6] = StrCanRx.ulDATAH.ubDB[0];
|
||||
UnInfCan_1.ArrData.ArrRX[1][7] = StrCanRx.ulDATAH.ubDB[1];
|
||||
UnInfCan_1.ArrData.ArrRX[1][4] = StrCanRx.ulDATAH.ubDB[2];
|
||||
UnInfCan_1.ArrData.ArrRX[1][5] = StrCanRx.ulDATAH.ubDB[3];
|
||||
|
||||
CAN_vReleaseObj(DF_SwRxPwm);
|
||||
//<2F><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1>浽PWM<57><4D><EFBFBD>ݽṹ<DDBD><E1B9B9>20181227
|
||||
PwmH[0 ] = (ubyte)UnInfCan_1.BitData.Pwm_01;
|
||||
PwmH[1 ] = (ubyte)UnInfCan_1.BitData.Pwm_02;
|
||||
PwmH[2 ] = (ubyte)UnInfCan_1.BitData.Pwm_03;
|
||||
PwmH[3 ] = (ubyte)UnInfCan_1.BitData.Pwm_04;
|
||||
PwmH[4 ] = (ubyte)UnInfCan_1.BitData.Pwm_05;
|
||||
PwmH[5 ] = (ubyte)UnInfCan_1.BitData.Pwm_06;
|
||||
PwmH[6 ] = (ubyte)UnInfCan_1.BitData.Pwm_07;
|
||||
PwmH[7 ] = (ubyte)UnInfCan_1.BitData.Pwm_08;
|
||||
PwmH[8 ] = (ubyte)UnInfCan_1.BitData.Pwm_09;
|
||||
PwmH[9 ] = (ubyte)UnInfCan_1.BitData.Pwm_10;
|
||||
PwmH[10] = (ubyte)UnInfCan_1.BitData.Pwm_11;
|
||||
PwmH[11] = (ubyte)UnInfCan_1.BitData.Pwm_12;
|
||||
PwmH[12] = (ubyte)UnInfCan_1.BitData.Pwm_13;
|
||||
PwmH[13] = (ubyte)UnInfCan_1.BitData.Pwm_14;
|
||||
PwmH[14] = (ubyte)UnInfCan_1.BitData.Pwm_15;
|
||||
PwmH[15] = (ubyte)UnInfCan_1.BitData.Pwm_16;
|
||||
|
||||
|
||||
// UnInfCan_1.ArrData.Arr[0][3] = UnInfCan_1.ArrData.ArrRX[1][0];
|
||||
// UnInfCan_1.ArrData.Arr[0][2] = UnInfCan_1.ArrData.ArrRX[1][1];
|
||||
// UnInfCan_1.ArrData.Arr[0][1] = UnInfCan_1.ArrData.ArrRX[1][2]; 20200225ע<35>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// UnInfCan_1.ArrData.Arr[0][0] = UnInfCan_1.ArrData.ArrRX[1][3];
|
||||
// UnInfCan_1.ArrData.Arr[0][7] = UnInfCan_1.ArrData.ArrRX[1][4];
|
||||
// UnInfCan_1.ArrData.Arr[0][6] = UnInfCan_1.ArrData.ArrRX[1][5];
|
||||
// UnInfCan_1.ArrData.Arr[0][5] = UnInfCan_1.ArrData.ArrRX[1][6];
|
||||
// UnInfCan_1.ArrData.Arr[0][4] = UnInfCan_1.ArrData.ArrRX[1][7];
|
||||
// CanTransmit();
|
||||
|
||||
}
|
||||
//<2F><><EFBFBD><EFBFBD>һ֡<D2BB><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>ε<EFBFBD><CEB5>Ƴ<EFBFBD><C6B3><EFBFBD><EFBFBD><EFBFBD>
|
||||
LedDr();
|
||||
|
||||
//100ms<6D><73><EFBFBD><EFBFBD>һ֡
|
||||
if(!FlgCan_1)
|
||||
{
|
||||
FlgCan_1 = 1;
|
||||
CanTX();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user