Move view moving to end of loop
This commit is contained in:
parent
8fdc03981c
commit
986d061004
2 changed files with 16 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include "test_suite/dataStore.hxx"
|
||||
#include <ctime>
|
||||
|
||||
#include "TestDataLogger.hxx"
|
||||
#include "testGlobals.hxx"
|
||||
|
@ -67,8 +68,7 @@ void initTestGlobals(const std::string& testName)
|
|||
|
||||
fgSetDefaults();
|
||||
|
||||
std::unique_ptr<TimeManager> t;
|
||||
t.reset(new TimeManager);
|
||||
auto t = globals->add_new_subsystem<TimeManager>(SGSubsystemMgr::INIT);
|
||||
t->init(); // establish mag-var data
|
||||
|
||||
/**
|
||||
|
@ -369,6 +369,15 @@ bool runForTimeWithCheck(double t, RunCheck check)
|
|||
return false;
|
||||
}
|
||||
|
||||
void adjustSimulationWorldTime(time_t desiredUnixTime)
|
||||
{
|
||||
int timeOffset = desiredUnixTime - time(nullptr);
|
||||
globals->get_props()->setIntValue("/sim/time/cur-time-override", 0);
|
||||
globals->get_props()->setIntValue("/sim/time/warp", timeOffset);
|
||||
|
||||
globals->get_subsystem<TimeManager>()->update(0.0);
|
||||
}
|
||||
|
||||
void writeFlightPlanToKML(flightgear::FlightPlanRef fp)
|
||||
{
|
||||
if (!global_loggingToKML)
|
||||
|
|
|
@ -48,6 +48,11 @@ void setPositionAndStabilise(const SGGeod& g);
|
|||
|
||||
void runForTime(double t);
|
||||
|
||||
/**
|
||||
@brief set the simulation date/time clock to 'time'
|
||||
*/
|
||||
void adjustSimulationWorldTime(time_t time);
|
||||
|
||||
using RunCheck = std::function<bool(void)>;
|
||||
|
||||
bool runForTimeWithCheck(double t, RunCheck check);
|
||||
|
|
Loading…
Reference in a new issue