removed warning
This commit is contained in:
parent
49cde2b3c2
commit
f56be08106
@ -720,11 +720,11 @@ func (i *Device) SetTime(t time.Time) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := i.checkStatus(i.localTimeChar, LocalTimeChar); err != nil {
|
if err := i.checkStatus(i.localTimeChar, LocalTimeChar); err != nil {
|
||||||
// this characteristic might not be there in older versions of infinitime
|
// If the characteristic is unavailable,
|
||||||
// so we fail silently in this case.
|
// fail silently, as many people may be on
|
||||||
_, notAvailable := err.(ErrCharNotAvail)
|
// older InfiniTime versions. A warning
|
||||||
if notAvailable {
|
// may be added later.
|
||||||
log.Warn().Msg("No Local Time Characteristic detected. Old Version of Infinitime (pre 1.10.0)?")
|
if _, ok := err.(ErrCharNotAvail); ok {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return err
|
return err
|
||||||
|
Reference in New Issue
Block a user