Skip to content

Commit

Permalink
small comp fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Feb 29, 2024
1 parent 43f2565 commit 2693ed5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ target_link_libraries(QOpenHDApp
)

include(lib/h264/h264.cmake)
include(app/videostreaming/avcodec/avcodec_video.cmake)
#include(app/videostreaming/avcodec/avcodec_video.cmake)
include(app/videostreaming/android/videostreamingandroid.cmake)

#include(GNUInstallDirs)
Expand Down
6 changes: 3 additions & 3 deletions app/telemetry/connection/tcp_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ void TCPConnection::receive_until_stopped()
// Enough for MTU 1500 bytes.
auto buffer=std::make_unique<std::vector<uint8_t>>();
buffer->resize(1500);
struct timeval tv;
tv.tv_sec = 3;
tv.tv_usec = 0;
//struct timeval tv;
//tv.tv_sec = 3;
//tv.tv_usec = 0;
//setsockopt(m_socket_fd, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv);
while (m_keep_receiving) {
const auto elapsed_last_message=QOpenHDMavlinkHelper::getTimeMilliseconds()-m_last_data_ms;
Expand Down
10 changes: 2 additions & 8 deletions app/telemetry/models/markermodel.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include <QThread>
// #include <QtConcurrent>
#include <QFutureWatcher>
#include <QFuture>

#include "markermodel.h"

Expand Down Expand Up @@ -43,13 +41,9 @@ int Traffic::distance() const{
}


static MarkerModel* _instance = nullptr;

MarkerModel* MarkerModel::instance() {
if (_instance == nullptr) {
_instance = new MarkerModel();
}
return _instance;
static MarkerModel m_instance{};
return &m_instance;
}

MarkerModel::MarkerModel(QObject *parent): QAbstractListModel(parent){
Expand Down

0 comments on commit 2693ed5

Please sign in to comment.