<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Writing the code last night, it seemed that the shutting down of wifi/simcom/etc was messy.<div class=""><br class=""></div><div class="">Perhaps we need to have new signals “ShuttingDown” and “ShutDown”, then make the components responsible for this? So, for example, wifi powers off, server v2 disconnects, logging stops logging to SD, etc, on “ShuttingDown”. Then SD unmounts on “ShutDown”.</div><div class=""><br class=""></div><div class="">A better solution?</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30 Apr 2018, at 6:31 AM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    Attention: performing an AutoFlash just killed my SD filesystem.<br class="">
    <br class="">
    Possibly just by chance and I was lucky all the reboots before, but
    I think we really need to close all SD files before reboot -- see
    issue #97.<br class="">
    <br class="">
    FYI: the SD could be restored by a simple fsck, no data loss. My
    Linux system also could mount the SD before the fsck. The module was
    stuck in the mount attempt.<br class="">
    <br class="">
    Regards,<br class="">
    Michael<br class="">
    <br class="">
    <br class="">
    <div class="moz-cite-prefix">Am 29.04.2018 um 16:39 schrieb Mark
      Webb-Johnson:<br class="">
    </div>
    <blockquote type="cite" cite="mid:8A101897-B19C-4FEC-89D5-8D00304BC65F@webb-johnson.net" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
      <div class=""><br class="">
      </div>
      The last piece of the puzzle falls into place.
      <div class=""><br class="">
      </div>
      <blockquote style="margin: 0 0 0 40px; border: none; padding:
        0px;" class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS# config set auto ota
            yes</span></font></blockquote>
      <blockquote style="margin: 0 0 0 40px; border: none; padding:
        0px;" class=""><font class="" face="Andale Mono"><span style="font-size: 14px;" class="">OVMS# config set ota
            auto.hour 2</span></font></blockquote>
      <div class="">
        <div class=""><br class="">
        </div>
        <div class="">Module will wake up sometime between 2am and 3am, and if
          wifi is available it will check the available server version
          (according to OTA tag and server url). If the server has a
          later version, the module will download and flash that new
          version then reboot into it.</div>
        <div class=""><br class="">
        </div>
        <div class="">I’ve also brought in the strverscmp function for GNU
          library, which is generally useful for comparing versions.</div>
        <div class=""><br class="">
        </div>
        <div class="">Enjoy.</div>
        <div class=""><br class="">
        </div>
        <div class="">Regards, Mark.</div>
        <div class=""><br class="">
          <blockquote type="cite" class="">
            <div class="">Begin forwarded message:</div>
            <br class="Apple-interchange-newline">
            <div style="margin-top: 0px; margin-right: 0px;
              margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue,
                Helvetica, sans-serif;" class="">GitHub <<a href="mailto:noreply@github.com" class="" moz-do-not-send="true">noreply@github.com</a>><br class="">
              </span></div>
            <div style="margin-top: 0px; margin-right: 0px;
              margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue,
                Helvetica, sans-serif;" class=""><b class="">[openvehicles/Open-Vehicle-Monitoring-System-3]
                  1a4301: Bring in GNU strverscmp component, and test
                  comman...</b><br class="">
              </span></div>
            <div style="margin-top: 0px; margin-right: 0px;
              margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue,
                Helvetica, sans-serif;" class="">29 April 2018 at
                10:23:54 PM HKT<br class="">
              </span></div>
            <div style="margin-top: 0px; margin-right: 0px;
              margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue,
                Helvetica, sans-serif;" class=""><a href="mailto:mark@webb-johnson.net" class="" moz-do-not-send="true">mark@webb-johnson.net</a><br class="">
              </span></div>
            <div style="margin-top: 0px; margin-right: 0px;
              margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, "Helvetica Neue", Helvetica, sans-serif;" class=""><b class="">Reply-To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue,
                Helvetica, sans-serif;" class="">GitHub <<a href="mailto:noreply@github.com" class="" moz-do-not-send="true">noreply@github.com</a>><br class="">
              </span></div>
            <br class="">
            <div class="">
              <div class="">  Branch: refs/heads/master<br class="">
                 Home:   <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3" class="" moz-do-not-send="true">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3</a><br class="">
                 Commit: 1a4301d7ca1c7ed619109dfcb2e832a599af7dda<br class="">
                     <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/1a4301d7ca1c7ed619109dfcb2e832a599af7dda" class="" moz-do-not-send="true">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/1a4301d7ca1c7ed619109dfcb2e832a599af7dda</a><br class="">
                 Author: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="" moz-do-not-send="true">mark@webb-johnson.net</a>><br class="">
                 Date:   2018-04-29 (Sun, 29 Apr 2018)<br class="">
                <br class="">
                 Changed paths:<br class="">
                   A vehicle/OVMS.V3/components/strverscmp/component.mk<br class="">
                   A
                vehicle/OVMS.V3/components/strverscmp/src/strverscmp.c<br class="">
                   A
                vehicle/OVMS.V3/components/strverscmp/src/strverscmp.h<br class="">
                   M vehicle/OVMS.V3/main/test_framework.cpp<br class="">
                <br class="">
                 Log Message:<br class="">
                 -----------<br class="">
                 Bring in GNU strverscmp component, and test command<br class="">
                <br class="">
                <br class="">
                 Commit: 58fa1b57448d3491889e3d1d3f487e475d036c92<br class="">
                     <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/58fa1b57448d3491889e3d1d3f487e475d036c92" class="" moz-do-not-send="true">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/58fa1b57448d3491889e3d1d3f487e475d036c92</a><br class="">
                 Author: Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="" moz-do-not-send="true">mark@webb-johnson.net</a>><br class="">
                 Date:   2018-04-29 (Sun, 29 Apr 2018)<br class="">
                <br class="">
                 Changed paths:<br class="">
                   M
                vehicle/OVMS.V3/components/ovms_ota/src/ovms_ota.cpp<br class="">
                   M vehicle/OVMS.V3/components/ovms_ota/src/ovms_ota.h<br class="">
                <br class="">
                 Log Message:<br class="">
                 -----------<br class="">
                 AutoFlash implementation:<br class="">
                Config auto[ota]=yes<br class="">
                Config ota[auto.hour]=2<br class="">
                <br class="">
                <br class="">
                Compare: <a href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/87d80c30825b...58fa1b57448d" class="" moz-do-not-send="true">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/87d80c30825b...58fa1b57448d</a></div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </div>

_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></div></body></html>