mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 00:16:42 +02:00
corrected points which were found during review of @stefan123t
This commit is contained in:
parent
f651811359
commit
b1fa6e0702
3 changed files with 29 additions and 11 deletions
|
@ -10,7 +10,7 @@
|
||||||
<h1>Update</h1>
|
<h1>Update</h1>
|
||||||
<div id="content" class="content">
|
<div id="content" class="content">
|
||||||
<div>
|
<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>
|
</div>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<form method="POST" action="/update" enctype="multipart/form-data" accept-charset="utf-8">
|
<form method="POST" action="/update" enctype="multipart/form-data" accept-charset="utf-8">
|
||||||
|
|
|
@ -48,11 +48,11 @@
|
||||||
ch0.appendChild(sub);
|
ch0.appendChild(sub);
|
||||||
|
|
||||||
switch(j) {
|
switch(j) {
|
||||||
case 2: total[j] += val; break;
|
case 2: total[j] += val; break; // P_AC
|
||||||
case 6: total[j] += val; break;
|
case 6: total[j] += val; break; // YieldTotal
|
||||||
case 7: total[j] += val; break;
|
case 7: total[j] += val; break; // YieldDay
|
||||||
case 8: total[j] += val; break;
|
case 8: total[j] += val; break; // P_DC
|
||||||
case 10: total[j] += val; break;
|
case 10: total[j] += val; break; // P_ACr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,14 +49,24 @@
|
||||||
//template <class T>
|
//template <class T>
|
||||||
inline void DBGPRINTLN(String str) { DBGPRINT(str); DBGPRINT(F("\r\n")); }
|
inline void DBGPRINTLN(String str) { DBGPRINT(str); DBGPRINT(F("\r\n")); }
|
||||||
inline void DHEX(uint8_t b) {
|
inline void DHEX(uint8_t b) {
|
||||||
if( b<0x10 ) DSERIAL.print('0');
|
if( b<0x10 ) DSERIAL.print(F("0"));
|
||||||
DSERIAL.print(b,HEX);
|
DSERIAL.print(b,HEX);
|
||||||
|
if(NULL != mCb) {
|
||||||
|
if( b<0x10 ) mCb(F("0"));
|
||||||
|
mCb(String(b, HEX));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inline void DHEX(uint16_t b) {
|
inline void DHEX(uint16_t b) {
|
||||||
if( b<0x10 ) DSERIAL.print(F("000"));
|
if( b<0x10 ) DSERIAL.print(F("000"));
|
||||||
else if( b<0x100 ) DSERIAL.print(F("00"));
|
else if( b<0x100 ) DSERIAL.print(F("00"));
|
||||||
else if( b<0x1000 ) DSERIAL.print(F("0"));
|
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) {
|
inline void DHEX(uint32_t b) {
|
||||||
if( b<0x10 ) DSERIAL.print(F("0000000"));
|
if( b<0x10 ) DSERIAL.print(F("0000000"));
|
||||||
|
@ -66,10 +76,18 @@
|
||||||
else if( b<0x100000 ) DSERIAL.print(F("000"));
|
else if( b<0x100000 ) DSERIAL.print(F("000"));
|
||||||
else if( b<0x1000000 ) DSERIAL.print(F("00"));
|
else if( b<0x1000000 ) DSERIAL.print(F("00"));
|
||||||
else if( b<0x10000000 ) DSERIAL.print(F("0"));
|
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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue