HAL_SITL: enable ADSB simulator in SITL periph

This commit is contained in:
Andrew Tridgell 2023-09-29 14:11:22 +10:00
parent 92c0e7f860
commit bf229b3dc1
2 changed files with 7 additions and 1 deletions

View File

@ -270,6 +270,12 @@ void SimMCast::multicast_read(void)
base_time_us += (_sitl->state.timestamp_us - state.timestamp_us);
}
_sitl->state = state;
location.lat = state.latitude*1.0e7;
location.lng = state.longitude*1.0e7;
location.alt = state.altitude*1.0e2;
if (home.is_zero()) {
home = location;
}
hal.scheduler->stop_clock(_sitl->state.timestamp_us + base_time_us);
HALSITL::Scheduler::timer_event();
if (servo_fd == -1) {

View File

@ -66,7 +66,7 @@ public:
"none:0",
"GPS1",
"none:1",
"none:2",
"sim:adsb",
"none:3",
"none:4",
"none:5",