Commissioning: Show QR Code only when in commissioning mode
This commit is contained in:
parent
fcb7f9c28e
commit
f05a20b18a
1 changed files with 5 additions and 3 deletions
|
@ -61,12 +61,14 @@ impl Matter {
|
||||||
let mdns = Mdns::get()?;
|
let mdns = Mdns::get()?;
|
||||||
mdns.set_values(dev_det.vid, dev_det.pid, &dev_det.device_name);
|
mdns.set_values(dev_det.vid, dev_det.pid, &dev_det.device_name);
|
||||||
|
|
||||||
print_pairing_code_and_qr(&dev_det, &dev_comm, DiscoveryCapabilities::default());
|
|
||||||
|
|
||||||
let fabric_mgr = Arc::new(FabricMgr::new()?);
|
let fabric_mgr = Arc::new(FabricMgr::new()?);
|
||||||
|
let open_comm_window = fabric_mgr.is_empty();
|
||||||
|
if open_comm_window {
|
||||||
|
print_pairing_code_and_qr(&dev_det, &dev_comm, DiscoveryCapabilities::default());
|
||||||
|
}
|
||||||
|
|
||||||
let acl_mgr = Arc::new(AclMgr::new()?);
|
let acl_mgr = Arc::new(AclMgr::new()?);
|
||||||
let mut pase = PaseMgr::new();
|
let mut pase = PaseMgr::new();
|
||||||
let open_comm_window = fabric_mgr.is_empty();
|
|
||||||
let data_model =
|
let data_model =
|
||||||
DataModel::new(dev_det, dev_att, fabric_mgr.clone(), acl_mgr, pase.clone())?;
|
DataModel::new(dev_det, dev_att, fabric_mgr.clone(), acl_mgr, pase.clone())?;
|
||||||
let mut matter = Box::new(Matter {
|
let mut matter = Box::new(Matter {
|
||||||
|
|
Loading…
Add table
Reference in a new issue