mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 12:33:33 +08:00
replay: use lockstep scheduler
This commit is contained in:
@@ -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);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user