Commit 70c8c4ab authored by DonLakeFlyer's avatar DonLakeFlyer

Better logging

parent 0b156cdd
......@@ -186,6 +186,7 @@ void GeoFenceController::sendToVehicle(void)
} else if (syncInProgress()) {
qCWarning(GeoFenceControllerLog) << "GeoFenceController::sendToVehicle called while syncInProgress";
} else {
qCDebug(GeoFenceControllerLog) << "GeoFenceController::sendToVehicle";
_geoFenceManager->sendToVehicle(_breachReturnPoint, _mapPolygon.pathModel());
_mapPolygon.setDirty(false);
setDirty(false);
......@@ -316,14 +317,14 @@ void GeoFenceController::_updateContainsItems(void)
bool GeoFenceController::showPlanFromManagerVehicle(void)
{
qCDebug(GeoFenceControllerLog) << "showPlanFromManagerVehicle";
qCDebug(GeoFenceControllerLog) << "showPlanFromManagerVehicle" << _editMode;
if (_masterController->offline()) {
qCWarning(GeoFenceControllerLog) << "GeoFenceController::showPlanFromManagerVehicle called while offline";
return true; // stops further propogation of showPlanFromManagerVehicle due to error
} else {
_itemsRequested = true;
if (!_managerVehicle->initialPlanRequestComplete()) {
// The vehicle hasn't completed initial load, we can just wait for newMissionItemsAvailable to be signalled automatically
// The vehicle hasn't completed initial load, we can just wait for loadComplete to be signalled automatically
qCDebug(GeoFenceControllerLog) << "showPlanFromManagerVehicle: !initialPlanRequestComplete, wait for signal";
return true;
} else if (syncInProgress()) {
......
......@@ -205,6 +205,7 @@ void MissionController::sendToVehicle(void)
} else if (syncInProgress()) {
qCWarning(MissionControllerLog) << "MissionControllerLog::sendToVehicle called while syncInProgress";
} else {
qCDebug(MissionControllerLog) << "MissionControllerLog::sendToVehicle";
if (_visualItems->count() == 1) {
// This prevents us from sending a possibly bogus home position to the vehicle
QmlObjectListModel emptyModel;
......@@ -1678,7 +1679,7 @@ void MissionController::_visualItemsDirtyChanged(bool dirty)
bool MissionController::showPlanFromManagerVehicle (void)
{
qCDebug(MissionControllerLog) << "showPlanFromManagerVehicle";
qCDebug(MissionControllerLog) << "showPlanFromManagerVehicle" << _editMode;
if (_masterController->offline()) {
qCWarning(MissionControllerLog) << "MissionController::showPlanFromManagerVehicle called while offline";
return true; // stops further propogation of showPlanFromManagerVehicle due to error
......
......@@ -157,6 +157,7 @@ void RallyPointController::sendToVehicle(void)
} else if (syncInProgress()) {
qCWarning(RallyPointControllerLog) << "RallyPointController::sendToVehicle called while syncInProgress";
} else {
qCDebug(RallyPointControllerLog) << "RallyPointController::sendToVehicle";
setDirty(false);
QList<QGeoCoordinate> rgPoints;
for (int i=0; i<_points.count(); i++) {
......@@ -280,13 +281,13 @@ void RallyPointController::_updateContainsItems(void)
bool RallyPointController::showPlanFromManagerVehicle (void)
{
qCDebug(RallyPointControllerLog) << "showPlanFromManagerVehicle";
qCDebug(RallyPointControllerLog) << "showPlanFromManagerVehicle _editMode" << _editMode;
if (_masterController->offline()) {
qCWarning(RallyPointControllerLog) << "RallyPointController::showPlanFromManagerVehicle called while offline";
return true; // stops further propogation of showPlanFromManagerVehicle due to error
} else {
if (!_managerVehicle->initialPlanRequestComplete()) {
// The vehicle hasn't completed initial load, we can just wait for newMissionItemsAvailable to be signalled automatically
// The vehicle hasn't completed initial load, we can just wait for loadComplete to be signalled automatically
qCDebug(RallyPointControllerLog) << "showPlanFromManagerVehicle: !initialPlanRequestComplete, wait for signal";
return true;
} else if (syncInProgress()) {
......
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