Command ‘i’ – look for input data, Command ‘l’ – set the vehicle led state – Innovate Motorsports OT-2 SDK User Manual
Page 43
43
Command ‘I’ – Look for Input Data
Sent:
3 bytes
{
U8 Cmd;
// ‘I’
U8 Timeout;
// Timeout (in mS) for responses
U8 Replies;
// Expected number of replies
// Can exceed 8
}
Responds:
Variable (1 byte minimum)
{
// 0 to replies of
{
U8 ExtFlag; // 0=std ID, 1=ext. ID
U32 ID;
// Can Message ID
U8 Len;
// Data length (from rcv’ed DLC)
U8 Data[Len];
// Received Data
}
U8 End;
// Always 0xFF
}
Notes:
Replies is ‘Can Messages’.
Timeout is for all messages, not per message. If replies is
set, the 0xFF will be returned after either a) the desired
number of replies is received or b) this time is reached.
Timeout cannot be 0. If a zero is submitted, a value of 1
is used instead.
Command ‘L’ – Set the Vehicle LED State
Sent:
2 bytes
{
U8 Cmd;
// ‘L’
U8 State;
// 0 = off
// 1 = on
}
Responds:
1 byte
{
U8 Result;
// Should match ‘State’ requested
}
Notes:
Because we have conditioned the user to expect the vehicle
light to light or blink, you might want to follow the same
model. You may also find this useful for debugging.