mirror of
https://github.com/sanni/cartreader.git
synced 2024-12-27 05:21:53 +01:00
remove custom code to print 0 prefixes in sprintf
This commit is contained in:
parent
4d000418a8
commit
1aaa90af97
@ -1779,10 +1779,7 @@ void printFlash(int numBytes) {
|
||||
|
||||
for (int currByte = 0; currByte < numBytes; currByte += 10) {
|
||||
for (int c = 0; c < 10; c++) {
|
||||
itoa(readByte_Flash(currByte + c), myBuffer, 16);
|
||||
for (size_t i = 0; i < 2 - strlen(myBuffer); i++) {
|
||||
print_Msg(F("0"));
|
||||
}
|
||||
sprintf(myBuffer, "%.2x", readByte_Flash(currByte + c));
|
||||
// Now print the significant bits
|
||||
print_Msg(myBuffer);
|
||||
}
|
||||
@ -2067,17 +2064,11 @@ void printFlash16(int numBytes) {
|
||||
byte right_byte = (currWord >> 8) & 0xFF;
|
||||
|
||||
|
||||
sprintf(buf, "%x", left_byte);
|
||||
for (size_t i = 0; i < 2 - strlen(buf); i++) {
|
||||
print_Msg(F("0"));
|
||||
}
|
||||
sprintf(buf, "%.2x", left_byte);
|
||||
// Now print the significant bits
|
||||
print_Msg(buf);
|
||||
|
||||
sprintf(buf, "%x", right_byte);
|
||||
for (size_t i = 0; i < 2 - strlen(buf); i++) {
|
||||
print_Msg(F("0"));
|
||||
}
|
||||
sprintf(buf, "%.2x", right_byte);
|
||||
// Now print the significant bits
|
||||
print_Msg(buf);
|
||||
}
|
||||
@ -2421,17 +2412,11 @@ void print_Eprom(int numBytes) {
|
||||
byte right_byte = (currWord >> 8) & 0xFF;
|
||||
|
||||
|
||||
sprintf(buf, "%x", left_byte);
|
||||
for (size_t i = 0; i < 2 - strlen(buf); i++) {
|
||||
print_Msg(F("0"));
|
||||
}
|
||||
sprintf(buf, "%.2x", left_byte);
|
||||
// Now print the significant bits
|
||||
print_Msg(buf);
|
||||
|
||||
sprintf(buf, "%x", right_byte);
|
||||
for (size_t i = 0; i < 2 - strlen(buf); i++) {
|
||||
print_Msg(F("0"));
|
||||
}
|
||||
sprintf(buf, "%.2x", right_byte);
|
||||
// Now print the significant bits
|
||||
print_Msg(buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user