Browse Source

corrected points which were found during review of @stefan123t

pull/283/head
lumapu 2 years ago
parent
commit
b1fa6e0702
  1. 2
      tools/esp8266/html/update.html
  2. 10
      tools/esp8266/html/visualization.html
  3. 28
      tools/esp8266/include/dbg.h

2
tools/esp8266/html/update.html

@ -10,7 +10,7 @@
<h1>Update</h1>
<div id="content" class="content">
<div>
Make sure that you have noted all or settings before starting an update. New versions maybe changed their memory layout which remains in default settings.
Make sure that you have noted all your settings before starting an update. New versions may have changed their memory layout which can break your existing settings.
</div>
<br/><br/>
<form method="POST" action="/update" enctype="multipart/form-data" accept-charset="utf-8">

10
tools/esp8266/html/visualization.html

@ -48,11 +48,11 @@
ch0.appendChild(sub);
switch(j) {
case 2: total[j] += val; break;
case 6: total[j] += val; break;
case 7: total[j] += val; break;
case 8: total[j] += val; break;
case 10: total[j] += val; break;
case 2: total[j] += val; break; // P_AC
case 6: total[j] += val; break; // YieldTotal
case 7: total[j] += val; break; // YieldDay
case 8: total[j] += val; break; // P_DC
case 10: total[j] += val; break; // P_ACr
}
}
}

28
tools/esp8266/include/dbg.h

@ -49,14 +49,24 @@
//template <class T>
inline void DBGPRINTLN(String str) { DBGPRINT(str); DBGPRINT(F("\r\n")); }
inline void DHEX(uint8_t b) {
if( b<0x10 ) DSERIAL.print('0');
if( b<0x10 ) DSERIAL.print(F("0"));
DSERIAL.print(b,HEX);
if(NULL != mCb) {
if( b<0x10 ) mCb(F("0"));
mCb(String(b, HEX));
}
}
inline void DHEX(uint16_t b) {
if( b<0x10 ) DSERIAL.print(F("000"));
else if( b<0x100 ) DSERIAL.print(F("00"));
else if( b<0x1000 ) DSERIAL.print(F("0"));
DSERIAL.print(b,HEX);
DSERIAL.print(b, HEX);
if(NULL != mCb) {
if( b<0x10 ) mCb(F("000"));
else if( b<0x100 ) mCb(F("00"));
else if( b<0x1000 ) mCb(F("0"));
mCb(String(b, HEX));
}
}
inline void DHEX(uint32_t b) {
if( b<0x10 ) DSERIAL.print(F("0000000"));
@ -66,10 +76,18 @@
else if( b<0x100000 ) DSERIAL.print(F("000"));
else if( b<0x1000000 ) DSERIAL.print(F("00"));
else if( b<0x10000000 ) DSERIAL.print(F("0"));
DSERIAL.print(b,HEX);
DSERIAL.print(b, HEX);
if(NULL != mCb) {
if( b<0x10 ) mCb(F("0000000"));
else if( b<0x100 ) mCb(F("000000"));
else if( b<0x1000 ) mCb(F("00000"));
else if( b<0x10000 ) mCb(F("0000"));
else if( b<0x100000 ) mCb(F("000"));
else if( b<0x1000000 ) mCb(F("00"));
else if( b<0x10000000 ) mCb(F("0"));
mCb(String(b, HEX));
}
}
#endif
#endif

Loading…
Cancel
Save