mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-17 08:17:12 +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
|
@ -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…
Add table
Add a link
Reference in a new issue