Added Navigation service #5
@ -751,6 +751,24 @@ func (i *Device) Notify(title, body string) error {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Navigation sends a NavigationEvent to the watch
|
||||||
|
func (i *Device) Navigation(flag string, narrative string, dist string, progress uint8) error {
|
||||||
|
|
||||||
|
if narrative != i.navigationEv.narrative {
|
||||||
|
log.Debug().Str("func", "Navigation").
|
||||||
|
Msg("Sending narrative")
|
||||||
|
if err := i.checkStatus(i.navnarrativeChar, NavNarrativeChar); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := i.navnarrativeChar.WriteValue([]byte(narrative), nil); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
i.navigationEv.narrative = narrative
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// These constants represent the possible call statuses selected by the user
|
// These constants represent the possible call statuses selected by the user
|
||||||
const (
|
const (
|
||||||
CallStatusDeclined uint8 = iota
|
CallStatusDeclined uint8 = iota
|
||||||
|
Reference in New Issue
Block a user