Wednesday, 2020-12-02

*** zbenjamin is now known as Guest6127802:01
*** zbenjamin_ is now known as zbenjamin02:01
*** zbenjamin_ is now known as zbenjamin02:59
*** frinring_ is now known as frinring04:15
*** nyov is now known as Guest6986404:51
piggzrinigus: i now have an empty NavigationInterface class in amazfish17:41
riniguspiggz: what is it?17:44
piggzmy c++ interface to your dbus interface17:49
riniguspiggz: oooh, I was for some reason thinking about qml components. completely forgot dbus and navigation (switching between projects can have funny effects)18:14
piggzrinigus: do your *Changed signal include the value, or do you have to read the property back?19:15
riniguspiggz: signal is without value, sorry. it's for simplicity (on my side) reasons19:15
piggzthats fine, just so i know19:16
piggzrinigus: do you register all the signals at start?19:52
riniguspiggz: I would expect so. it should be done automatically by Qt19:53
rinigussomething missing?19:54
piggzlet me see if i made a mistake first...19:54
piggz[W] unknown:0 - QObject::connect: No such signal QDBusAbstractInterface::narrativeChanged() in ../../harbour-amazfish/daemon/src/navigationinterface.cpp:3319:54
riniguspiggz: let me see19:55
piggzrinigus: wait, i found something19:55
riniguspiggz: waiting...19:55
piggzrinigus: nope, you may continue :D19:57
piggzrinigus: when I run dbus-watcher, i do see that signal though19:58
riniguspiggz: you mean dbus-monitor?19:59
rinigussince that's the way I would check19:59
rinigusis the signal fired on narrative instruction change?19:59
rinigusthen that's on your side :) .20:00
riniguspiggz: do you know that pure maps has a special debug mode where you can move even in full lockdown?20:00
piggzi didnt ...20:01
rinigusin preferences/development - set position to the map center20:01
rinigusthen when you move the map, the position will be set to what it thinks is center20:01
rinigusin active navigation, the center is on the bottom part of the map20:02
rinigus... and I just reduced your physical activity20:02
piggzrinigus: im not sure you register your object properly ... this is how i do it20:02
piggz        if (!connection.registerObject(PATH, this, QDBusConnection::ExportAllInvokables | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllProperties))20:02
piggzyou have20:03
piggz  if (!dbusconnection->registerObject(DBUS_PATH_NAVIGATOR, this))20:03
riniguspiggz: ok, let me see20:04
riniguspiggz: it is running through adaptor which is using setAutoRelaySignals(true);20:05
piggzwell, that may relay them, but does it register them on the bus to be discoverable ?20:05
riniguspiggz: when running on PC, I see signals in dbus-monitor. re discoverable, let's see20:06
rinigusshould be, they are in org.freedesktop.DBus.Introspectable20:07
riniguspiggz: but maybe Qt needs something extra. mystery20:08
riniguspiggz: I have connected some signals from DBus to Qt as in
rinigusmaybe that would help?20:13
rinigusnote that this is p2p connection and has a bit different syntax. but something like it should be for our case as well20:14
riniguspiggz ^20:14
piggzlets see20:21
piggzrinigus: my other code which connected between amazfish daemon and ui doesnt need anything special20:26
riniguspiggz: can't tell why this is different. I presume something like QDBusConnection::sessionBus().connect(...) should do20:29
piggzrinigus: this is how I expost the daemon.
piggzand this is how i watch for it to appear, and connect to all signals
piggzrinigus: also, there is this magic i think in the daemon
riniguspiggz: I have that magic in the other place to be able to filter what is exported to dbus and what is not. but I am sure that this connect syntax through bus should work.20:35
piggzrinigus: this is the connect that is failing....20:35
piggz    iface = new QDBusInterface(QStringLiteral(SERVICE_NAME), QStringLiteral(OBJECT_PATH), QStringLiteral(INTERFACE_NAME), QDBusConnection::sessionBus());20:36
piggz    connect(iface, SIGNAL(narrativeChanged()), this, SLOT(narrativeChanged()), Qt::UniqueConnection);20:36
piggzin that .... is a check that ifave is valid, which it is, so that part is ok20:36
riniguspiggz: are you sure you are using correct iface name? there are 2 in pure maps20:38
piggzi think so....20:38
piggz#define SERVICE_NAME "io.github.rinigus.PureMaps"20:39
piggz#define INTERFACE_NAME "io.github.rinigus.PureMaps.navigator"20:39
piggz#define OBJECT_PATH "/io/github/rinigus/PureMaps/navigator"20:39
riniguslooks fine, indeed20:39
riniguspiggz: but OK, what will happen if you use QDBusConnection::sessionBus().connect(...) directly?20:40
rinigusas in
piggzrinigus: yeah, thats works, i just with is was as simple as my exisiting code20:51
riniguspiggz: there is probably something different in generated XML that trips qt connect. not sure what20:54
rinigusas far as I understand, having solution like just avoids making QDBusAbstractAdaptor20:55
piggzrinigus: do you think at the moment, its enough to listen for running and narrative changed ?21:01
riniguspiggz: you could start there. but I suspect that street, manDist, icon could be of interest. if you want to see on the bike when to turn... but first, POC should be done :)21:04
rinigus(I'll be off now, will read tomorrow)21:04

Generated by 2.17.1 by Marius Gedminas - find it at!