This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
pidflightlap:protocol [2019/02/08 09:53] cmengler created |
pidflightlap:protocol [2019/02/08 20:13] cmengler |
||
---|---|---|---|
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 15: | Line 15: | ||
* Poll **MSP_CURRENT_LAP** to detect when a new lap has been recorded on the lap timer. | * 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. | * Poll **MSP_STATUS** to retrieve current status of the lap timer. | ||
+ | |||
+ | ===== MSP message format ===== | ||
+ | {{:pidflightlap:msp_message_format.png?nolink&800|}} | ||
+ | |||
+ | ===== MSP codes ===== | ||
+ | ^Name^Code^Description^ | ||
+ | |MSP_API_VERSION|1|Firmware API version| | ||
+ | |MSP_STATUS|4|Device and lap timing status| | ||
+ | |MSP_RESET|5|Resets device and lap timing state| | ||
+ | |MSP_RSSI_CALIBRATE|6| | | ||
+ | |MSP_START|7| | | ||
+ | |MSP_ACTIVATE|8| | | ||
+ | |MSP_DEACTIVATE|9| | | ||
+ | |MSP_DEVICE_ID|10| | | ||
+ | |MSP_SET_DEVICE_ID|11| | | ||
+ | |MSP_CHANNEL|20| | | ||
+ | |MSP_SET_CHANNEL|21| | | ||
+ | |MSP_CURRENT_LAP|30| | | ||
+ | |MSP_LAP_MIN_TIME|34| | | ||
+ | |MSP_SET_LAP_MIN_TIME|35| | | ||
+ | |MSP_LAP_MAX|37| | | ||
+ | |MSP_SET_LAP_MAX|38| | | ||
+ | |MSP_RSSI|40| | | ||
+ | |MSP_RSSI_THRESHOLD|42| | | ||
+ | |MSP_SET_RSSI_THRESHOLD|43| | | ||
+ | |<del>MSP_RSSI_FILTER</del>|44|TBD| | ||
+ | |<del>MSP_SET_RSSI_FILTER</del>|45|TBD| | ||
+ | |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| | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||