mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
add new example 'meshtastic' (WIP!) -- just a proof of concept version
This commit is contained in:
parent
5f6d5b2c0f
commit
9591d26a69
87 changed files with 14836 additions and 0 deletions
29
examples/meshtastic/cpp/qt.cpp
Normal file
29
examples/meshtastic/cpp/qt.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "qt.h"
|
||||
#include "ble_meshtastic.h"
|
||||
#include <QtDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QObject* ini() {
|
||||
static QObject* qt = nullptr;
|
||||
if (qt == nullptr) {
|
||||
qt = new QT;
|
||||
}
|
||||
return qt;
|
||||
}
|
||||
|
||||
QT::QT() : QObject() {
|
||||
ble = new BLE_ME;
|
||||
}
|
||||
|
||||
QVariant QT::read2() {
|
||||
ble->read();
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant QT::write2(const QVariant& bytes) {
|
||||
ble->write(bytes.toByteArray());
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
Loading…
Add table
Add a link
Reference in a new issue