christianrauch / msp

Implementation of the MultiWii Serial Protocol (MSP) for MultiWii and Cleanflight flight controller
http://www.multiwii.com/wiki/index.php?title=Multiwii_Serial_Protocol
GNU Lesser General Public License v3.0
80 stars 27 forks source link

Added message definition for MSP_SONAR_ALTITUDE #14

Closed emmhaych closed 6 years ago

emmhaych commented 6 years ago

Message definition of MSP_SONAR_ALTITUDE tested with cleanflight v2.2.0

christianrauch commented 6 years ago

Do you mind to translate the altitude in meters as it is done for the MSP_ALTITUDE? https://github.com/christianrauch/msp/blob/d2d8b03295a052b5b4446feab5f95e4d78811033/inc/msp/msp_msg.hpp#L475-L486 I would like to keep the same units for all altitude or distance sensors.

I also just realised that you write a int32 into a int16. This is probably not want you wanted.

emmhaych commented 6 years ago

Updated as request. Rebased as well to clean up commit history.