Remove check for unchanged values and refactor code

This commit is contained in:
2022-11-05 20:33:30 -07:00
parent 1f5301f5de
commit e6fb402c0c
2 changed files with 55 additions and 79 deletions

View File

@@ -41,21 +41,21 @@ const (
)
var charNames = map[string]string{
NewAlertChar: "New Alert",
NotifEventChar: "Notification Event",
StepCountChar: "Step Count",
MotionValChar: "Motion Values",
FirmwareVerChar: "Firmware Version",
CurrentTimeChar: "Current Time",
BatteryLvlChar: "Battery Level",
HeartRateChar: "Heart Rate",
FSTransferChar: "Filesystem Transfer",
FSVersionChar: "Filesystem Version",
WeatherDataChar: "Weather Data",
NavFlagsChar: "Navigation Icon",
NavNarrativeChar:"Navigation Instruction",
NavManDistChar: "Navigation Distance to next event",
NavProgressChar: "Navigation Progress",
NewAlertChar: "New Alert",
NotifEventChar: "Notification Event",
StepCountChar: "Step Count",
MotionValChar: "Motion Values",
FirmwareVerChar: "Firmware Version",
CurrentTimeChar: "Current Time",
BatteryLvlChar: "Battery Level",
HeartRateChar: "Heart Rate",
FSTransferChar: "Filesystem Transfer",
FSVersionChar: "Filesystem Version",
WeatherDataChar: "Weather Data",
NavFlagsChar: "Navigation Icon",
NavNarrativeChar: "Navigation Instruction",
NavManDistChar: "Navigation Distance to next event",
NavProgressChar: "Navigation Progress",
}
type Device struct {
@@ -75,9 +75,8 @@ type Device struct {
notifEventCh chan uint8
notifEventDone bool
Music MusicCtrl
Navigation NavigationCtrl
Navigation NavigationService
DFU DFU
navigationEv NavigationEvent
}
var (
@@ -738,7 +737,6 @@ func (i *Device) Notify(title, body string) error {
)
}
// These constants represent the possible call statuses selected by the user
const (
CallStatusDeclined uint8 = iota