Skip to content

Serial Protocol

Christian Mengler edited this page Mar 15, 2020 · 3 revisions

The PIDflight Lap protocol uses a slightly modified version of the Multiwii Serial Protocol.

Notes

By default all lap timers are activated on power up. (i.e. do not require MSP_ACTIVATE to be sent)

Initialisation

  • Open serial connection to lap timing device(s).
    • Baud rate: 115200
  • Application issues MSP_SET_DEVICE_ID to all devices.
// Initialise all connected devices identifiers starting with 1
MSP.sendMessage(MSP.WILDCARD_DEVICE_ID, MSP.MSP_SET_DEVICE_ID, 1);
  • Each device found and initialised will return a response to MSP_SET_DEVICE_ID with the ID it has been initialised with.
  • Poll MSP_CURRENT_LAP to detect when a new lap has been recorded on the lap timer.
  • Poll MSP_STATUS to retrieve current status of the lap timer.

MSP message format

Clone this wiki locally