Fix the virtual lock device
Update the state of the lock to match the updated schema
Change-Id: I024733c8f2e63e43bc43b881a6c9e8f1ff51d47d
Reviewed-on: https://weave-review.googlesource.com/1523
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/examples/daemon/README b/examples/daemon/README
index 287459f..c767420 100644
--- a/examples/daemon/README
+++ b/examples/daemon/README
@@ -8,8 +8,8 @@
examples/prerequisites.sh
- build daemon
examples/build.sh
- - binaries for daemon is at
- out/Debug/weave_daemon
+ - binaries for daemon are in the directory
+ out/Debug/
Prepare Host OS
---------------
@@ -50,7 +50,7 @@
93019287-6b26-04a0-22ee-d55ad23a4226
- go to terminal, register and start the daemon with
- sudo out/Debug/weave_daemon --registration_ticket=93019287-6b26-04a0-22ee-d55ad23a4226
+ sudo out/Debug/weave_daemon_sample --registration_ticket=93019287-6b26-04a0-22ee-d55ad23a4226
you should see something like:
Publishing service
diff --git a/examples/daemon/lock/lock.cc b/examples/daemon/lock/lock.cc
index e1ca2d9..3014fb1 100644
--- a/examples/daemon/lock/lock.cc
+++ b/examples/daemon/lock/lock.cc
@@ -34,11 +34,16 @@
device_ = device;
device->AddStateDefinitionsFromJson(R"({
- "lock": {"lockedState": ["locked", "unlocked", "partiallyLocked"]}
+ "lock": {
+ "lockedState": ["locked", "unlocked", "partiallyLocked"],
+ "isLockingSupported": "boolean"}
})");
device->SetStatePropertiesFromJson(R"({
- "lock":{"lockedState": "locked"}
+ "lock":{
+ "lockedState": "locked",
+ "isLockingSupported": true
+ }
})",
nullptr);