From 4afc14007b26333bd0bcc1b2bbb8b64fe0ff43e5 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 16 Feb 2022 17:00:04 +1100 Subject: [PATCH] SITL: correct PS_LightWare_SF45B simulator --- libraries/SITL/SIM_PS_LightWare_SF45B.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_PS_LightWare_SF45B.cpp b/libraries/SITL/SIM_PS_LightWare_SF45B.cpp index 5abefcf85c..f585cb1c1e 100644 --- a/libraries/SITL/SIM_PS_LightWare_SF45B.cpp +++ b/libraries/SITL/SIM_PS_LightWare_SF45B.cpp @@ -216,7 +216,7 @@ void PS_LightWare_SF45B::update_output_scan(const Location &location) PackedMessage packed_distance_data { DistanceDataCM( uint16_t(distance*100.0), - uint16_t(current_degrees_bf * 100) + wrap_180(current_degrees_bf) * 100 ), 0x1 }; packed_distance_data.update_checksum(); send((char*)&packed_distance_data, sizeof(packed_distance_data));