[Ovmsdev] Custom metrics

Tamás Kovács kommykt at gmail.com
Sun Nov 4 03:44:02 HKT 2018


Thanks for the support the cells.
Now cell volts and temps are shown on web interface.
Now my problem is not understand the Reset button working mechanism, i
wan't to understand the Renault Twizzy code, but a bit complex, if i load
Twizzy , and press the button, next show  a text, but is my loaded it
shown: Unrecognised command.
And i can not get any notification to my phone, use iOs app, and
openvehicles v2 server, app working.

Michael Balzer <dexter at expeedo.de> ezt írta (időpont: 2018. nov. 1., Cs,
10:58):

> Tamás,
>
> I've been creating separate metrics for all cell values on the Twizy, but
> that only has 14 cells.
>
> We discussed this before, a better approach is introducing a new metric
> class for arrays. I have just done that for you, please pull.
>
> Usage example:
>
> OvmsMetricVector<float>* vf = new OvmsMetricVector<float>("test.volts",
> SM_STALE_MIN, Volts);
> vf->SetElemValue(3, 1.23);
> vf->SetElemValue(17, 2.34);
> float myvals[3] = { 5.5, 6.6, 7.7 };
> vf->SetElemValues(10, 3, myvals);
>
> With this data set, you get:
>
> OVMS# met lis test
> test.volts
> 0,0,0,1.23,0,0,0,0,0,0,5.5,6.6,7.7,0,0,0,0,2.34V
>
> …and in the web framework:
>
> metrics["test.volts"]
> (18) [0, 0, 0, 1.23, 0, 0, 0, 0, 0, 0, 5.5, 6.6, 7.7, 0, 0, 0, 0, 2.34]
> metrics["test.volts"][11]
> 6.6
>
> See template definition in ovms_metrics.h for more.
>
> Regards,
> Michael
>
>
> Am 31.10.18 um 20:08 schrieb Tamás Kovács:
>
> I have a Peugeot iOn, and i wan't to create own metrics for battery temp
> (66 piece) and voltage (88 (old) or 80(new) piece) for all cell (and show
> on web interface), and i don't understand how can i create it. Now my data
> in array-s from can messages 6E1-6E4.
> My git fork:
> https://github.com/KommyKT/Open-Vehicle-Monitoring-System-3/tree/peugeot
> vehicle_mitsubishi
>
>
> --
> Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
> Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>


-- 
Üdvözlettel:
Kovács Tamás
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20181103/a4c32d26/attachment.htm>


More information about the OvmsDev mailing list