Can anybody help me understanding can polling?
I use the following code in 3.0.12 and older version.
i send every 60s when the car is on a following code:
CAN_frame_t frame;
memset(&frame,0,sizeof(frame));
frame.origin = m_can1;
frame.FIR.U = 0;
frame.FIR.B.DLC = 3;
frame.FIR.B.FF = CAN_frame_std;
frame.MsgID = 0x761;
frame.data.u8[0] = 0x02;
frame.data.u8[1] = 0x21;
frame.data.u8[2] = 0x01;
m_can1->Write(&frame);
At IncomingFrameCan1 i catch the response message at 0x762 and send a flow
control message (this values from can logging during genuine diagnostic use
on car)
if (d[0] == 16)
{
// Request CAC...
CAN_frame_t frame;
memset(&frame,0,sizeof(frame));
frame.origin = m_can1;
frame.FIR.U = 0;
frame.FIR.B.DLC = 3;
frame.FIR.B.FF = CAN_frame_std;
frame.MsgID = 0x761;
frame.data.u8[0] = 0x30;
frame.data.u8[1] = 0x08;
frame.data.u8[2] = 0x0A;
m_can1->Write(&frame);
}
And with this is get some data (CAC)
But if i use polling with the following values
static const OvmsVehicle::poll_pid_t vehicle_mitsubishi_polls[] =
{
{ 0x761, 0x762, VEHICLE_POLL_TYPE_OBDIIGROUP, 0x02, { 0, 10,
10 } }, // cac
{ 0, 0, 0, 0, { 0, 0, 0 } }
};
i get the following in void OvmsVehicleMitsubishi::IncomingPollReply....
I (178194) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 01 7f 01 00
I (178224) v-mitsubishi: 762 TYPE:21 PID:02 7 7e 01 7e 01 7e 01 7e 00
I (178284) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 01 7e 01 00
I (178284) v-mitsubishi: 762 TYPE:21 PID:02 7 7e 01 7e 01 7e 01 7e 00
I (178314) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 01 7e 01 00
I (178344) v-mitsubishi: 762 TYPE:21 PID:02 7 7e 01 7e 01 7e 01 7e 00
I (178374) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 01 7e 01 00
I (178404) v-mitsubishi: 762 TYPE:21 PID:02 7 7e 01 7e 01 7e 01 7e 00
I (178434) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 01 7e 01 00
I (178464) v-mitsubishi: 762 TYPE:21 PID:02 7 7e 01 7e 01 7e 01 7e 00
I (178494) v-mitsubishi: 762 TYPE:21 PID:02 7 01 7e 01 7e 00 00 00 00
i run a can logging with this session and i only see the same data
(incomping poll reply) only the d[0] is changed.
What do i do wrong?