Skip to content

[lcars] Wind speed option only works if locale is kph #3988

@kidneyhex

Description

@kidneyhex

Affected hardware version

Bangle 2

Your firmware version

2v27.45

The bug

Very, very low priority--just noting in case anyone wants to tackle it.

Selecting kph vs mph in the settings only works if your locale is in kph. If your locale is already in mph, you end up with mph divided by ~1.6

Workaround is just leave the setting as "kph" and it'll show your locale's speed.

A fix might be just a note in the readme, or have code check if the locale is kph vs other?

// Wind
const wind = locale.speed(weather.wind).match(/^(\D*\d*)(.*)$/);
let speedFactor = settings.speed == "kph" ? 1.0 : 1.0 / 1.60934;
weather.wind = Math.round(wind[1] * speedFactor);

Installed apps

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions