<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 15/10/17 02:47, Mark Webb-Johnson wrote:<br>
<blockquote type="cite"
cite="mid:5AE8E99F-C3E9-4946-815F-BD03E7984BCF@webb-johnson.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="">
<ol class="MailOutline">
<li class="">The #define in vehicle_nissanleaf.h</li>
</ol>
</div>
</blockquote>
<br>
Should that go in the .h? Is the preprocessor namespace global in
cpp, or if I stick it in the private section of the class, will it
be a class private define? I'm thinking the former and I should
prefix the names with NL or something?<br>
<br>
<blockquote type="cite"
cite="mid:5AE8E99F-C3E9-4946-815F-BD03E7984BCF@webb-johnson.net">
<div class="">
<ol class="MailOutline">
<li class="">Put back the ovmswriter puts on server startup
(as Steve has fixed that)</li>
<li class="">Put in a 60/600 second timer, for transmission of
status messages</li>
</ol>
</div>
</blockquote>
<br>
Thanks for fixing these up for me.<br>
<br>
I've sent another pull request with expanded support for the v2
server messages, including a silly bug fix due to an errant
semicolon. <br>
<br>
I've also ported over some more of the v2 Leaf can bus decoding
support, which led me to try to implement "car off" detection, which
in v2 on the leaf was done by waiting for the can bus to go quiet. I
bodged something together using a ticker and the staleness indicator
on the car_on metric, but I think something better could be done in
the core framework.<br>
<br>
I've noticed that the wifi does not reconnect if it goes out of
range. I made a terrible network manager to reconnect. It signals
some events and I wrote some scripts to execute the relevant
commands, mostly because I don't know how to directly execute a
command.<br>
<br>
The network.down event doesn't seem to be generated when the wifi
goes down, but system.wifi.sta.disconnected is.<br>
<br>
I found a very odd bug, if you make a script which calls a command
that doesn't log anything, you get a crash in ovms_console.cpp. It
took me quite some time to trace this to commands that don't log,
because start and stop do log if they're called in the right order,
but my terrible network manager would call start whenever the
network came up which would die the second time because the v2
client is already running and doesn't log anything if you try to
start it again. <br>
<br>
In my terrible network manager branch I have worked around this by
making the v2 server log even if it's already running or stopped but
that obviously doesn't fix the underlying bug. It can be reproduced
with the ticker event:<br>
<br>
OVMS > vfs mkdir /store/events/ticker.10<br>
OVMS > vfs append "server v2 stop" /store/events/ticker.10/tick<br>
I (23885) script: Running script /store/events/ticker.10/tick<br>
Guru Meditation Error of type LoadProhibited occurred on core 1.
Exception was unhandled.<br>
Register dump:<br>
PC : 0x400efb54 PS : 0x00060f30 A0 : 0x800efc07
A1 : 0x3ffe5220 <br>
0x400efb54: _ZN11OvmsConsole7ServiceEv at
/vagrant/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:58<br>
<br>
A2 : 0x3ffe200c A3 : 0x00000000 A4 : 0x00010002
A5 : 0x00000014 <br>
A6 : 0x00000008 A7 : 0x00000000 A8 : 0x800efb35
A9 : 0x3ffe5200 <br>
A10 : 0x00000001 A11 : 0x3ffc13cc A12 : 0x00000001
A13 : 0x00000000 <br>
A14 : 0x3ffe2c2c A15 : 0xff000000 SAR : 0x0000001e
EXCCAUSE: 0x0000001c <br>
EXCVADDR: 0x00000004 LBEG : 0x4000c2e0 LEND : 0x4000c2f6
LCOUNT : 0xffffffff <br>
<br>
Backtrace: 0x400efb54:0x3ffe5220 0x400efc04:0x3ffe5250
0x400ef8b4:0x3ffe5270<br>
0x400efb54: _ZN11OvmsConsole7ServiceEv at
/vagrant/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_console.cpp:58<br>
<br>
0x400efc04: _ZThn304_N11OvmsConsole7ServiceEv at ??:?<br>
<br>
0x400ef8b4: _ZN8TaskBase4TaskEPv at
/vagrant/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./task_base.cpp:126<br>
<br>
<br>
Rebooting...<br>
<br>
</body>
</html>