From 187f3f28349245a3df1a8ab18cf1e0f6e3fd0e8b Mon Sep 17 00:00:00 2001
From: Julian Oes <julian@oes.ch>
Date: Wed, 27 Mar 2019 10:55:16 +0100
Subject: [PATCH] SITL: interim fix for replay

The replay functionality was broken with lockstep. This is an interim
fix for the replay functionality.

In the longer term it would be nice to leverage the lockstep speedup
for the replay.
---
 boards/px4/sitl/default.cmake | 7 +++++--
 boards/px4/sitl/rtps.cmake    | 7 +++++--
 boards/px4/sitl/test.cmake    | 1 +
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/boards/px4/sitl/default.cmake b/boards/px4/sitl/default.cmake
index f907bb676b..c2fd0bfa09 100644
--- a/boards/px4/sitl/default.cmake
+++ b/boards/px4/sitl/default.cmake
@@ -97,6 +97,9 @@ set(REPLAY_FILE "$ENV{replay}")
 if(REPLAY_FILE)
 	message("Building with uorb publisher rules support")
 	add_definitions(-DORB_USE_PUBLISHER_RULES)
-endif()
 
-set(ENABLE_LOCKSTEP_SCHEDULER yes)
+	message("Building without lockstep for replay")
+	set(ENABLE_LOCKSTEP_SCHEDULER no)
+else()
+	set(ENABLE_LOCKSTEP_SCHEDULER yes)
+endif()
diff --git a/boards/px4/sitl/rtps.cmake b/boards/px4/sitl/rtps.cmake
index 8b0514da44..266f0291b6 100644
--- a/boards/px4/sitl/rtps.cmake
+++ b/boards/px4/sitl/rtps.cmake
@@ -98,6 +98,9 @@ set(REPLAY_FILE "$ENV{replay}")
 if(REPLAY_FILE)
 	message("Building with uorb publisher rules support")
 	add_definitions(-DORB_USE_PUBLISHER_RULES)
-endif()
 
-set(ENABLE_LOCKSTEP_SCHEDULER yes)
+	message("Building without lockstep for replay")
+	set(ENABLE_LOCKSTEP_SCHEDULER no)
+else()
+	set(ENABLE_LOCKSTEP_SCHEDULER yes)
+endif()
diff --git a/boards/px4/sitl/test.cmake b/boards/px4/sitl/test.cmake
index ba6268150e..3918af8166 100644
--- a/boards/px4/sitl/test.cmake
+++ b/boards/px4/sitl/test.cmake
@@ -99,4 +99,5 @@ if(REPLAY_FILE)
 	add_definitions(-DORB_USE_PUBLISHER_RULES)
 endif()
 
+message("Building without lockstep for test")
 set(ENABLE_LOCKSTEP_SCHEDULER no)
-- 
GitLab