Skip to content

Commit

Permalink
merge newest release (#603)
Browse files Browse the repository at this point in the history
* Fix ui unresponsive after reboot / shutdown command - in the end, the issue was in qml, not anywhere in c++ (async / blocking interface is fine). Leaving the debug messages though.

* move QOpenHD service buttons / dialoque to DEV, tx power - select card manufacturer first

* add forwarding of user to connect / channel scan when system is not alive
update mavlink - show wifi hotspot state in status
add pollution chart
improve frequency selection

* pollution chart improvements

* seperate logging OpenHD ground / air

* wb link settings - better use available space and group things

* wb link settings - better use available space and group things

* connection mode auto

* UI stuff

* UI stuff

* fucking hell, hard code it

* pretty fonts

* pretty fonts

* fix tcp

* Fix betaflight RC channels by uncommenting a couple of lines

* reinstate a fix that got lost - 0 is valid sysid that betaflight uses

* add stbc / ldpc enable popup, improve UI

* add stbc / ldpc enable popup, improve UI

* performancehorizonladder - new simple approach

* performancehorizonladder - new simple approach

* small ui improvements

* accident, was only for debugging

* small UI improvements and rename

---------

Co-authored-by: consti10 <[email protected]>
Co-authored-by: Pete A <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2023
1 parent 794a4c6 commit bd6d4d3
Show file tree
Hide file tree
Showing 86 changed files with 3,390 additions and 3,408 deletions.
2 changes: 0 additions & 2 deletions QOpenHD.pro
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ SOURCES += \
app/osd/altitudeladder.cpp \
app/osd/flightpathvector.cpp \
app/osd/aoagauge.cpp \
app/osd/performancehorizonladder.cpp \

HEADERS += \
app/osd/headingladder.h \
Expand All @@ -144,7 +143,6 @@ HEADERS += \
app/osd/flightpathvector.h \
app/osd/debug_overdraw.hpp \
app/osd/aoagauge.h \
app/osd/performancehorizonladder.h \


RESOURCES += qml/qml.qrc
Expand Down
17 changes: 12 additions & 5 deletions app/logging/logmessagesmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@

#include "hudlogmessagesmodel.h"

LogMessagesModel &LogMessagesModel::instanceOHD()

LogMessagesModel &LogMessagesModel::instanceGround()
{
static LogMessagesModel instance;
return instance;
}

LogMessagesModel &LogMessagesModel::instanceOHDAir()
{
static LogMessagesModel* instance=new LogMessagesModel();
return *instance;
static LogMessagesModel instance;
return instance;
}

LogMessagesModel &LogMessagesModel::instanceFC()
{
static LogMessagesModel* instance_fc=new LogMessagesModel();
return *instance_fc;
static LogMessagesModel instance;
return instance;
}

LogMessagesModel::LogMessagesModel(QObject *parent) :
Expand Down
4 changes: 2 additions & 2 deletions app/logging/logmessagesmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class LogMessagesModel : public QAbstractListModel
{
Q_OBJECT
public:
// Instance for all OpenHD air / ground messages
static LogMessagesModel& instanceOHD();
static LogMessagesModel& instanceGround();
static LogMessagesModel& instanceOHDAir();
// We have a seperate model for the FC log messages
static LogMessagesModel& instanceFC();

Expand Down
12 changes: 6 additions & 6 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const QVector<QString> permissions({"android.permission.INTERNET",
#include "osd/horizonladder.h"
#include "osd/flightpathvector.h"
#include "osd/aoagauge.h"
#include "osd/performancehorizonladder.h"

// Video - annyoing ifdef crap is needed for all the different platforms / configurations
#include "decodingstatistcs.h"
Expand Down Expand Up @@ -256,8 +255,6 @@ int main(int argc, char *argv[]) {
qmlRegisterType<HorizonLadder>("OpenHD", 1, 0, "HorizonLadder");
qmlRegisterType<FlightPathVector>("OpenHD", 1, 0, "FlightPathVector");
qmlRegisterType<AoaGauge>("OpenHD", 1, 0, "AoaGauge");
qmlRegisterType<PerformanceHorizonLadder>("OpenHD", 1, 0, "PerformanceHorizonLadder");


QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("_qopenhd", &QOpenHD::instance());
Expand All @@ -272,8 +269,11 @@ int main(int argc, char *argv[]) {

engine.rootContext()->setContextProperty("_qrenderstats", &QRenderStats::instance());

engine.rootContext()->setContextProperty("_ohdlogMessagesModel", &LogMessagesModel::instanceOHD());
engine.rootContext()->setContextProperty("_fclogMessagesModel", &LogMessagesModel::instanceFC());
//engine.rootContext()->setContextProperty("_ohdlogMessagesModel", &LogMessagesModel::instanceOHD());
//engine.rootContext()->setContextProperty("_fclogMessagesModel", &LogMessagesModel::instanceFC());
engine.rootContext()->setContextProperty("_logGround", &LogMessagesModel::instanceGround());
engine.rootContext()->setContextProperty("_logOpenhdAir", &LogMessagesModel::instanceOHDAir());
engine.rootContext()->setContextProperty("_logFC", &LogMessagesModel::instanceFC());
engine.rootContext()->setContextProperty("_hudLogMessagesModel", &HUDLogMessagesModel::instance());

// Telemetry - first all the models
Expand Down Expand Up @@ -373,7 +373,7 @@ int main(int argc, char *argv[]) {

QRenderStats::instance().register_to_root_window(engine);

LogMessagesModel::instanceOHD().addLogMessage("QOpenHD","running");
LogMessagesModel::instanceGround().addLogMessage("QOpenHD","running");
const int retval = app.exec();

return retval;
Expand Down
4 changes: 1 addition & 3 deletions app/osd/altitudeladder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ void AltitudeLadder::paint(QPainter* painter) {
setFillColor(QColor::fromRgb(0,255,0,128));
}

QFont font("sans-serif", 10, QFont::Bold, false);

painter->setFont(m_font);

auto alt = m_altitude;
Expand Down Expand Up @@ -121,6 +119,6 @@ void AltitudeLadder::setAltitudeRange(int altitudeRange) {
void AltitudeLadder::setFontFamily(QString fontFamily) {
m_fontFamily = fontFamily;
emit fontFamilyChanged(m_fontFamily);
m_font = QFont(m_fontFamily, 11, QFont::Bold, false);
m_font = QFont(m_fontFamily, 13, QFont::Bold, false);
update();
}
220 changes: 0 additions & 220 deletions app/osd/performancehorizonladder.cpp

This file was deleted.

47 changes: 0 additions & 47 deletions app/osd/performancehorizonladder.h

This file was deleted.

Loading

0 comments on commit bd6d4d3

Please sign in to comment.