🎨 Combine serial echos
This commit is contained in:
parent
ff201e6552
commit
1d4f928342
|
@ -199,8 +199,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
|||
for (i = 0; i <PageSize >> 2; i++)
|
||||
pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i]));
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM PageWrite ", page);
|
||||
DEBUG_ECHO_MSG("EEPROM PageWrite ", page);
|
||||
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
|
||||
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
|
||||
DEBUG_FLUSH();
|
||||
|
@ -245,8 +244,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
|||
// Reenable interrupts
|
||||
__enable_irq();
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page);
|
||||
DEBUG_ECHO_MSG("EEPROM Unlock failure for page ", page);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -270,8 +268,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
|||
// Reenable interrupts
|
||||
__enable_irq();
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page);
|
||||
DEBUG_ECHO_MSG("EEPROM Write failure for page ", page);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -286,8 +283,7 @@ static bool ee_PageWrite(uint16_t page, const void *data) {
|
|||
if (memcmp(getFlashStorage(page),data,PageSize)) {
|
||||
|
||||
#ifdef EE_EMU_DEBUG
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page);
|
||||
DEBUG_ECHO_MSG("EEPROM Verify Write failure for page ", page);
|
||||
|
||||
ee_Dump( page, (uint32_t *)addrflash);
|
||||
ee_Dump(-page, data);
|
||||
|
@ -325,8 +321,7 @@ static bool ee_PageErase(uint16_t page) {
|
|||
uint16_t i;
|
||||
uint32_t addrflash = uint32_t(getFlashStorage(page));
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM PageErase ", page);
|
||||
DEBUG_ECHO_MSG("EEPROM PageErase ", page);
|
||||
DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash);
|
||||
DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0));
|
||||
DEBUG_FLUSH();
|
||||
|
@ -370,8 +365,7 @@ static bool ee_PageErase(uint16_t page) {
|
|||
// Reenable interrupts
|
||||
__enable_irq();
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page);
|
||||
DEBUG_ECHO_MSG("EEPROM Unlock failure for page ",page);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -394,8 +388,7 @@ static bool ee_PageErase(uint16_t page) {
|
|||
// Reenable interrupts
|
||||
__enable_irq();
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page);
|
||||
DEBUG_ECHO_MSG("EEPROM Erase failure for page ",page);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -410,8 +403,7 @@ static bool ee_PageErase(uint16_t page) {
|
|||
uint32_t * aligned_src = (uint32_t *) addrflash;
|
||||
for (i = 0; i < PageSize >> 2; i++) {
|
||||
if (*aligned_src++ != 0xFFFFFFFF) {
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page);
|
||||
DEBUG_ECHO_MSG("EEPROM Verify Erase failure for page ",page);
|
||||
ee_Dump(page, (uint32_t *)addrflash);
|
||||
return false;
|
||||
}
|
||||
|
@ -921,8 +913,7 @@ static void ee_Init() {
|
|||
// If all groups seem to be used, default to first group
|
||||
if (curGroup >= GroupCount) curGroup = 0;
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup);
|
||||
DEBUG_ECHO_MSG("EEPROM Current Group: ",curGroup);
|
||||
DEBUG_FLUSH();
|
||||
|
||||
// Now, validate that all the other group pages are empty
|
||||
|
@ -931,8 +922,7 @@ static void ee_Init() {
|
|||
|
||||
for (int page = 0; page < PagesPerGroup; page++) {
|
||||
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp);
|
||||
DEBUG_ECHO_MSG("EEPROM Page ", page, " not clean on group ", grp);
|
||||
DEBUG_FLUSH();
|
||||
ee_PageErase(grp * PagesPerGroup + page);
|
||||
}
|
||||
|
@ -948,15 +938,13 @@ static void ee_Init() {
|
|||
}
|
||||
}
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage);
|
||||
DEBUG_ECHO_MSG("EEPROM Active page: ", curPage);
|
||||
DEBUG_FLUSH();
|
||||
|
||||
// Make sure the pages following the first clean one are also clean
|
||||
for (int page = curPage + 1; page < PagesPerGroup; page++) {
|
||||
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup);
|
||||
DEBUG_ECHO_MSG("EEPROM Page ", page, " not clean on active group ", curGroup);
|
||||
DEBUG_FLUSH();
|
||||
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
|
||||
ee_PageErase(curGroup * PagesPerGroup + page);
|
||||
|
|
|
@ -1031,8 +1031,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
|
|||
const float es = pgm_read_float(&(step->extrude));
|
||||
const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate));
|
||||
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOLNPGM("E step ", es, "/", fr_mm_m);
|
||||
DEBUG_ECHO_MSG("E step ", es, "/", fr_mm_m);
|
||||
|
||||
current_position.e += es;
|
||||
line_to_current_position(MMM_TO_MMS(fr_mm_m));
|
||||
|
|
|
@ -32,13 +32,13 @@ mpe_settings_t mpe_settings;
|
|||
|
||||
inline void mpe_settings_report() {
|
||||
SERIAL_ECHO_MSG("Magnetic Parking Extruder");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("L: Left parking :", mpe_settings.parking_xpos[0]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("R: Right parking :", mpe_settings.parking_xpos[1]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("I: Grab Offset :", mpe_settings.grab_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate)));
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("D: Distance trav.:", mpe_settings.travel_distance);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("C: Compenstion :", mpe_settings.compensation_factor);
|
||||
SERIAL_ECHO_MSG("L: Left parking :", mpe_settings.parking_xpos[0]);
|
||||
SERIAL_ECHO_MSG("R: Right parking :", mpe_settings.parking_xpos[1]);
|
||||
SERIAL_ECHO_MSG("I: Grab Offset :", mpe_settings.grab_distance);
|
||||
SERIAL_ECHO_MSG("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate)));
|
||||
SERIAL_ECHO_MSG("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate)));
|
||||
SERIAL_ECHO_MSG("D: Distance trav.:", mpe_settings.travel_distance);
|
||||
SERIAL_ECHO_MSG("C: Compenstion :", mpe_settings.compensation_factor);
|
||||
}
|
||||
|
||||
void mpe_settings_init() {
|
||||
|
|
|
@ -178,9 +178,9 @@ bool UIFlashStorage::is_present = false;
|
|||
|
||||
if (!is_known) {
|
||||
SERIAL_ECHO_MSG("Unable to locate supported SPI Flash Memory.");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Capacity , got: ", capacity);
|
||||
SERIAL_ECHO_MSG(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_MSG(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_MSG(" Capacity , got: ", capacity);
|
||||
}
|
||||
|
||||
return is_known;
|
||||
|
@ -247,7 +247,7 @@ bool UIFlashStorage::is_present = false;
|
|||
case 0xFFFFFFFFul: return read_offset;
|
||||
case delimiter: read_offset = offset; break;
|
||||
default:
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Invalid delimiter in Flash: ", delim);
|
||||
SERIAL_ECHO_MSG("Invalid delimiter in Flash: ", delim);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,7 @@ bool UIFlashStorage::is_present = false;
|
|||
}
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr);
|
||||
SERIAL_ECHOPGM(")...");
|
||||
SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr, ")...");
|
||||
|
||||
const uint32_t delim = delimiter;
|
||||
write_addr = write(write_addr, &delim, sizeof(delim));
|
||||
|
@ -509,7 +508,7 @@ bool UIFlashStorage::is_present = false;
|
|||
|
||||
bytes_remaining = get_media_file_size(slot);
|
||||
if (bytes_remaining != 0xFFFFFFFFUL) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Boot media file size:", bytes_remaining);
|
||||
SERIAL_ECHO_MSG("Boot media file size:", bytes_remaining);
|
||||
addr = get_media_file_start(slot);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1024,9 +1024,7 @@ template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
|
|||
uint16_t Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
if (Command_Space < (len + padding)) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Waiting for ", len + padding);
|
||||
SERIAL_ECHOLNPGM(" bytes in command queue, now free: ", Command_Space);
|
||||
SERIAL_ECHO_MSG("Waiting for ", len + padding, " bytes in command queue, now free: ", Command_Space);
|
||||
#endif
|
||||
do {
|
||||
Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
|
|
|
@ -131,9 +131,7 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) {
|
|||
if (dl_size > dl_slot_size) {
|
||||
// Not enough memory to cache the display list.
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size);
|
||||
SERIAL_ECHOLNPGM(" Required: ", dl_size);
|
||||
SERIAL_ECHO_MSG("Not enough space in GRAM to cache display list, free space: ", dl_slot_size, " Required: ", dl_size);
|
||||
#endif
|
||||
dl_slot_used = 0;
|
||||
save_slot();
|
||||
|
@ -141,9 +139,7 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) {
|
|||
}
|
||||
else {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Saving DL to RAMG cache, bytes: ", dl_slot_used);
|
||||
SERIAL_ECHOLNPGM(" Free space: ", dl_slot_size);
|
||||
SERIAL_ECHO_MSG("Saving DL to RAMG cache, bytes: ", dl_slot_used, " Free space: ", dl_slot_size);
|
||||
#endif
|
||||
dl_slot_used = dl_size;
|
||||
save_slot();
|
||||
|
@ -160,9 +156,9 @@ void DLCache::save_slot(uint8_t indx, uint32_t addr, uint16_t size, uint16_t use
|
|||
}
|
||||
|
||||
void DLCache::load_slot(uint8_t indx, uint32_t &addr, uint16_t &size, uint16_t &used) {
|
||||
addr = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 0);
|
||||
size = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 4);
|
||||
used = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 8);
|
||||
addr = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 0);
|
||||
size = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 4);
|
||||
used = CLCD::mem_read_32(DL_CACHE_START + indx * 12 + 8);
|
||||
}
|
||||
|
||||
void DLCache::append() {
|
||||
|
@ -171,9 +167,7 @@ void DLCache::append() {
|
|||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
cmd.execute();
|
||||
wait_until_idle();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM ("Appending to DL from RAMG cache, bytes: ", dl_slot_used);
|
||||
SERIAL_ECHOLNPGM(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
SERIAL_ECHO_MSG("Appending to DL from RAMG cache, bytes: ", dl_slot_used, " REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue