Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Sep 29, 2023
2 parents 29c4e32 + 4b14084 commit c807291
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/homeform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ homeform::homeform(QQmlApplicationEngine *engine, bluetooth *bl) {
deviceConnected(b);
}

#ifdef Q_OS_ANDROID
#ifndef Q_OS_IOS
iphone_browser = new QMdnsEngine::Browser(&iphone_server, "_qz_iphone._tcp.local.", &iphone_cache);

QObject::connect(iphone_browser, &QMdnsEngine::Browser::serviceAdded, [](const QMdnsEngine::Service &service) {
Expand Down Expand Up @@ -2870,8 +2870,8 @@ void homeform::pelotonOffset_Minus() { Minus(QStringLiteral("peloton_offset"));
void homeform::bluetoothDeviceConnected(bluetoothdevice *b) {
this->innerTemplateManager->start(b);
this->userTemplateManager->start(b);
#ifdef Q_OS_ANDROID
// heart rate received from apple watch while QZ is running on android via TCP socket (iphone_socket)
#ifndef Q_OS_IOS
// heart rate received from apple watch while QZ is running on a different device via TCP socket (iphone_socket)
connect(this, SIGNAL(heartRate(uint8_t)), b, SLOT(heartRate(uint8_t)));
#endif
}
Expand Down Expand Up @@ -5064,7 +5064,7 @@ void homeform::update() {
lapTrigger = false;
}

#ifdef Q_OS_ANDROID
#ifndef Q_OS_IOS
if (iphone_socket && iphone_socket->state() == QAbstractSocket::ConnectedState) {
QString toSend =
"SENDER=PAD#HR=" + QString::number(bluetoothManager->device()->currentHeart().value()) +
Expand Down
2 changes: 2 additions & 0 deletions src/homeform.h
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,9 @@ class homeform : public QObject {

#ifdef Q_OS_ANDROID
bool floating_open = false;
#endif

#ifndef Q_OS_IOS
QMdnsEngine::Browser* iphone_browser = nullptr;
QMdnsEngine::Resolver* iphone_resolver = nullptr;
QMdnsEngine::Server iphone_server;
Expand Down

0 comments on commit c807291

Please sign in to comment.