Skip to content

Commit

Permalink
Update SerialMAVLINK.ino
Browse files Browse the repository at this point in the history
Removed rounding errors
  • Loading branch information
ShikOfTheRa committed Nov 21, 2022
1 parent dcb3da9 commit 28047f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MW_OSD/SerialMAVLINK.ino
Expand Up @@ -355,8 +355,8 @@ void serialMAVCheck() {
#ifdef DEBUGDPOSMAV
timer.d0rate++;
#endif
AIR_speed = (int16_t)serialbufferfloat(0) * 100; // m/s-->cm/s
GPS_speed = (int16_t)serialbufferfloat(4) * 100; // m/s-->cm/s
AIR_speed = (float)serialbufferfloat(0) * 100; // m/s-->cm/s
GPS_speed = (float)serialbufferfloat(4) * 100; // m/s-->cm/s
MwHeading = serialBuffer[16] | serialBuffer[17] << 8; // deg (-->deg*10 if GPS heading)
MwHeading360 = MwHeading;
if (MwHeading360 > 180)
Expand Down

0 comments on commit 28047f7

Please sign in to comment.