Additional dbus methods

This commit is contained in:
Luke
2020-07-01 10:40:19 +12:00
parent a731361278
commit cff0af76c8
9 changed files with 138 additions and 61 deletions

View File

@@ -198,6 +198,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
.unwrap_or_else(|err| warn!("{}", err));
}
_ => {
let json = serde_json::to_string(&command)?;
led_writer
.do_command(command, &mut config)
.await
@@ -206,14 +207,7 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
.send(
effect_cancel_signal
.msg(&DBUS_PATH.into(), &DBUS_IFACE.into())
.append1(true),
)
.unwrap_or_else(|_| 0);
connection
.send(
effect_cancel_signal
.msg(&DBUS_PATH.into(), &DBUS_IFACE.into())
.append1(false),
.append1(json),
)
.unwrap_or_else(|_| 0);
}