replay: use lockstep scheduler

This commit is contained in:
Beat Küng
2020-06-23 11:53:55 -04:00
committed by Daniel Agar
parent 71dcf8d619
commit 157ef43e28
8 changed files with 64 additions and 63 deletions
+11
View File
@@ -206,9 +206,18 @@ protected:
*/
bool nextDataMessage(std::ifstream &file, Subscription &subscription, int msg_id);
virtual uint64_t getTimestampOffset()
{
//we update the timestamps from the file by a constant offset to match
//the current replay time
return _replay_start_time - _file_start_time;
}
std::vector<Subscription *> _subscriptions;
std::vector<uint8_t> _read_buffer;
float _speed_factor{1.f}; ///< from PX4_SIM_SPEED_FACTOR env variable (set to 0 to avoid usleep = unlimited rate)
private:
std::set<std::string> _overridden_params;
std::map<std::string, std::string> _file_formats; ///< all formats we read from the file
@@ -222,6 +231,8 @@ private:
int64_t _read_until_file_position = 1ULL << 60; ///< read limit if log contains appended data
float _accumulated_delay{0.f};
bool readFileHeader(std::ifstream &file);
/**