openDsh / dash

Join us on Slack! https://join.slack.com/t/opendsh/shared_invite/zt-la398uly-a6eMH5ttEQhbtE6asVKx4Q
GNU General Public License v3.0
238 stars 69 forks source link

Allows for injecting button presses into openauto #74

Closed icecube45 closed 2 years ago

icecube45 commented 2 years ago

Adds method into arbiter that can inject button presses into OpenAuto (this means we can now play/pause/whatever from within dash and plugins).

Requires https://github.com/openDsh/openauto/pull/22

rsjudka commented 2 years ago

lgtm, i feel like the arbiter might not be the best place for it.. but ill reserve my judgment until i ever have to use it haha (and then just refactor then)

icecube45 commented 2 years ago

lgtm, i feel like the arbiter might not be the best place for it.. but ill reserve my judgment until i ever have to use it haha (and then just refactor then)

I think it's the best place (right now) because arbiter is already shoved into everything that I'd want to inject button presses (media page, plugins)

but with some exploratory work I'm doing in aasdk/openauto regarding media / navigation services, I'm thinking I might end up writing an extended openauto interface that handles this / callbacks and such. That's in the future though.

rsjudka commented 2 years ago

yeah I would think you would still be using the arbiter, but you could instead just access the openauto stuff via arbiter->layout()->openauto_page (basically a direct call vs using the signal/slot stuff)

but that openauto interface would actually be awesome! could add that to the Session object so that way it can be accessed from anywhere, and that way we can refactor out all the current openauto "interface" stuff from the page (which should really just be UI stuff anyway)