From 4ef0d74ea3b13886e38d09a4e4865be4e505db53 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 13 Nov 2018 15:05:23 +0100 Subject: [PATCH] platforms: remove old lockstep functionality These functions won't be used any longer with the new implementation. --- src/lib/cdev/posix/cdev_platform.cpp | 26 -------------------------- src/modules/uORB/uORBDeviceNode.cpp | 6 ------ src/platforms/px4_posix.h | 5 ----- 3 files changed, 37 deletions(-) diff --git a/src/lib/cdev/posix/cdev_platform.cpp b/src/lib/cdev/posix/cdev_platform.cpp index 5202dd2b50..c10bae4c1c 100644 --- a/src/lib/cdev/posix/cdev_platform.cpp +++ b/src/lib/cdev/posix/cdev_platform.cpp @@ -522,30 +522,4 @@ extern "C" { pthread_mutex_unlock(&devmutex); } - void px4_enable_sim_lockstep() - { - px4_sem_init(&lockstep_sem, 0, 0); - - // lockstep_sem use case is a signal - px4_sem_setprotocol(&lockstep_sem, SEM_PRIO_NONE); - - sim_lockstep = true; - sim_delay = false; - } - - void px4_sim_start_delay() - { - sim_delay = true; - } - - void px4_sim_stop_delay() - { - sim_delay = false; - } - - bool px4_sim_delay_enabled() - { - return sim_delay; - } - } // extern "C" diff --git a/src/modules/uORB/uORBDeviceNode.cpp b/src/modules/uORB/uORBDeviceNode.cpp index e50b9ccff3..2d78787663 100644 --- a/src/modules/uORB/uORBDeviceNode.cpp +++ b/src/modules/uORB/uORBDeviceNode.cpp @@ -590,12 +590,6 @@ out: bool uORB::DeviceNode::appears_updated(SubscriberData *sd) { - - /* block if in simulation mode */ - while (px4_sim_delay_enabled()) { - px4_usleep(100); - } - /* assume it doesn't look updated */ bool ret = false; diff --git a/src/platforms/px4_posix.h b/src/platforms/px4_posix.h index 3222e1b4ac..7c01e23799 100644 --- a/src/platforms/px4_posix.h +++ b/src/platforms/px4_posix.h @@ -108,11 +108,6 @@ __EXPORT int px4_fsync(int fd); __EXPORT int px4_access(const char *pathname, int mode); __EXPORT px4_task_t px4_getpid(void); -__EXPORT void px4_enable_sim_lockstep(void); -__EXPORT void px4_sim_start_delay(void); -__EXPORT void px4_sim_stop_delay(void); -__EXPORT bool px4_sim_delay_enabled(void); - __END_DECLS #else #error "No TARGET OS Provided"