<commit_before>#include "QGCMapWidget.h"
#include "QsLog.h"
#include "QGCMapToolBar.h"
#include "UASInterface.h"
#include "UASManager.h"
#include "MAV2DIcon.h"
#include "Waypoint2DIcon.h"
#include "UASWaypointManager.h"
#include "ArduPilotMegaMAV.h"
#include "WaypointNavigation.h"
#include <QInputDialog>

QGCMapWidget::QGCMapWidget(QWidget *parent) :
    mapcontrol::OPMapWidget(parent),
    firingWaypointChange(NULL),
    maxUpdateInterval(2.1f), // 2 seconds
    followUAVEnabled(false),
    trailType(mapcontrol::UAVTrailType::ByTimeElapsed),
    trailInterval(2.0f),
    followUAVID(0),
    mapInitialized(false),
    homeAltitude(0),
    uas(NULL)
{
    currWPManager = UASManager::instance()->getActiveUASWaypointManager();
    waypointLines.insert(0, new QGraphicsItemGroup(map));
    connect(currWPManager, SIGNAL(waypointEditableListChanged(int)), this, SLOT(updateWaypointList(int)));
    connect(currWPManager, SIGNAL(waypointEditableChanged(int, Waypoint*)), this, SLOT(updateWaypoint(int,Waypoint*)));
    connect(this, SIGNAL(waypointCreated(Waypoint*)), currWPManager, SLOT(addWaypointEditable(Waypoint*)));
    connect(this, SIGNAL(waypointChanged(Waypoint*)), currWPManager, SLOT(notifyOfChangeEditable(Waypoint*)));
    offlineMode = true;
    // Widget is inactive until shown
    defaultGuidedRelativeAlt = 100.0; // Default set to 100m
    defaultGuidedAltFirstTimeSet = false;
    loadSettings();

    //handy for debugging:
    //this->SetShowTileGridLines(true);<commit_msg>Map Widget: Place cache inside apmplanner2 directory<commit_after>#include "QGCMapWidget.h"
#include "QsLog.h"
#include "QGCMapToolBar.h"
#include "UASInterface.h"
#include "UASManager.h"
#include "MAV2DIcon.h"
#include "Waypoint2DIcon.h"
#include "UASWaypointManager.h"
#include "ArduPilotMegaMAV.h"
#include "WaypointNavigation.h"
#include <QInputDialog>

QGCMapWidget::QGCMapWidget(QWidget *parent) :
    mapcontrol::OPMapWidget(parent),
    firingWaypointChange(NULL),
    maxUpdateInterval(2.1f), // 2 seconds
    followUAVEnabled(false),
    trailType(mapcontrol::UAVTrailType::ByTimeElapsed),
    trailInterval(2.0f),
    followUAVID(0),
    mapInitialized(false),
    homeAltitude(0),
    uas(NULL)
{
    // Set the map cache directory
    configuration->SetCacheLocation(QGC::appDataDirectory() + "/mapscache/");

    currWPManager = UASManager::instance()->getActiveUASWaypointManager();
    waypointLines.insert(0, new QGraphicsItemGroup(map));
    connect(currWPManager, SIGNAL(waypointEditableListChanged(int)), this, SLOT(updateWaypointList(int)));
    connect(currWPManager, SIGNAL(waypointEditableChanged(int, Waypoint*)), this, SLOT(updateWaypoint(int,Waypoint*)));
    connect(this, SIGNAL(waypointCreated(Waypoint*)), currWPManager, SLOT(addWaypointEditable(Waypoint*)));
    connect(this, SIGNAL(waypointChanged(Waypoint*)), currWPManager, SLOT(notifyOfChangeEditable(Waypoint*)));
    offlineMode = true;
    // Widget is inactive until shown
    defaultGuidedRelativeAlt = 100.0; // Default set to 100m
    defaultGuidedAltFirstTimeSet = false;
    loadSettings();

    //handy for debugging:
    //this->SetShowTileGridLines(true);
{'fraction_non_alphanumeric': 0.13026941362916006, 'fraction_numerical': 0.011093502377179081, 'mean_word_length': 6.14027149321267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2237033', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1061, 'n_words': 168}