Reduced and improved logging

- removed unnecessary logging
- print start date and time when application starts
- use std::cout instead of qDebug()
- better logging in DroneController classes
- renamed Controller states for better readability
This commit is contained in:
Tuomas Järvinen
2024-10-18 21:45:20 +02:00
parent 91257d0ce7
commit 54b7dc41ca
7 changed files with 78 additions and 117 deletions
+9
View File
@@ -1,3 +1,5 @@
#include <ctime>
#include <QCoreApplication>
#include <QDebug>
#include <QFile>
@@ -8,6 +10,13 @@
int main(int argc, char *argv[])
{
// Add current data and time for easier log handling.
std::cout << "\n#################################################\n";
std::time_t currentTime = std::time(nullptr);
std::tm* localTime = std::localtime(&currentTime);
std::cout << "Starting autopilot program at " << std::put_time(localTime, "%Y-%m-%d %H:%M:%S") << std::endl;
std::cout << "#################################################\n";
// This is needed to have main event loop and signal-slot events in the AzDroneController.
QCoreApplication a(argc, argv);