<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Sound advise.</div><div><br></div><div>Given just a handful of temperatures, it is probably least impacting to just change to 16 bit signed and put this one to rest. It keeps coming back, and it would be good to solve it once and for all. Impact is 1 byte extra ram per temperature, plus some flash for the 16 vs 8 bit.</div><div><br></div><div>Moving to a 40C offset is tricky to maintain backwards compatibility.</div><div><br></div><div>Regards, Mark</div><div><br>On 13 Jan, 2014, at 9:51 pm, Collin Kidder <<a href="mailto:collink@kkmfg.com">collink@kkmfg.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">I don't think you'd want to do that. 127 deg C really isn't that terribly hot and -128C is extremely cold. If it is necessary to retain use of an 8 bit variable then the standard solution is to just offset the temperature stored by -40. That way you can read -40 to 215C which is a pretty reasonable range. Unfortunately, I fear such a change would necessitate many other changes in code. It might be better to expand to a signed 16 bit integer.<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 13, 2014 at 7:50 AM, Håkon Markussen <span dir="ltr"><<a href="mailto:hakon.markussen@gmail.com" target="_blank">hakon.markussen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi (Mark).<br><br></div>In ovms.h the motor temperature is defined as unsigned char (non-negative):<br>
extern unsigned char car_tmotor; // Tmotor<br><br></div>Currently the weather is cold in Norway (-15 C) and I noticed that motor temp was 244C.<br>
<br></div><br><div><div><div><div>Is it possible to update the car_tmotor to<br>extern signed char car_tmotor; // Tmotor<br></div><div> in ovms.h?<br></div><div><br></div><div>Best regards<span class="HOEnZb"><font color="#888888"><br>
</font></span></div><span class="HOEnZb"><font color="#888888"><div>Håkon<br></div></font></span></div>
</div></div></div>
<br>_______________________________________________<br>
OvmsDev mailing list<br>
<a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>
<a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev" target="_blank">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br>
<br></blockquote></div><br></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>OvmsDev mailing list</span><br><span><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a></span><br><span><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a></span><br></div></blockquote></body></html>