Command ‘i’ – look for input data, Command ‘l’ – set the vehicle led state – Innovate Motorsports OT-2 SDK User Manual
Page 48
48
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
// Up to 16
}
Responds:
Variable (1 byte minimum)
{
// 0 to ‘Replies’ of
{
U8 Len;
// Bits 0-6:
// Data length of packet
// 32 bytes maximum, CRC is
// included in Len and Data
// (below)
//
// Bit 7:
// CRC test, 1=failed
U8 Data[(Len&0x7F)];
// Received Data
}
U8 End;
// Always 0xFF
}
Notes:
Replies is for J1850 packets.
Timeout is 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 without a new reply.
Timeout cannot be set to 0, doing do will default to a
timeout of 100 mS.
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.