Skip to content

Commit

Permalink
exp - can we run on QT 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Feb 23, 2024
1 parent 329e015 commit 4e9fb6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions app/telemetry/models/fcmavlinksystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ bool FCMavlinkSystem::process_message(const mavlink_message_t &msg)
set_sys_time_unix_usec(sys_time.time_unix_usec);
// TODO QT 6 doesn't have it
QDateTime time;
time.setTime_t(sys_time.time_unix_usec/1000/1000);
time.setMSecsSinceEpoch(sys_time.time_unix_usec/1000);
set_sys_time_unix_as_str(time.toString());

uint32_t boot_time = sys_time.time_boot_ms;
/*if (boot_time < m_last_boot || m_last_boot == 0) {
m_last_boot = boot_time;
Expand Down
10 changes: 5 additions & 5 deletions app/telemetry/tutil/geodesi_helper.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef GEODESI_HELPER_H
#define GEODESI_HELPER_H

#include <geographiclib-c-2.0/src/geodesic.h>
//#include <geographiclib-c-2.0/src/geodesic.h>
//#include "lib/geographiclib-c-2.0/src/geodesic.h"

// return: distance in m between 2 points
static double distance_between(double lat1,double lon1,double lat2,double lon2){
/*static double distance_between(double lat1,double lon1,double lat2,double lon2){
double s12;
//double azi1;
//double azi2;
Expand All @@ -16,10 +16,10 @@ static double distance_between(double lat1,double lon1,double lat2,double lon2){
geod_init(&geod,a,f);
geod_inverse(&geod,lat1,lon1,lat2,lon2,&s12,0,0); //&azi1,&azi2
return s12;
}
}*/

/*static double distance_between(double lat1,double lon1,double lat2,double lon2){
static double distance_between(double lat1,double lon1,double lat2,double lon2){
return 0;
}*/
}

#endif // GEODESI_HELPER_H
3 changes: 1 addition & 2 deletions app/util/qopenhd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ void QOpenHD::switchToLanguage(const QString &language) {
qDebug()<<"Error switch language- engine not set";
return;
}
// TODO QT 6 doesn't have it
QLocale::setDefault(language);
QLocale::setDefault(QLocale(language));

if (!m_translator.isEmpty()) {
QCoreApplication::removeTranslator(&m_translator);
Expand Down

0 comments on commit 4e9fb6c

Please sign in to comment.