diff --git a/Tools/Replay/LogReader.cpp b/Tools/Replay/LogReader.cpp index 2f8b62abf7..77bce4c565 100644 --- a/Tools/Replay/LogReader.cpp +++ b/Tools/Replay/LogReader.cpp @@ -143,7 +143,7 @@ void LogReader::process_plane(uint8_t type, uint8_t *data, uint16_t length) } memcpy(&msg, data, sizeof(msg)); wait_timestamp(msg.time_ms); - compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); + compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z); break; } @@ -185,7 +185,7 @@ void LogReader::process_rover(uint8_t type, uint8_t *data, uint16_t length) } memcpy(&msg, data, sizeof(msg)); wait_timestamp(msg.time_ms); - compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); + compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z); break; } @@ -215,7 +215,7 @@ void LogReader::process_copter(uint8_t type, uint8_t *data, uint16_t length) } memcpy(&msg, data, sizeof(msg)); wait_timestamp(msg.time_ms); - compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); + compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z)); compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z); break; } diff --git a/Tools/Replay/Replay.pde b/Tools/Replay/Replay.pde index 62b7e16ffe..d95dd20e7c 100644 --- a/Tools/Replay/Replay.pde +++ b/Tools/Replay/Replay.pde @@ -49,8 +49,10 @@ #include #include +#ifndef INT16_MIN #define INT16_MIN -32768 #define INT16_MAX 32767 +#endif #include "LogReader.h"