Explorar el Código

Add if serial-port is in use

Joachim M. Giæver hace 1 año
padre
commit
e8d4e4daac
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 0 1
      src/hooks/connect-plug-zui-store
  2. 2 1
      src/hooks/prepare-plug-zui-store

+ 0 - 1
src/hooks/connect-plug-zui-store

@@ -1,6 +1,5 @@
 #!/usr/bin/env bash
 
-snapctl get --slot :zui-store serial > "${SNAP_DATA}.zui-serial"
 $SNAP/bin/cpy-2-zui
 
 logger "Connected ZUI (from: z2m)"

+ 2 - 1
src/hooks/prepare-plug-zui-store

@@ -1,3 +1,4 @@
 #!/usr/bin/env bash
 
-snapctl set :zui-store plugattribute="$(snapctl get -d server mqtt session)"
+snapctl set :zui-store z2mconfig="$(snapctl get -d server mqtt session)"
+snapctl set :zui-store z2mserial="$(snapctl is-connected serial-port && echo 1 || echo 0)"