|
|
@ -27,7 +27,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
{ |
|
|
|
{ |
|
|
|
case MAV_AUTOPILOT_GENERIC: |
|
|
|
case MAV_AUTOPILOT_GENERIC: |
|
|
|
{ |
|
|
|
{ |
|
|
|
UAS* mav = new UAS(mavlink, sysid); |
|
|
|
UAS* mav = new UAS(mavlink, worker, sysid); |
|
|
|
// Set the system type
|
|
|
|
// Set the system type
|
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MAV_AUTOPILOT_PIXHAWK: |
|
|
|
case MAV_AUTOPILOT_PIXHAWK: |
|
|
|
{ |
|
|
|
{ |
|
|
|
PxQuadMAV* mav = new PxQuadMAV(mavlink, sysid); |
|
|
|
PxQuadMAV* mav = new PxQuadMAV(mavlink, worker, sysid); |
|
|
|
// Set the system type
|
|
|
|
// Set the system type
|
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MAV_AUTOPILOT_SLUGS: |
|
|
|
case MAV_AUTOPILOT_SLUGS: |
|
|
|
{ |
|
|
|
{ |
|
|
|
SlugsMAV* mav = new SlugsMAV(mavlink, sysid); |
|
|
|
SlugsMAV* mav = new SlugsMAV(mavlink, worker, sysid); |
|
|
|
// Set the system type
|
|
|
|
// Set the system type
|
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MAV_AUTOPILOT_ARDUPILOTMEGA: |
|
|
|
case MAV_AUTOPILOT_ARDUPILOTMEGA: |
|
|
|
{ |
|
|
|
{ |
|
|
|
ArduPilotMegaMAV* mav = new ArduPilotMegaMAV(mavlink, sysid); |
|
|
|
ArduPilotMegaMAV* mav = new ArduPilotMegaMAV(mavlink, worker, sysid); |
|
|
|
// Set the system type
|
|
|
|
// Set the system type
|
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
@ -95,7 +95,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
#ifdef QGC_USE_SENSESOAR_MESSAGES |
|
|
|
#ifdef QGC_USE_SENSESOAR_MESSAGES |
|
|
|
case MAV_AUTOPILOT_SENSESOAR: |
|
|
|
case MAV_AUTOPILOT_SENSESOAR: |
|
|
|
{ |
|
|
|
{ |
|
|
|
senseSoarMAV* mav = new senseSoarMAV(mavlink,sysid); |
|
|
|
senseSoarMAV* mav = new senseSoarMAV(mavlink,worker, sysid); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
|
mav->moveToThread(worker); |
|
|
|
mav->moveToThread(worker); |
|
|
@ -107,11 +107,9 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
default: |
|
|
|
default: |
|
|
|
{ |
|
|
|
{ |
|
|
|
UAS* mav = new UAS(mavlink, sysid); |
|
|
|
UAS* mav = new UAS(mavlink, worker, sysid); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
mav->setSystemType((int)heartbeat->type); |
|
|
|
|
|
|
|
|
|
|
|
mav->moveToThread(worker); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Connect this robot to the UAS object
|
|
|
|
// Connect this robot to the UAS object
|
|
|
|
// it is IMPORTANT here to use the right object type,
|
|
|
|
// it is IMPORTANT here to use the right object type,
|
|
|
|
// else the slot of the parent object is called (and thus the special
|
|
|
|
// else the slot of the parent object is called (and thus the special
|
|
|
|