<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>That seems sensible - I’ve implemented something close to your suggestion with a small ‘improvement’:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>I’ve made it so the ‘usr’ commands are not there by default. But will be auto-created as necessary.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>To do this, rather than a Boolean allow_user_commands I added an enum as follows:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>enum class OvmsCommandType {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> System, // << Normal system command – can’t have usr subcommand.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> SystemAllowUserCmd, //< System command that Allows user commands to be added to it<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> SystemAllowUsrDir, //< System command that allow ‘usr’ sub-command to be auto-added.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> SystemUsrDir, //< an auto-added usr cub-command<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'> User //< A user command.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>};<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>By default I have the root command as SystemAllowUsrDir as well as I’ve done it for Ioniq 5 as well (to test that bit).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>The calls<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>OvmsCommand.Register(mycommand, "", "me", "My Script", "[string]", 0, 4)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>OvmsCommand.Register(mycommand, "xhiq", "extra", "My Script", "[string]", 0, 4)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Would mean the commands ‘usr me’ and ‘xhiq usr extra’ would be created. Exactly the same as<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>OvmsCommand.Register(mycommand, "usr", "me", "My Script", "[string]", 0, 4)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>OvmsCommand.Register(mycommand, "xhiq usr", "extra", "My Script", "[string]", 0, 4)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Thoughts?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>Btw to add a sub-command to xhiq usr extra you would need to specify it as “xhiq usr extra” as the parent.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>//.ichael<o:p></o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> OvmsDev <ovmsdev-bounces@lists.openvehicles.com> <b>On Behalf Of </b>Michael Balzer via OvmsDev<br><b>Sent:</b> Saturday, August 3, 2024 3:09 PM<br><b>To:</b> ovmsdev@lists.openvehicles.com<br><b>Cc:</b> Michael Balzer <dexter@expeedo.de><br><b>Subject:</b> Re: [Ovmsdev] Warning in Duktape<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>I've just merged your PR.<br><br>`OvmsCommand.Register()` is well designed.<br><br>On security: I don't think we actually need to allow adding user commands to system command groups at all.<br><br>I'd opt for allowing only command root "usr", and optionally "x…" (vehicle specific namespaces), for user commands. Allowing "x…" should be a choice/config of the vehicle module.<br><br>We could add a flag to the command definition and extend the registration accordingly to…<br><br><span style='font-family:"Courier New"'> OvmsCommand* RegisterCommand(const char* name, const char* title,<br> OvmsCommandExecuteCallback_t execute = NULL,<br> const char *usage = "", int min = 0, int max = 0, bool secure = true,<br> OvmsCommandValidateCallback_t validate = NULL,<br> <b>bool allow_user_commands = false</b>);</span><br><br>Similar to the config param "usr" init, we then generally create an empty command root "usr" on system init with allow_user_commands = true.<br><br>Vehicles can decide to create their full "x…" root, or some "x… usr" placeholder with that grant.<br><br>What do you think?<br><br>Regards,<br>Michael<br><br><o:p></o:p></p><div><p class=MsoNormal>Am 22.07.24 um 02:36 schrieb Michael Geddes via OvmsDev:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal>I have tidied up the implementation significantly and I've fixed up all the life-time issues, as well as disallowing overriding existing commands.<o:p></o:p></p></div><div><p class=MsoNormal>(Though you could still add a sub-command to a system command). It now persists quite happily, doesn't crash on GC and functions as expected :). I've also implemented shut-down registering so it cleans up before getting to the destructor.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It's now down to security and the question of whether we differentiate user plugin commands from system ones.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>//.ichael<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Sun, 21 Jul 2024 at 08:34, Michael Geddes <<a href="mailto:frog@bunyip.wheelycreek.net">frog@bunyip.wheelycreek.net</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Well since I've been doing some Duktape stuff lately, I recalled this loose end and have come up with a solution. <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>There were a few issues - please let me know if you have a problem with any of them.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Firstly the Command registration map is using const char * and we can't guarantee the lifetime of the duktape strings so I've moved them over to std::string.<o:p></o:p></p></div><div><p class=MsoNormal>This applies to OvmsCommandMap itself as well as OvmsCommand - m_name, m_title and m_usage_template.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I think the intention was to have something like this for the register command.. it was missing a parameter. It now looks like this:<o:p></o:p></p></div><div><p class=MsoNormal>OvmsCommand.Register( function, parent, command, description, parameter_desc, minargs, maxargs).<o:p></o:p></p></div><div><p class=MsoNormal>Missing maxargs will mean maxargs = minargs.<o:p></o:p></p></div><div><p class=MsoNormal>Missing minargs will mean no parameters.<o:p></o:p></p></div><div><p class=MsoNormal>The calling function will be passed 2 parameters: the name of the command and an array of strings (the argv).<o:p></o:p></p></div><div><p class=MsoNormal>For sub-commands, these will be separated by '/'. So something like "me/too".<o:p></o:p></p></div><div><p class=MsoNormal>I think this way is simple but effective.<o:p></o:p></p></div><div><p class=MsoNormal>It would be good to add completion, but that can be added later.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>One of the things I wanted to talk about is what security protections we need to add to prevent a script from taking over an existing function! (or future function).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>When vim initially added user commands and functions it was a free-for-all but somebody soon realised there needed to be some restrictions to avoid issues..<o:p></o:p></p></div><div><p class=MsoNormal>so what they did was force user function and commands to start with a capital letter. I would like people's thoughts on whether we need to do something similar.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It might be that we would be satisfied with failing if system commands were attempted to be overridden. Should we allow adding sub-commands to system commands?<o:p></o:p></p></div><div><p class=MsoNormal>I can see that might be useful.. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I have added a sample below of a working function:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>--8<----<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>mycommand = function(c, argv){<br> print("Hello There: "+c+"\n");<br> if (argv.length == 0)<br> print("Simple\n");<br> else<br> print("Script: "+argv[0]+"\n")<br> }<br>OvmsCommand.Register(mycommand, "", "me", "My Script", "[string]", 0, 3)</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><i><span style='font-family:"Courier New"'>OVMS#</span></i><span style='font-family:"Courier New"'> <b>me xx</b><br>Hello There: me</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>Script: xx<br><i>OVMS# </i><b>me xx yy</b><br>Hello There: me</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-family:"Courier New"'>Script: xx<br><i>OVMS#</i> <b>me xx yy</b><br>Hello There: me<br>Script: xx<br><i>OVMS#</i></span><o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Sun, 23 Oct 2022 at 22:15, Michael Balzer <<a href="mailto:dexter@expeedo.de" target="_blank">dexter@expeedo.de</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal style='margin-bottom:12.0pt'>That's an open end, implementing command registration for Duktape.<br><br>There's a thread on this… found it:<br><a href="http://lists.openvehicles.com/pipermail/ovmsdev/2020-July/006952.html" target="_blank">http://lists.openvehicles.com/pipermail/ovmsdev/2020-July/006952.html</a><br><br>Regards,<br>Michael<br><br><o:p></o:p></p><div><p class=MsoNormal>Am 23.10.22 um 15:38 schrieb Michael Geddes:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal>There's an unused variable 'dcc' warning in the below code.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It seems that the 'Perform the callback' is not being 'performed!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Is this deliberate?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>//.ichael<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>void</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>DukOvmsCommandRegisterRun</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>(</span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>int</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>verbosity</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#4EC9B0'>OvmsWriter</span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>*</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>writer</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#4EC9B0'>OvmsCommand</span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>*</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>cmd</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>int</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>argc</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>const</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>char*</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>const*</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>argv</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>)<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> {<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>ESP_LOGD</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>(</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>TAG</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#CE9178'>"DukOvmsCommandRegisterRun(</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>%s</span><span style='font-size:10.5pt;font-family:Consolas;color:#CE9178'>)"</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>,</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>cmd</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>-></span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>GetName</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>());<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>auto</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>it</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> = </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>MyDuktape</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>.</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>m_cmdmap</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>.</span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>find</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>(</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>cmd</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>);<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>if</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> (</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>it</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>==</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>MyDuktape</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>.</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>m_cmdmap</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>.</span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>end</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>())<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> {<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#569CD6'>ESP_LOGE</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>(</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>TAG</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>, </span><span style='font-size:10.5pt;font-family:Consolas;color:#CE9178'>"Command '</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>%s</span><span style='font-size:10.5pt;font-family:Consolas;color:#CE9178'>' cannot be found in registry"</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>,</span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>cmd</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>-></span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>GetName</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>());<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>return</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>;<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> }<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>else</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'><o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> {<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#4EC9B0'>DuktapeConsoleCommand</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>* </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>dcc</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> = </span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>it</span><span style='font-size:10.5pt;font-family:Consolas;color:#DCDCAA'>-></span><span style='font-size:10.5pt;font-family:Consolas;color:#9CDCFE'>second</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'>;<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#6A9955'> // Perform the callback</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'><o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> }<o:p></o:p></span></p></div><div><p class=MsoNormal style='line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> }<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>OvmsDev mailing list<o:p></o:p></pre><pre><a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><o:p></o:p></pre><pre><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></pre></blockquote><p class=MsoNormal><br><br><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<o:p></o:p></pre><pre>Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<o:p></o:p></pre></div><p class=MsoNormal>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.openvehicles.com" target="_blank">OvmsDev@lists.openvehicles.com</a><br><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" target="_blank">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></p></blockquote></div></blockquote></div></div><p class=MsoNormal><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>OvmsDev mailing list<o:p></o:p></pre><pre><a href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a><o:p></o:p></pre><pre><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><o:p></o:p></pre></blockquote><p class=MsoNormal><br><br><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal<o:p></o:p></pre><pre>Fon 02333 / 833 5735 * Handy 0176 / 206 989 26<o:p></o:p></pre></div></body></html>