Mark,
I've implemented it, please review:
https://github.com/dexterbg/Open-Vehicle-Monitoring-System/commit/70b770fff2268c84100a0bef30965f1c0cd58106
I have included the necessary changes to the framework, as there
are few.
As both charge alerts are the same now I could also factor out the
text preparation, saving some ROM space. I intend to reuse the
other command functions as well, if the parameters can use the
same syntax I can just switch the argument separator char.
Regards,
Michael
Am 19.11.2012 19:40, schrieb Michael
Balzer:
Mark,
Am 19.11.2012 14:34, schrieb Mark Webb-Johnson:
...plus a new common code for "ALERT",
if you agree on routing the net_msg_alert() function through
the dispatcher as well to allow vehicle control over this.
Can you explain more what you require here?
I would like to change the text for charge alerts to the App the
same way I did with the SMS alerts, especially to get the SOC
min/max and odometer.
So I would basically overload net_msg_alert() with my vehicle
specific version. That will require either a specific hook for
just this function, or -- my suggestion -- the introduction of a
msg command "ALERT", so the existing cmd overloading framework
can simply be used. I tend to the cmd solution because that's
nice in line with the SMS way. I know the command now would not
be needed by the Apps, but it wouldn't hurt either.
So instead of calling net_msg_alert() directly (which happens
only at one place now), we would call net_msg_cmd_do() with i.e.
net_msg_cmd_code=NET_CMD_ALERT and let the net and vehicle
dispatchers decide which alert function to execute. May sound a
bit complicated first, but would IMO also provide clean and
clear extendability for maybe other future notifications sent
from the module to the App.
I can prepare a Twizy implementation of this if you like to have
a look at the application side first.
Regards,
Michael
_______________________________________________
OvmsDev mailing list
OvmsDev@lists.teslaclub.hk
http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
--
Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
_______________________________________________
OvmsDev mailing list
OvmsDev@lists.teslaclub.hk
http://lists.teslaclub.hk/mailman/listinfo/ovmsdev