This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
pidflightlap:protocol [2019/02/08 09:56] cmengler |
pidflightlap:protocol [2019/02/08 20:15] (current) cmengler [MSP codes] |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Notes ===== | ===== Notes ===== | ||
- | * By default all lap timers are activated. | + | * By default all lap timers are activated on power up. (i.e. do not require **MSP_ACTIVATE** to be sent) |
===== Getting started ===== | ===== Getting started ===== | ||
Line 17: | Line 17: | ||
===== MSP message format ===== | ===== MSP message format ===== | ||
+ | {{:pidflightlap:msp_message_format.png?nolink&800|}} | ||
===== MSP codes ===== | ===== MSP codes ===== | ||
^Name^Code^Description^ | ^Name^Code^Description^ | ||
- | |MSP_API_VERSION|1| | + | |MSP_API_VERSION|1|Firmware API version| |
- | |MSP_STATUS|4| | + | |MSP_STATUS|4|Device and lap timing status| |
- | |MSP_RESET|5| | + | |MSP_RESET|5|Resets device and lap timing state| |
- | |MSP_RSSI_CALIBRATE|6| | + | |MSP_RSSI_CALIBRATE|6|Triggers RSSI calibration routine| |
- | |MSP_START|7| | + | |MSP_START|7|Starts lap timing| |
- | |MSP_ACTIVATE|8| | + | |MSP_ACTIVATE|8|Activates a lap timer device| |
- | |MSP_DEACTIVATE|9| | + | |MSP_DEACTIVATE|9|Deactivates a lap timer device| |
- | |MSP_DEVICE_ID|10| | + | |MSP_DEVICE_ID|10|Not used| |
- | |MSP_SET_DEVICE_ID|11| | + | |MSP_SET_DEVICE_ID|11|Triggers lap timing devices to assign an ID| |
- | |MSP_CHANNEL|20| | + | |MSP_CHANNEL|20|Gets the channel frequency set on the lap timing device| |
- | |MSP_SET_CHANNEL|21| | + | |MSP_SET_CHANNEL|21|Sets the channel frequency on the lap timing device| |
- | |MSP_CURRENT_LAP|30| | + | |MSP_CURRENT_LAP|30| | |
- | |MSP_LAP_MIN_TIME|34| | + | |MSP_LAP_MIN_TIME|34| | |
- | |MSP_SET_LAP_MIN_TIME|35| | + | |MSP_SET_LAP_MIN_TIME|35| | |
- | |MSP_LAP_MAX|37| | + | |MSP_LAP_MAX|37| | |
- | |MSP_SET_LAP_MAX|38| | + | |MSP_SET_LAP_MAX|38| | |
- | |MSP_RSSI|40| | + | |MSP_RSSI|40| | |
- | |MSP_RSSI_THRESHOLD|42| | + | |MSP_RSSI_THRESHOLD|42| | |
- | |MSP_SET_RSSI_THRESHOLD|43| | + | |MSP_SET_RSSI_THRESHOLD|43| | |
- | |<del>MSP_RSSI_FILTER</del>|44| | + | |<del>MSP_RSSI_FILTER</del>|44|TBD| |
- | |<del>MSP_SET_RSSI_FILTER</del>|45| | + | |<del>MSP_SET_RSSI_FILTER</del>|45|TBD| |
- | |MSP_EEPROM_WRITE|250| | + | |MSP_EEPROM_WRITE|250|Persists settings to EEPROM for settings to survive a power cycle (if desired)| |
+ | |||
+ | ==== MSP_API_VERSION ==== | ||
+ | ^Part^Type^Description^ | ||
+ | |1|UINT 8|Major version| | ||
+ | |2|UINT 8|Minor version| | ||
+ | Version is constructed as [PART 1][DECIMAL][PART2][DECIMAL][ZERO] (e.g. 2.6.0) | ||
+ | |||
+ | ==== MSP_STATUS ==== | ||
+ | ^Part^Type^Description^ | ||
+ | |1|UINT 8|Device state| | ||
+ | |2|UINT 8|Timer state| | ||
+ | |||
+ | === Device states === | ||
+ | ^Value^State^ | ||
+ | |0|Idle| | ||
+ | |1|Timing| | ||
+ | |2|Calibrating| | ||
+ | |3|Inactive| | ||
+ | |||
+ | === Timer states === | ||
+ | ^Value^State^ | ||
+ | |0|Waiting| | ||
+ | |1|Start| | ||
+ | |2|Stop| | ||
+ | |||
+ | |||