|
@@ -588,7 +588,7 @@ void MessageCoder::CanMsgAnalyseID_2E1(unsigned char * ucData, T_ESTOP_ERR * tEs
|
|
|
tEstopErr->uiEspErrf = tEstop2E1.uiEspErrf;
|
|
|
}
|
|
|
|
|
|
-//油门(acc)、制动(brk)、挡位(sft)X、挡位(sft)Y、转向(str)电机报警--数据解析
|
|
|
+//挡位(sft)X、挡位(sft)Y、转向(str)电机报警--数据解析
|
|
|
void MessageCoder::CanMsgAnalyseErr(unsigned char * ucData, T_MOT_CTR_ERR * tMotCtrErr)
|
|
|
{
|
|
|
T_CTR_ERR_CODE tCtrErrCode = { 0 };
|
|
@@ -635,6 +635,83 @@ void MessageCoder::CanMsgAnalyseErr(unsigned char * ucData, T_MOT_CTR_ERR * tMot
|
|
|
tMotCtrErr->uiErrz = tCtrErrCode.z;
|
|
|
}
|
|
|
|
|
|
+//油门(acc)、制动(brk)电机报警--数据解析
|
|
|
+void MessageCoder::CanMsgAnalyseErrAccBrk(unsigned char * ucData, T_MOT_CTR_ERR_AccBrk * tMotCtrErr)
|
|
|
+{
|
|
|
+ T_CTR_ERR_CODE_AccBrk tCtrErrCode = { 0 };
|
|
|
+// unsigned char ucCanMsgSrc[8] = { 0 };
|
|
|
+
|
|
|
+// memcpy(ucCanMsgSrc, ucData, CAN_MSG_LEN);
|
|
|
+ CharReverse(ucData,8);
|
|
|
+ memcpy(&tCtrErrCode, ucData, CAN_MSG_LEN);
|
|
|
+
|
|
|
+ tMotCtrErr->uiErrbe = tCtrErrCode.be;
|
|
|
+ tMotCtrErr->uiErrbf = tCtrErrCode.bf;
|
|
|
+ tMotCtrErr->uiErrbg = tCtrErrCode.bg;
|
|
|
+ tMotCtrErr->uiErrbh = tCtrErrCode.bh;
|
|
|
+ tMotCtrErr->uiErrbi = tCtrErrCode.bi;
|
|
|
+ tMotCtrErr->uiErrbj = tCtrErrCode.bj;
|
|
|
+ tMotCtrErr->uiErrbk = tCtrErrCode.bk;
|
|
|
+ tMotCtrErr->uiErrbl = tCtrErrCode.bl;
|
|
|
+ tMotCtrErr->uiErraw = tCtrErrCode.aw;
|
|
|
+ tMotCtrErr->uiErrax = tCtrErrCode.ax;
|
|
|
+ tMotCtrErr->uiErray = tCtrErrCode.ay;
|
|
|
+ tMotCtrErr->uiErraz = tCtrErrCode.az;
|
|
|
+ tMotCtrErr->uiErrba = tCtrErrCode.ba;
|
|
|
+ tMotCtrErr->uiErrbb = tCtrErrCode.bb;
|
|
|
+ tMotCtrErr->uiErrbc = tCtrErrCode.bc;
|
|
|
+ tMotCtrErr->uiErrbd = tCtrErrCode.bd;
|
|
|
+ tMotCtrErr->uiErrao = tCtrErrCode.ao;
|
|
|
+ tMotCtrErr->uiErrap = tCtrErrCode.ap;
|
|
|
+ tMotCtrErr->uiErraq = tCtrErrCode.aq;
|
|
|
+ tMotCtrErr->uiErrar = tCtrErrCode.ar;
|
|
|
+ tMotCtrErr->uiErras = tCtrErrCode.as;
|
|
|
+ tMotCtrErr->uiErrat = tCtrErrCode.at;
|
|
|
+ tMotCtrErr->uiErrau = tCtrErrCode.au;
|
|
|
+ tMotCtrErr->uiErrav = tCtrErrCode.av;
|
|
|
+ tMotCtrErr->uiErrag = tCtrErrCode.ag;
|
|
|
+ tMotCtrErr->uiErrah = tCtrErrCode.ah;
|
|
|
+ tMotCtrErr->uiErrai = tCtrErrCode.ai;
|
|
|
+ tMotCtrErr->uiErraj = tCtrErrCode.aj;
|
|
|
+ tMotCtrErr->uiErrak = tCtrErrCode.ak;
|
|
|
+ tMotCtrErr->uiErral = tCtrErrCode.al;
|
|
|
+ tMotCtrErr->uiErram = tCtrErrCode.am;
|
|
|
+ tMotCtrErr->uiErran = tCtrErrCode.an;
|
|
|
+ tMotCtrErr->uiErry = tCtrErrCode.y;
|
|
|
+ tMotCtrErr->uiErrz = tCtrErrCode.z;
|
|
|
+ tMotCtrErr->uiErraa = tCtrErrCode.aa;
|
|
|
+ tMotCtrErr->uiErrab = tCtrErrCode.ab;
|
|
|
+ tMotCtrErr->uiErrac = tCtrErrCode.ac;
|
|
|
+ tMotCtrErr->uiErrad = tCtrErrCode.ad;
|
|
|
+ tMotCtrErr->uiErrae = tCtrErrCode.ae;
|
|
|
+ tMotCtrErr->uiErraf = tCtrErrCode.af;
|
|
|
+ tMotCtrErr->uiErrq = tCtrErrCode.q;
|
|
|
+ tMotCtrErr->uiErrr = tCtrErrCode.r;
|
|
|
+ tMotCtrErr->uiErrs = tCtrErrCode.s;
|
|
|
+ tMotCtrErr->uiErrt = tCtrErrCode.t;
|
|
|
+ tMotCtrErr->uiErru = tCtrErrCode.u;
|
|
|
+ tMotCtrErr->uiErrv = tCtrErrCode.v;
|
|
|
+ tMotCtrErr->uiErrw = tCtrErrCode.w;
|
|
|
+ tMotCtrErr->uiErrx = tCtrErrCode.x;
|
|
|
+ tMotCtrErr->uiErri = tCtrErrCode.i;
|
|
|
+ tMotCtrErr->uiErrj = tCtrErrCode.j;
|
|
|
+ tMotCtrErr->uiErrk = tCtrErrCode.k;
|
|
|
+ tMotCtrErr->uiErrl = tCtrErrCode.l;
|
|
|
+ tMotCtrErr->uiErrm = tCtrErrCode.m;
|
|
|
+ tMotCtrErr->uiErrn = tCtrErrCode.n;
|
|
|
+ tMotCtrErr->uiErro = tCtrErrCode.o;
|
|
|
+ tMotCtrErr->uiErrp = tCtrErrCode.p;
|
|
|
+ tMotCtrErr->uiErra = tCtrErrCode.a;
|
|
|
+ tMotCtrErr->uiErrb = tCtrErrCode.b;
|
|
|
+ tMotCtrErr->uiErrc = tCtrErrCode.c;
|
|
|
+ tMotCtrErr->uiErrd = tCtrErrCode.d;
|
|
|
+ tMotCtrErr->uiErre = tCtrErrCode.e;
|
|
|
+ tMotCtrErr->uiErrf = tCtrErrCode.f;
|
|
|
+ tMotCtrErr->uiErrg = tCtrErrCode.g;
|
|
|
+ tMotCtrErr->uiErrh = tCtrErrCode.h;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
//OBD实际油门踏板行程--数据解析
|
|
|
void MessageCoder::OBDAnalyseID_070(unsigned char *ucData, T_OBD_ACC_PSNG *tOBDAccPsng)
|
|
|
{
|
|
@@ -1391,13 +1468,13 @@ void * MessageCoder::CanMsgAnalyse(int id,unsigned char * ucData)
|
|
|
p = &tEstopErr;
|
|
|
break;
|
|
|
case robot::common::AccErr://油门(acc)电机报警
|
|
|
- T_MOT_CTR_ERR tMotCtrErrAcc ;
|
|
|
- CanMsgAnalyseErr(ucData,&tMotCtrErrAcc);
|
|
|
+ T_MOT_CTR_ERR_AccBrk tMotCtrErrAcc ;
|
|
|
+ CanMsgAnalyseErrAccBrk(ucData,&tMotCtrErrAcc);
|
|
|
p = &tMotCtrErrAcc;
|
|
|
break;
|
|
|
case robot::common::BrkErr://制动(brk)电机报警
|
|
|
- T_MOT_CTR_ERR tMotCtrErrBrk ;
|
|
|
- CanMsgAnalyseErr(ucData, &tMotCtrErrBrk);
|
|
|
+ T_MOT_CTR_ERR_AccBrk tMotCtrErrBrk ;
|
|
|
+ CanMsgAnalyseErrAccBrk(ucData, &tMotCtrErrBrk);
|
|
|
p = &tMotCtrErrBrk;
|
|
|
break;
|
|
|
case robot::common::XsftErr://挡位(sft)X电机报警
|