[Ovmsdev] Kilometers instead of miles

Michael Balzer dexter at expeedo.de
Wed May 16 01:35:56 HKT 2018


Charge alerts are generated by the "stat" command. I already added a range unit variable when I integrated the command, but the config wasn't defined at the
time. I now changed that to use the config.

@Geir: I guess you can use the same line for two of your commands, but I saw you've got fixed Kilometers in some #defines.

The dashboard needs a little more work to adapt to the unit, as it affects the axis definitions.

We also should add a config for the preferred temperature unit, i.e. "vehicle" / "units.temperature".

Regards,
Michael


Am 15.05.2018 um 10:33 schrieb Mark Webb-Johnson:
> I think the code just doesn’t do the conversions at the moment.
>
> It should be possible to do this in a fairly transparent manner, centrally in ovms_metrics. If a specific unit factor isn’t specified, ‘other’ is used. We should be able to pick up on that, look at the actual storage unit as well as configured preference, then handle appropriately.
>
> Regards, Mark.
>
>> On 15 May 2018, at 3:31 PM, Stephen Casner <casner at acm.org> wrote:
>>
>> Even though I have selected Miles in the Vehicle configuration in the
>> web UI, the status and dashboard in the web UI report in km.  Alerts
>> that I receive through the app are also in km even though the app is
>> displaying range in miles as it should.  Do I need to select Miles
>> somewhere else?  Is this a consequence of not having gone through the
>> setup wizard on this unit?  (It it the v3.0 unit on which I've done
>> all my development work.)
>>
>>                                                        -- Steve
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26





More information about the OvmsDev mailing list