Skip to content

Commit

Permalink
2.5.4-alpha (#659)
Browse files Browse the repository at this point in the history
* add raw parse & decode

* add raw parse & decode

* fix weird malloc bug (hopefully) that crashes tcp connection from time to time. work on raw

* fix weird malloc bug (hopefully) that crashes tcp connection from time to time. work on raw

* fix weird malloc bug (hopefully) that crashes tcp connection from time to time. work on raw

* fix scale to fit grayed out on android

* back to rtp for now

* Improve Camera selection & camera (AIR CAM1, AIR CAM2) user interface
(Hide full param set)

* user interface- improve ui of param set when connection is lost, generify the (big) settings popup, work on camera selection

* user interface- improve ui of param set when connection is lost, generify the (big) settings popup, work on camera selection

* user interface- improve ui of param set when connection is lost, generify the (big) settings popup, work on camera selection

* more verbose camera param names

* improve connection mode auto / tcp connection (auto reconnect on dead server)

* improve connection mode auto / tcp connection (auto reconnect on dead server)

* experimental - add auto fetch params functionality

* improve params

* can't really remember all the things done ...

* can't really remember all the things done ...

* document a few more params

* fix a few comp warnings

* fix a few comp warnings

* fix a few comp warnings

* make soc status widget generic to reduce duplicated code

* add platform type, improve UI

* add dev overlay (stats), add preliminary joystick support for setting frequency, ...

* improve joystick menu, allow changing frequency on air only

* improve busy indicator, and joy

* use the quick panel as a new element only for joystick for now

* finalize joystick edit values element

* fix icon of gnd (CPU) status widget

* Finalize autofetch of params

* uncomment Quick panel for now

* A ton of things:
1) async 'interface' for qml -> cpp param -> qml
2) Generic UI element for mavlink int-choices
3) Use this UI element in the sidebar where appropriate

* A ton of things:
1) async 'interface' for qml -> cpp param -> qml
2) Generic UI element for mavlink int-choices
3) Use this UI element in the sidebar where appropriate

* A ton of things:
1) async 'interface' for qml -> cpp param -> qml
2) Generic UI element for mavlink int-choices
3) Use this UI element in the sidebar where appropriate

* A ton of things:
1) async 'interface' for qml -> cpp param -> qml
2) Generic UI element for mavlink int-choices
3) Use this UI element in the sidebar where appropriate

* A ton of things:
1) async 'interface' for qml -> cpp param -> qml
2) Generic UI element for mavlink int-choices
3) Use this UI element in the sidebar where appropriate

* improve param

* add setting 5180Mhz / lowband for pretty much norbert only ;)

* sidebar generify

* sidebar generify - make it (almost ;) joystick navigatable, fix a few other issues

* add joystick navigation to sidebar

* add joystick navigation to sidebar

* finalize sidebar, for now ;) @raphael

* add option to log the param set result (async)

* override qopenhd batt n cells setting from openhd if set

* fix a few minor quirks,show radiation icon instead of annoying tx errors log message

* finalize FC_BATT_N_CELLS param

* lowband - use 40Mhz spacing, show everything in the range of 5180 - 5300

* Frequency element - implement disarm requirement (can be overridden)

* Generify - mavlink choices now also supports string, so we can use it for the reslution_fps

* default camera choices

* default camera resolution choice(s)

* default camera resolution choice(s)

* Fix the annoying TCP cpu usage - if we are running on the ground station
itself, we don't need all this autoconnect jam ;)

* Fix the annoying TCP cpu usage - if we are running on the ground station
itself, we don't need all this autoconnect jam ;)

* i disabled a few checks for testing way back here...

* update mavlink

* update mavlink

* cleanup, also replace moodycamel queue with simple thread safe queue using std::condition_variable

* cleanup, also replace moodycamel queue with simple thread safe queue using std::condition_variable

* cleanup, also replace moodycamel queue with simple thread safe queue using std::condition_variable

* generify rc channels element

* Sidebar - add flips. Add busy indicator for a restarting camera.
Threadsafe queue, optimize mutex congestion,too.

* fix the sidebar channels

* typos

* experiment - OSD widget presets. uncomment for now

* experiment - OSD widget presets. uncomment for now

* use proper model for resolutions inside sidebar

* use proper model for resolutions inside sidebar

* use proper model for resolutions inside sidebar

* use proper model for resolutions inside sidebar

* use proper model for resolutions inside sidebar

* fix weird binding loops

* fix ui bug where camera selection dialoque shown for rock is incorrect

* show not available if the param is not exposed for a setting (which means the HW does not support changing it)

* wb max fec blk size changed in openhd
  • Loading branch information
Consti10 authored Feb 16, 2024
1 parent 67b8fd0 commit bce3ca4
Show file tree
Hide file tree
Showing 114 changed files with 6,081 additions and 8,937 deletions.
2 changes: 1 addition & 1 deletion QOpenHD.pro
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ SOURCES += \
app/main.cpp \

HEADERS += \
app/common/ThreadsafeQueue.hpp \
app/common/util_fs.h \
app/common/StringHelper.hpp \
app/common/TimeHelper.hpp \
app/common/Helper.hpp \
app/logging/hudlogmessagesmodel.h \
app/logging/loghelper.h \
app/logging/logmessagesmodel.h \
Expand Down
138 changes: 0 additions & 138 deletions app/common/Helper.hpp

This file was deleted.

59 changes: 59 additions & 0 deletions app/common/ThreadsafeQueue.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#ifndef THREADSAFEQUEUE_H
#define THREADSAFEQUEUE_H

#include <chrono>
#include <condition_variable>
#include <mutex>
#include <queue>
#include <optional>
#include <cassert>

/**
* Simple threadsafe queue supporting wait dequeue
*/
namespace qopenhd {
template<class T>
class ThreadsafeQueue {
public:
explicit ThreadsafeQueue(int capacity):m_capacity(capacity){};
// Enqueues a new element. Return true on success, false otherwise
bool try_enqueue(T element){
std::unique_lock<std::mutex> lk(mtx);
if(queue.size()>=m_capacity){
return false;
}
queue.push(element);
lk.unlock();// minimize lock contention
cv.notify_one();
return true;
}
// Wait up to timeout until element is available.
template<typename Rep, typename Period>
std::optional<T> wait_dequeue_timed(std::chrono::duration<Rep, Period> const& timeout){
std::unique_lock<std::mutex> ul(mtx);
if(!queue.empty()){
auto tmp=queue.front();
queue.pop();
return tmp;
}
const auto res=cv.wait_for(ul,timeout,[this](){
return !queue.empty();
});
if(!res){
// Timeout
return std::nullopt;
}
assert(!queue.empty());
auto tmp=queue.front();
queue.pop();
return tmp;
}
private:
const int m_capacity;
std::queue<T> queue;
std::mutex mtx;
std::condition_variable cv;
};
}

#endif // THREADSAFEQUEUE_H
Loading

0 comments on commit bce3ca4

Please sign in to comment.