diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index 279e66582747c951ee9ae9010de58959867873db..ce8e2a7b7494e428a3b139dd4854104d49381b52 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -338,6 +338,8 @@ bool QGCFlightGearLink::connectSimulation() connect(mav, SIGNAL(hilControlsChanged(uint64_t, float, float, float, float, uint8_t, uint8_t)), this, SLOT(updateControls(uint64_t,float,float,float,float,uint8_t,uint8_t))); connect(this, SIGNAL(hilStateChanged(uint64_t,float,float,float,float,float,float,int32_t,int32_t,int32_t,int16_t,int16_t,int16_t,int16_t,int16_t,int16_t)), mav, SLOT(sendHilState(uint64_t,float,float,float,float,float,float,int32_t,int32_t,int32_t,int16_t,int16_t,int16_t,int16_t,int16_t,int16_t))); + mav->startHil(); + //connect(&refreshTimer, SIGNAL(timeout()), this, SLOT(sendUAVUpdate())); // Catch process error QObject::connect( process, SIGNAL(error(QProcess::ProcessError)), diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 1de82be74e24c150a232e5b70241de05c0ee9ee4..3fc4e2d8d61abd4d8d4adffde7cc5bad44d0623e 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -2699,11 +2699,11 @@ void UAS::startHil() { if (hilEnabled) return; hilEnabled = true; - // Connect HIL simulation link - simulation->connectSimulation(); mavlink_message_t msg; mavlink_msg_set_mode_pack(mavlink->getSystemId(), mavlink->getComponentId(), &msg, this->getUASID(), mode | MAV_MODE_FLAG_HIL_ENABLED, navMode); sendMessage(msg); + // Connect HIL simulation link + simulation->connectSimulation(); } /**