Add motor telemetry data to MSP
commitd698a559c5833fe9ea1befa6d021d73a7910c6cd
authorBruce Luckcuck <github@etracer.net>
Sat, 17 Aug 2019 19:23:19 +0000 (17 15:23 -0400)
committerBruce Luckcuck <github@etracer.net>
Mon, 26 Aug 2019 21:56:08 +0000 (26 17:56 -0400)
tree0a987ad417a8c0e06b4e1b3b0876bbb6b50adbcc
parentb215def71425c5a6397fa19610ebe55135ee595a
Add motor telemetry data to MSP
Adds the RPM (ESC sensor or DSHOT telemetry), invalid packet stats (DSHOT telemetry), and ESC temperature (ESC sensor) for each motor to MSP.

Adds controlling flags and `motor_poles` to `MSP_MOTOR_CONFIG`.

Added to the MSP_MOTOR_CONFIG message:
U8    configured motor count
U8    motor poles
U8    dshot telemetry enabled (boolean)
U8    esc sensor enabled (boolean)

New MSP_MOTOR_DSHOT_TELEMETRY message
U8    motor_count - number of active motors for which data will follow
Loop for motor_count
U32   motor_rpm
U16   invalid_packet_percent - 2 decimal places. So 10000 is 100.00%
U8    esc temperature (degrees celcius)
U16   esc voltage (0.01V per unit)
U16   esc current (0.01A per unit)
U16   esc mAh consumption
src/main/msp/msp.c
src/main/msp/msp_protocol.h