🩹 Update some hex-printing (#27654)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Andrew
2025-01-26 00:58:40 -05:00
committed by GitHub
parent ab7137ab8e
commit 0cd1d9c3c9
4 changed files with 13 additions and 16 deletions
+2 -2
View File
@@ -1795,14 +1795,14 @@ void unified_bed_leveling::smart_fill_mesh() {
SERIAL_ECHOLNPGM("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk);
serial_delay(50);
SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index()));
SERIAL_ECHOLNPGM("Meshes go from ", _hex_word(settings.meshes_start_index()), " to ", _hex_word(settings.meshes_end_index()));
serial_delay(50);
SERIAL_ECHOLNPGM("sizeof(unified_bed_leveling) : ", sizeof(unified_bed_leveling));
SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values));
serial_delay(25);
SERIAL_ECHOLNPGM("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index())));
SERIAL_ECHOLNPGM("EEPROM free for UBL: ", _hex_word(settings.meshes_end_index() - settings.meshes_start_index()));
serial_delay(50);
SERIAL_ECHOLNPGM("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n");
+2 -2
View File
@@ -348,7 +348,7 @@ void GCodeParser::parse(char *p) {
if (!has_val && !string_arg) { // No value? First time, keep as string_arg
string_arg = p - 1;
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address(string_arg)); // DEBUG
#endif
}
@@ -359,7 +359,7 @@ void GCodeParser::parse(char *p) {
else if (!string_arg) { // Not A-Z? First time, keep as the string_arg
string_arg = p - 1;
#if ENABLED(DEBUG_GCODE_PARSER)
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG
if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address(string_arg)); // DEBUG
#endif
}
+2 -5
View File
@@ -132,11 +132,8 @@ public:
SBI32(codebits, ind); // parameter exists
param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0
#if ENABLED(DEBUG_GCODE_PARSER)
if (codenum == 800) {
SERIAL_ECHOPGM("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16)));
print_hex_word((uint16_t)(codebits & 0xFFFF));
SERIAL_ECHOLNPGM(") | param = ", param[ind]);
}
if (codenum == 800)
SERIAL_ECHOLNPGM("Set bit ", ind, " of codebits (", _hex_long(codebits), ") | param = ", param[ind]);
#endif
}
+7 -7
View File
@@ -1089,7 +1089,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
if (path[0] == '/') { // Starting at the root directory?
inDirPtr = &root;
atom_ptr++;
DEBUG_ECHOLNPGM(" CWD to root: ", hex_address((void*)inDirPtr));
DEBUG_ECHOLNPGM(" CWD to root: ", hex_address(inDirPtr));
if (update_cwd) workDirDepth = 0; // The cwd can be updated for the benefit of sub-programs
}
else
@@ -1097,7 +1097,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
startDirPtr = inDirPtr;
DEBUG_ECHOLNPGM(" startDirPtr = ", hex_address((void*)startDirPtr));
DEBUG_ECHOLNPGM(" startDirPtr = ", hex_address(startDirPtr));
while (atom_ptr) {
// Find next subdirectory delimiter
@@ -1113,7 +1113,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
if (echo) SERIAL_ECHOLN(dosSubdirname);
DEBUG_ECHOLNPGM(" sub = ", hex_address((void*)sub));
DEBUG_ECHOLNPGM(" sub = ", hex_address(sub));
// Open inDirPtr (closing first)
sub->close();
@@ -1125,13 +1125,13 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
// Close inDirPtr if not at starting-point
if (inDirPtr != startDirPtr) {
DEBUG_ECHOLNPGM(" closing inDirPtr: ", hex_address((void*)inDirPtr));
DEBUG_ECHOLNPGM(" closing inDirPtr: ", hex_address(inDirPtr));
inDirPtr->close();
}
// inDirPtr now subDir
inDirPtr = sub;
DEBUG_ECHOLNPGM(" inDirPtr = sub: ", hex_address((void*)inDirPtr));
DEBUG_ECHOLNPGM(" inDirPtr = sub: ", hex_address(inDirPtr));
// Update workDirParents and workDirDepth
if (update_cwd) {
@@ -1142,7 +1142,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
// Point sub at the other scratch object
sub = (inDirPtr != &newDir1) ? &newDir1 : &newDir2;
DEBUG_ECHOLNPGM(" swapping sub = ", hex_address((void*)sub));
DEBUG_ECHOLNPGM(" swapping sub = ", hex_address(sub));
// Next path atom address
atom_ptr = name_end + 1;
@@ -1150,7 +1150,7 @@ const char* CardReader::diveToFile(const bool update_cwd, MediaFile* &inDirPtr,
if (update_cwd) {
workDir = *inDirPtr;
DEBUG_ECHOLNPGM(" final workDir = ", hex_address((void*)inDirPtr));
DEBUG_ECHOLNPGM(" final workDir = ", hex_address(inDirPtr));
flag.workDirIsRoot = (workDirDepth == 0);
TERN_(SDCARD_SORT_ALPHA, presort());
}