From 70c8c4ab7bfee75f1eee11d2a993aa2ef2a7a27b Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Tue, 25 Apr 2017 10:53:40 -0700 Subject: [PATCH] Better logging --- src/MissionManager/GeoFenceController.cc | 5 +++-- src/MissionManager/MissionController.cc | 3 ++- src/MissionManager/RallyPointController.cc | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/MissionManager/GeoFenceController.cc b/src/MissionManager/GeoFenceController.cc index 3b8f6df84..d3f4b284c 100644 --- a/src/MissionManager/GeoFenceController.cc +++ b/src/MissionManager/GeoFenceController.cc @@ -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()) { diff --git a/src/MissionManager/MissionController.cc b/src/MissionManager/MissionController.cc index 7f98d0daa..a8bf78486 100644 --- a/src/MissionManager/MissionController.cc +++ b/src/MissionManager/MissionController.cc @@ -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 diff --git a/src/MissionManager/RallyPointController.cc b/src/MissionManager/RallyPointController.cc index 8b48dd9d4..a4f3967d7 100644 --- a/src/MissionManager/RallyPointController.cc +++ b/src/MissionManager/RallyPointController.cc @@ -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 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()) { -- 2.22.0