<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div>Quick update:</div><div>I managed to do a not so quick update on one of the ovms v.3 boxes that sits in a Think and can confirm that the porting seems to work. </div><div>I could see speed, parking time, ambient temperature.</div><div><br></div><div>I had very strange problems doing the OTA update. The firmware start download and I can see the messages progressing, but it would halt in between 700kB and 1600kB and then stay there until I refresh the browser. </div><div>And when I refresh the browser I am asked of my password which leads me to that there must have been a crash in the meantime. </div><div><br></div><div>I was finally able to get the OTA update work by disconnecting the box from the car and powering it via USB. This is a single data point but it kind of points to a problem with the code that communicates with the car. </div><div><br></div><div>I was not able to get a laptop connected to checkout the console, but managed to get the following log - not sure how to interpret it. </div><div> <span><div>Last boot was 87 second(s) ago</div><div>Time at boot: 2018-07-25 18:07:43 GMT</div><div>This is reset #3 since last power cycle</div><div>Detected boot reason: Crash (12/12)</div><div>Crash counters: 3 total, 0 early</div><div><br></div><div>Last crash: Alloca exception on core 0</div><div>Registers:</div><div>PC : 0x400dc8ec PS : 0x00060234 A0 : 0x8008f440 A1 : 0x3ffc45b0</div><div>A2 : 0x00000020 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x3ffb44b8</div><div>A6 : 0x3ffb47e4 A7 : 0x3ffb458c A8 : 0x3ffb44d4 A9 : 0x3ffc4590</div><div>A10 : 0x00000000 A11 : 0x7fffffff A12 : 0x8008e65b A13 : 0x3ffcc450</div><div>A14 : 0x00000003 A15 : 0x00060023 SAR : 0x00000000 EXCCAUSE: 0x00000005</div><div>EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000</div><div>Backtrace:</div><div>0x400dc8ec 0x4008f43d 0x4008e181 0x400818cc 0x40082163 0x40083c4d 0x400dc8e9</div><div>Version: 3.1.008-29-gaf41242/ota_1/edge (build idf v3.1-dev-987-g55d915e Jul 6 2018 00:14:59)</div><div>Running partition: ota_1</div><div>Boot partition: ota_1</div><div>Firmware: 3.1.008-29-gaf41242/ota_1/edge (build idf v3.1-dev-987-g55d915e Jul 6 2018 00:14:59)</div></span></div><div><br></div><div>How is performance and power usage affected when using S<span>tandardMetrics.xxxxx->SetValue</span> in the <span>IncomingFrameCan1 method?</span></div><div>Most of the messages update value every 100ms, and except maybe speed, battery current and voltage, most of the parameters are not changing that often. And even for the speed, current and voltage, it is probably enough to update StandardMetrics in the 1 second ticker... does this make sense or is the difference non-existing. </div><div><br></div><div>Thanks for all the hand holding and help, </div><div>Nikolay </div><div><br></div><div id="yahoo_quoted_3182977951" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, July 19, 2018, 1:11:46 PM GMT+2, Nikolay Shishkov <nshishkov@yahoo.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv9610836996"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div>Done. </div><div><a rel="nofollow" shape="rect" class="yiv9610836996" target="_blank" href="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/143">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/143</a><br clear="none"></div><div><br clear="none"></div><div>I have not tested this in a vehicle.</div><div>It would take some time to receive the new boxes, but I thought it may help someone to go further. </div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div class="yiv9610836996yahoo_quoted" id="yiv9610836996yahoo_quoted_2652681336">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div class="yiv9610836996yqt3699350765" id="yiv9610836996yqt45699"><div>
                    On Thursday, July 19, 2018, 12:46:28 PM GMT+2, Mark Webb-Johnson <mark@webb-johnson.net> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="yiv9610836996"><div><div></div><div>Best is to create a pull request, and let us know. We can check and merge with master.</div><div><br clear="none"></div><div>Regards, Mark</div><div class="yiv9610836996yqt4942752334" id="yiv9610836996yqt29398"><div><br clear="none">On 19 Jul 2018, at 6:41 PM, Nikolay Shishkov <<a rel="nofollow" shape="rect" ymailto="mailto:nshishkov@yahoo.com" target="_blank" href="mailto:nshishkov@yahoo.com">nshishkov@yahoo.com</a>> wrote:<br clear="none"><br clear="none"></div><blockquote type="cite"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div>Thank you guys!</div><div>I think I am ready with something I want to create pull request on. Do I do this through my own repository, or can I just send someone a diff?</div><div>Nikolay</div><div><br clear="none"></div>
        
        </div><div class="yiv9610836996yahoo_quoted" id="yiv9610836996yahoo_quoted_2418342972">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, July 19, 2018, 12:37:58 PM GMT+2, Michael Balzer <<a rel="nofollow" shape="rect" ymailto="mailto:dexter@expeedo.de" target="_blank" href="mailto:dexter@expeedo.de">dexter@expeedo.de</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="yiv9610836996"><div>
    Nikolay,<br clear="none">
    <br clear="none">
    <blockquote type="cite">
      </blockquote></div><div><blockquote class="yiv9610836996" type="cite">
        <div class="yiv9610836996">
          <div class="yiv9610836996" style="">
            <div class="yiv9610836996">
              <div class="yiv9610836996">
                <div class="yiv9610836996">- what is the best way to compare
                  OvmsMetricStrings? Or should I dublicate the state in
                  an enum and use that?</div>
                <div class="yiv9610836996">- what is the best way to compare the
                  OvmsMetricFloat to a literal float?</div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
    
    <br clear="none">
    If you want to compare a state code encoded as a string, you can
    simply compare the std::string returned by AsString() with hard
    coded strings, e.g.<br clear="none">
    <br clear="none">
    <tt>    std::string charge_state =
      StdMetrics.ms_v_charge_state->AsString();</tt><tt><br clear="none">
    </tt><tt>    if (charge_state == "charging")</tt><tt><br clear="none">
    </tt><tt>        …</tt><tt><br clear="none">
    </tt><br clear="none">
    If you'd rather use the old numeric state codes, there are utility
    functions in the ovms_utils module for encoding / decoding them.<br clear="none">
    <br clear="none">
    As Mark wrote, you get the float value by the AsFloat() method and
    can compare that directly to a float literal. We haven't added
    comparison operators to the metrics classes yet, just assignment
    (and that needs casts in many cases). If you'd like to add more
    operators/types, go ahead.<br clear="none">
    <br clear="none">
    <br clear="none">
    <blockquote type="cite"><br clear="none" class="yiv9610836996">
      <blockquote class="yiv9610836996" type="cite">
        <div class="yiv9610836996">
          <div class="yiv9610836996" style="">
            <div class="yiv9610836996">
              <div class="yiv9610836996">
                <div class="yiv9610836996">- what is the current way of doing <span class="yiv9610836996">net_req_notification</span></div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      <div><br clear="none" class="yiv9610836996">
      </div>
      <div>Not required in v3. If you change a metric that needs
        notification, the serverv2 and serverv3 will act appropriately.</div>
    </blockquote>
    <br clear="none">
    And if you want to customize standard notifications, you can do so
    by overloading the vehicle methods:<br clear="none">
    <br clear="none">
    <tt>    virtual void NotifyChargeState();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyChargeStart();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyHeatingStart();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyChargeStopped();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyChargeDone();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyValetEnabled();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyValetDisabled();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyValetHood();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyValetTrunk();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyAlarmSounding();</tt><tt><br clear="none">
    </tt><tt>    virtual void NotifyAlarmStopped();</tt><tt><br clear="none">
    </tt><tt>    virtual void Notify12vCritical();</tt><tt><br clear="none">
    </tt><tt>    virtual void Notify12vRecovered();</tt><br clear="none">
    <br clear="none">
    If you want to add vehicle specific notifications, take a look at
    the Twizy module (rt_notify).<br clear="none">
    <br clear="none">
    You can simply send a notification from any command output by
    issuing MyNotify.NotifyCommand() (att: stack intensive) or send any
    string by MyNotify.NotifyString(). There are also varargs versions
    with "f" suffix acting like printf.<br clear="none">
    <br clear="none">
    For building strings from command methods, there is the StringWriter
    class, that's a std::string that can be used as an OvmsWriter.
    Example:<br clear="none">
    <br clear="none">
    <tt>    StringWriter buf(200);</tt><tt><br clear="none">
    </tt><tt>    CommandStat(COMMAND_RESULT_NORMAL, &buf);</tt><tt><br clear="none">
    </tt><tt>    MyNotify.NotifyString("info", "charge.sufficient",
      buf.c_str());</tt><br clear="none">
    <br clear="none">
    Best practice is to send notifications from within an event handler
    (e.g. Ticker1), so they run asynchronously in the event task context
    instead of blocking something.<br clear="none">
    <br clear="none">
    Regards,<br clear="none">
    Michael<br clear="none">
    <br clear="none">
    PS: we should start collecting these pieces for the developer
    manual, the general system API is quite mature now<div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd36178"><br clear="none">
    <br clear="none">
    <br clear="none">
    </div><blockquote type="cite"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd98875">On
      19 Jul 2018, at 6:00 AM, Nikolay Shishkov <<a rel="nofollow" shape="rect" class="yiv9610836996" ymailto="mailto:nshishkov@yahoo.com" target="_blank" href="mailto:nshishkov@yahoo.com">nshishkov@yahoo.com</a>> wrote:
      </div><div><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd84373">
        </div><blockquote class="yiv9610836996" type="cite"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd08496"><br clear="none" class="yiv9610836996Apple-interchange-newline">
          </div><div class="yiv9610836996"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd35976">
            </div><div class="yiv9610836996"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd14102">
              </div><div class="yiv9610836996" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd61138">
                <div class="yiv9610836996" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
                  <div class="yiv9610836996" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
                    <div class="yiv9610836996">Hi, </div>
                    <div class="yiv9610836996">I am working on the Think City EV code
                      and have some questions.</div>
                    <div class="yiv9610836996">- what is the best way to signal that
                      the charging connector is plugged?
                      ms_v_charge_pilot?</div>
                    <div class="yiv9610836996">previously it was cardoorbits1. </div>
                    <div class="yiv9610836996"><br clear="none" class="yiv9610836996">
                    </div>
                    <div class="yiv9610836996">- what is the best way to compare
                      OvmsMetricStrings? Or should I dublicate the state
                      in an enum and use that?</div>
                    <div class="yiv9610836996"><br clear="none" class="yiv9610836996">
                    </div>
                    <div class="yiv9610836996">- what is the best way to compare the
                      OvmsMetricFloat to a literal float?</div>
                    <div class="yiv9610836996"><br clear="none" class="yiv9610836996">
                    </div>
                    <div class="yiv9610836996">- what is the current way of doing <span class="yiv9610836996">net_req_notification</span></div>
                    <div class="yiv9610836996"><br clear="none" class="yiv9610836996">
                    </div>
                    <div class="yiv9610836996">Thanks in advance,</div>
                    <div class="yiv9610836996">Nikolay</div>
                  </div>
                </div>
                </div><div class="yiv9610836996yahoo_quoted" id="yiv9610836996yahoo_quoted_1950539485"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd09252">
                  </div><div class="yiv9610836996" style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd20374">
                    <div class="yiv9610836996"> On Tuesday, July 17, 2018, 3:37:49 AM
                      GMT+2, Mark Webb-Johnson <<a rel="nofollow" shape="rect" class="yiv9610836996" ymailto="mailto:mark@webb-johnson.net" target="_blank" href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>
                      wrote: </div></div>
                    <br clear="none">
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br clear="none">
    <pre class="yiv9610836996moz-signature">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd11498">
  </div></div></div><div class="yiv9610836996yqt4097312186" id="yiv9610836996yqtfd59892">_______________________________________________<br clear="none">OvmsDev mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:OvmsDev@lists.openvehicles.com" target="_blank" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br clear="none"></div></div>
            </div>
        </div></div></div></blockquote></div><blockquote type="cite"><div><span>_______________________________________________</span><br clear="none"><span>OvmsDev mailing list</span><br clear="none"><span><a rel="nofollow" shape="rect" ymailto="mailto:OvmsDev@lists.openvehicles.com" target="_blank" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a></span><br clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a></span><br clear="none"></div></blockquote></div></div><div class="yiv9610836996yqt4942752334" id="yiv9610836996yqt58658">_______________________________________________<br clear="none">OvmsDev mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:OvmsDev@lists.openvehicles.com" target="_blank" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br clear="none"></div></div></div>
            </div>
        </div></div></div></div></div>
            </div>
        </div></div></body></html>