mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 11:20:35 +08:00
run_seconds
This commit is contained in:
committed by
Mathieu Bresciani
parent
39b369d90b
commit
1832bedd13
@@ -58,7 +58,12 @@ gps_message SensorSimulator::getDefaultGpsData()
|
||||
return gps_data;
|
||||
}
|
||||
|
||||
void SensorSimulator::run(uint32_t duration)
|
||||
void SensorSimulator::run_seconds(float duration_seconds)
|
||||
{
|
||||
run_microseconds( uint32_t(duration_seconds * 1e6f) );
|
||||
}
|
||||
|
||||
void SensorSimulator::run_microseconds(uint32_t duration)
|
||||
{
|
||||
// simulate in 1000us steps
|
||||
uint32_t start_time = _time;
|
||||
|
||||
Reference in New Issue
Block a user