Unverified Commit 5a2a5dc5 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6054 from DonLakeFlyer/InsertROI

Insert ROI command which is supported by firmware
parents 5b94043d 1d2b4e3c
...@@ -364,10 +364,12 @@ int MissionController::insertROIMissionItem(QGeoCoordinate coordinate, int i) ...@@ -364,10 +364,12 @@ int MissionController::insertROIMissionItem(QGeoCoordinate coordinate, int i)
int sequenceNumber = _nextSequenceNumber(); int sequenceNumber = _nextSequenceNumber();
SimpleMissionItem * newItem = new SimpleMissionItem(_controllerVehicle, this); SimpleMissionItem * newItem = new SimpleMissionItem(_controllerVehicle, this);
newItem->setSequenceNumber(sequenceNumber); newItem->setSequenceNumber(sequenceNumber);
newItem->setCoordinate(coordinate); newItem->setCommand((MavlinkQmlSingleton::Qml_MAV_CMD)(_controllerVehicle->firmwarePlugin()->supportedMissionCommands().contains((MAV_CMD)MAV_CMD_DO_SET_ROI_LOCATION) ?
newItem->setCommand(MavlinkQmlSingleton::MAV_CMD_DO_SET_ROI); MAV_CMD_DO_SET_ROI_LOCATION :
MAV_CMD_DO_SET_ROI));
_initVisualItem(newItem); _initVisualItem(newItem);
newItem->setDefaultsForCommand(); newItem->setDefaultsForCommand();
newItem->setCoordinate(coordinate);
double prevAltitude; double prevAltitude;
MAV_FRAME prevFrame; MAV_FRAME prevFrame;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment