mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 17:56:34 +00:00
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:
@@ -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(¤tTime);
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user