Skip to content

Commit

Permalink
vehicle-alerter: Alert on vehicle mode change
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Jul 6, 2023
1 parent ba67aa5 commit 780ca1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stores/vehicleAlerter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const useVehicleAlerterStore = defineStore('vehicle-alerter', () => {
alertStore.pushAlert(new Alert(vehicleStore.statusText.severity, `Status: ${vehicleStore.statusText.text}`))
})

watch(
() => vehicleStore.mode,
() => alertStore.pushAlert(new Alert(AlertLevel.Info, `Vehicle mode changed to ${vehicleStore.mode}.`))
)

watch(
() => vehicleStore.isArmed,
(isArmedNow) => {
Expand Down

0 comments on commit 780ca1f

Please sign in to comment.