Skip to content

Commit

Permalink
Merge pull request mavlink#1405 from YUNEEC/camerModeSwitchDuringMission
Browse files Browse the repository at this point in the history
Keep track of camera mode switch done by the autopilot
  • Loading branch information
dogmaphobic authored Feb 26, 2018
2 parents f55c976 + c5ef6df commit 99d80e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## DataPilot Release Changelog

### V1.2.71 - Feb 26 2018

* Keep track of camera mode switch done by the autopilot (during missions). Needs updated camera firmware as well.

### V1.2.70 - Feb 26 2018

* Calibrating the E10T camera for its new 4.4mm lens
Expand Down
10 changes: 10 additions & 0 deletions custom/src/FirmwarePlugin/YuneecCameraControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,16 @@ YuneecCameraControl::factChanged(Fact* pFact)
_captureInfoRetries = 0;
_captureStatusTimer.start(1000);
}
//-- Autopilot is changing the camera mode. We need to keep track of it.
if(pFact->name() == kCAM_MODE) {
if(_inMissionMode) {
if(pFact->rawValue().toUInt() == CAM_MODE_PHOTO || pFact->rawValue().toUInt() == CAM_MODE_SURVEY) {
_setCameraMode(CAM_MODE_PHOTO);
} else {
_setCameraMode(CAM_MODE_VIDEO);
}
}
}
}

//-----------------------------------------------------------------------------
Expand Down

0 comments on commit 99d80e2

Please sign in to comment.