*** zbenjamin is now known as Guest61278 | 02:01 | |
*** zbenjamin_ is now known as zbenjamin | 02:01 | |
*** zbenjamin_ is now known as zbenjamin | 02:59 | |
*** frinring_ is now known as frinring | 04:15 | |
*** nyov is now known as Guest69864 | 04:51 | |
piggz | rinigus: i now have an empty NavigationInterface class in amazfish | 17:41 |
---|---|---|
rinigus | piggz: what is it? | 17:44 |
rinigus | NavigationInterface? | 17:45 |
piggz | my c++ interface to your dbus interface | 17:49 |
rinigus | piggz: oooh, I was for some reason thinking about qml components. completely forgot dbus and navigation (switching between projects can have funny effects) | 18:14 |
rinigus | nice! | 18:14 |
piggz | rinigus: do your *Changed signal include the value, or do you have to read the property back? | 19:15 |
rinigus | piggz: signal is without value, sorry. it's for simplicity (on my side) reasons | 19:15 |
piggz | thats fine, just so i know | 19:16 |
piggz | rinigus: do you register all the signals at start? | 19:52 |
rinigus | piggz: I would expect so. it should be done automatically by Qt | 19:53 |
rinigus | something missing? | 19:54 |
piggz | let 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:33 | 19:54 |
rinigus | piggz: let me see | 19:55 |
piggz | rinigus: wait, i found something | 19:55 |
rinigus | piggz: waiting... | 19:55 |
piggz | rinigus: nope, you may continue :D | 19:57 |
piggz | rinigus: when I run dbus-watcher, i do see that signal though | 19:58 |
rinigus | piggz: you mean dbus-monitor? | 19:59 |
piggz | aye | 19:59 |
rinigus | since that's the way I would check | 19:59 |
rinigus | is the signal fired on narrative instruction change? | 19:59 |
piggz | yes | 20:00 |
rinigus | then that's on your side :) . | 20:00 |
rinigus | piggz: do you know that pure maps has a special debug mode where you can move even in full lockdown? | 20:00 |
piggz | i didnt ... | 20:01 |
rinigus | in preferences/development - set position to the map center | 20:01 |
rinigus | then when you move the map, the position will be set to what it thinks is center | 20:01 |
rinigus | in active navigation, the center is on the bottom part of the map | 20:02 |
rinigus | ... and I just reduced your physical activity | 20:02 |
piggz | rinigus: im not sure you register your object properly ... this is how i do it | 20:02 |
piggz | if (!connection.registerObject(PATH, this, QDBusConnection::ExportAllInvokables | QDBusConnection::ExportAllSignals | QDBusConnection::ExportAllProperties)) | 20:02 |
piggz | you have | 20:03 |
piggz | if (!dbusconnection->registerObject(DBUS_PATH_NAVIGATOR, this)) | 20:03 |
rinigus | piggz: ok, let me see | 20:04 |
rinigus | piggz: it is running through adaptor which is using setAutoRelaySignals(true); | 20:05 |
piggz | well, that may relay them, but does it register them on the bus to be discoverable ? | 20:05 |
rinigus | piggz: when running on PC, I see signals in dbus-monitor. re discoverable, let's see | 20:06 |
rinigus | should be, they are in org.freedesktop.DBus.Introspectable | 20:07 |
rinigus | piggz: but maybe Qt needs something extra. mystery | 20:08 |
rinigus | piggz: I have connected some signals from DBus to Qt as in https://github.com/sailfishos-flatpak/maliit-framework/blob/flatpak/input-context/minputcontext.cpp#L104 | 20:13 |
rinigus | maybe that would help? | 20:13 |
rinigus | note that this is p2p connection and has a bit different syntax. but something like it should be for our case as well | 20:14 |
rinigus | piggz ^ | 20:14 |
piggz | lets see | 20:21 |
piggz | rinigus: my other code which connected between amazfish daemon and ui doesnt need anything special | 20:26 |
rinigus | piggz: can't tell why this is different. I presume something like QDBusConnection::sessionBus().connect(...) should do | 20:29 |
piggz | rinigus: this is how I expost the daemon. https://github.com/piggz/harbour-amazfish/blob/master/daemon/src/deviceinterface.cpp#L654 | 20:29 |
piggz | and this is how i watch for it to appear, and connect to all signals https://github.com/piggz/harbour-amazfish/blob/master/ui/src/daemoninterface.cpp#L74 | 20:30 |
piggz | rinigus: also, there is this magic i think in the daemon https://github.com/piggz/harbour-amazfish/blob/master/daemon/src/deviceinterface.h#L34 | 20:31 |
rinigus | piggz: 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 |
piggz | rinigus: 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 | ... | 20:36 |
piggz | connect(iface, SIGNAL(narrativeChanged()), this, SLOT(narrativeChanged()), Qt::UniqueConnection); | 20:36 |
piggz | in that .... is a check that ifave is valid, which it is, so that part is ok | 20:36 |
rinigus | piggz: are you sure you are using correct iface name? there are 2 in pure maps | 20:38 |
piggz | i 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 |
rinigus | looks fine, indeed | 20:39 |
rinigus | piggz: but OK, what will happen if you use QDBusConnection::sessionBus().connect(...) directly? | 20:40 |
rinigus | as in https://doc.qt.io/qt-5/qdbusconnection.html#connect | 20:41 |
piggz | rinigus: yeah, thats works, i just with is was as simple as my exisiting code | 20:51 |
rinigus | piggz: there is probably something different in generated XML that trips qt connect. not sure what | 20:54 |
rinigus | as far as I understand, having solution like https://github.com/piggz/harbour-amazfish/blob/master/daemon/src/deviceinterface.cpp#L654 just avoids making QDBusAbstractAdaptor | 20:55 |
piggz | rinigus: do you think at the moment, its enough to listen for running and narrative changed ? | 21:01 |
rinigus | piggz: 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 |
piggz | cya | 21:04 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!