forked from Elara6331/infinitime
Set connected property to true in all connecting functions
This commit is contained in:
parent
bd057815cf
commit
522c10a9c0
@ -176,6 +176,9 @@ func connectByName(opts *Options) (*Device, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.device.Properties.Connected = true
|
||||||
|
|
||||||
// Resolve characteristics
|
// Resolve characteristics
|
||||||
err = out.resolveChars()
|
err = out.resolveChars()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -232,6 +235,8 @@ func pair(opts *Options) (*Device, error) {
|
|||||||
// Pair device
|
// Pair device
|
||||||
out.device.Pair()
|
out.device.Pair()
|
||||||
|
|
||||||
|
out.device.Properties.Connected = true
|
||||||
|
|
||||||
// Set connected to true
|
// Set connected to true
|
||||||
out.device.Properties.Connected = true
|
out.device.Properties.Connected = true
|
||||||
|
|
||||||
@ -262,6 +267,8 @@ func ConnectByAddress(addr string) (*Device, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.device.Properties.Connected = true
|
||||||
|
|
||||||
// Resolve characteristics
|
// Resolve characteristics
|
||||||
err = out.resolveChars()
|
err = out.resolveChars()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user