Commit bb74e6af authored by Willian Galvani's avatar Willian Galvani

Vehicle.cc: set videoSource to UDP if disabled and running ArduSub

parent 8fb2eb76
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "QGCCameraManager.h" #include "QGCCameraManager.h"
#include "VideoReceiver.h" #include "VideoReceiver.h"
#include "VideoManager.h" #include "VideoManager.h"
#include "VideoSettings.h"
#include "PositionManager.h" #include "PositionManager.h"
#if defined(QGC_AIRMAP_ENABLED) #if defined(QGC_AIRMAP_ENABLED)
#include "AirspaceVehicleManager.h" #include "AirspaceVehicleManager.h"
...@@ -493,6 +494,12 @@ void Vehicle::_commonInit(void) ...@@ -493,6 +494,12 @@ void Vehicle::_commonInit(void)
_flightDistanceFact.setRawValue(0); _flightDistanceFact.setRawValue(0);
_flightTimeFact.setRawValue(0); _flightTimeFact.setRawValue(0);
// Set video stream to udp if running ArduSub and Video is disabled
if (sub() && _settingsManager->videoSettings()->videoSource()->rawValue() == VideoSettings::videoDisabled)
{
_settingsManager->videoSettings()->videoSource()->setRawValue(VideoSettings::videoSourceUDP);
}
//-- Airspace Management //-- Airspace Management
#if defined(QGC_AIRMAP_ENABLED) #if defined(QGC_AIRMAP_ENABLED)
AirspaceManager* airspaceManager = _toolbox->airspaceManager(); AirspaceManager* airspaceManager = _toolbox->airspaceManager();
......
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