Reduce string storage, use masking 'seen'
This commit is contained in:
parent
455dabb183
commit
665e45e0ba
|
@ -922,8 +922,7 @@ static void ee_Init() {
|
|||
if (!ee_IsPageClean(grp * PagesPerGroup + page)) {
|
||||
#ifdef EE_EMU_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("EEPROM Page ",page);
|
||||
SERIAL_ECHOLNPAIR(" not clean on group ",grp);
|
||||
SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp);
|
||||
SERIAL_FLUSH();
|
||||
#endif
|
||||
ee_PageErase(grp * PagesPerGroup + page);
|
||||
|
@ -944,7 +943,7 @@ static void ee_Init() {
|
|||
|
||||
#ifdef EE_EMU_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("EEPROM Active page: ",curPage);
|
||||
SERIAL_ECHOLNPAIR("EEPROM Active page: ", curPage);
|
||||
SERIAL_FLUSH();
|
||||
#endif
|
||||
|
||||
|
@ -953,8 +952,7 @@ static void ee_Init() {
|
|||
if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) {
|
||||
#ifdef EE_EMU_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("EEPROM Page ",page);
|
||||
SERIAL_ECHOLNPAIR(" not clean on active group ",curGroup);
|
||||
SERIAL_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup);
|
||||
SERIAL_FLUSH();
|
||||
ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page));
|
||||
#endif
|
||||
|
|
|
@ -962,10 +962,11 @@ void setup() {
|
|||
SERIAL_EOL();
|
||||
|
||||
#if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_CONFIGURATION_VER);
|
||||
SERIAL_ECHOPGM(STRING_DISTRIBUTION_DATE);
|
||||
SERIAL_ECHOLNPGM(MSG_AUTHOR STRING_CONFIG_H_AUTHOR);
|
||||
SERIAL_ECHO_MSG(
|
||||
MSG_CONFIGURATION_VER
|
||||
STRING_DISTRIBUTION_DATE
|
||||
MSG_AUTHOR STRING_CONFIG_H_AUTHOR
|
||||
);
|
||||
SERIAL_ECHO_MSG("Compiled: " __DATE__);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -50,9 +50,8 @@
|
|||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++)
|
||||
if (!isnan(z_values[x][y])) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" M421 I", x, " J", y);
|
||||
SERIAL_ECHOPAIR_F(" Z", z_values[x][y], 4);
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPAIR(" M421 I", int(x), " J", int(y));
|
||||
SERIAL_ECHOLNPAIR_F(" Z", z_values[x][y], 4);
|
||||
serial_delay(75); // Prevent Printrun from exploding
|
||||
}
|
||||
}
|
||||
|
|
|
@ -432,9 +432,7 @@ bool MMU2::rx_ok() {
|
|||
*/
|
||||
void MMU2::check_version() {
|
||||
if (buildnr < MMU_REQUIRED_FW_BUILDNR) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOPGM("MMU2 firmware version invalid. Required version >= ");
|
||||
SERIAL_ECHOLN(MMU_REQUIRED_FW_BUILDNR);
|
||||
SERIAL_ERROR_MSG("Invalid MMU2 firmware. Version >= " STRINGIFY(MMU_REQUIRED_FW_BUILDNR) " required.");
|
||||
kill(MSG_MMU2_WRONG_FIRMWARE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ void GcodeSuite::M420() {
|
|||
}
|
||||
|
||||
// L or V display the map info
|
||||
if (parser.seen('L') || parser.seen('V')) {
|
||||
if (parser.seen("LV")) {
|
||||
ubl.display_map(parser.byteval('T'));
|
||||
SERIAL_ECHOPGM("Mesh is ");
|
||||
if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in");
|
||||
|
|
|
@ -41,15 +41,14 @@ void GcodeSuite::M281() {
|
|||
}
|
||||
if (!angle_change) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" Servo ", servo_index);
|
||||
SERIAL_ECHOPAIR(" L", servo_angles[servo_index][0]);
|
||||
SERIAL_ECHOLNPAIR(" U", servo_angles[servo_index][1]);
|
||||
SERIAL_ECHOLNPAIR(" Servo ", servo_index,
|
||||
" L", servo_angles[servo_index][0],
|
||||
" U", servo_angles[servo_index][1]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOPAIR("Servo ", servo_index);
|
||||
SERIAL_ECHOLNPGM(" out of range");
|
||||
SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ void GcodeSuite::M301() {
|
|||
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
||||
SERIAL_ECHOPAIR(" e:", e); // specify extruder in serial output
|
||||
#endif // PID_PARAMS_PER_HOTEND
|
||||
SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e));
|
||||
SERIAL_ECHOPAIR(" i:", unscalePID_i(PID_PARAM(Ki, e)));
|
||||
SERIAL_ECHOPAIR(" d:", unscalePID_d(PID_PARAM(Kd, e)));
|
||||
SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e),
|
||||
" i:", unscalePID_i(PID_PARAM(Ki, e)),
|
||||
" d:", unscalePID_d(PID_PARAM(Kd, e)));
|
||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||
//Kc does not have scaling applied above, or in resetting defaults
|
||||
SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e));
|
||||
|
|
|
@ -56,8 +56,7 @@ void GcodeSuite::M302() {
|
|||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Cold extrudes are ");
|
||||
serialprintPGM(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis"));
|
||||
SERIAL_ECHOPAIR("abled (min temp ", thermalManager.extrude_min_temp);
|
||||
SERIAL_ECHOLNPGM("C)");
|
||||
SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@ void GcodeSuite::M304() {
|
|||
if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float());
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" p:", thermalManager.temp_bed.pid.Kp);
|
||||
SERIAL_ECHOPAIR(" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki));
|
||||
SERIAL_ECHOLNPAIR(" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||
SERIAL_ECHOLNPAIR(" p:", thermalManager.temp_bed.pid.Kp,
|
||||
" i:", unscalePID_i(thermalManager.temp_bed.pid.Ki),
|
||||
" d:", unscalePID_d(thermalManager.temp_bed.pid.Kd));
|
||||
}
|
||||
|
||||
#endif // PIDTEMPBED
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
void report_M92(const bool echo=true, const int8_t e=-1) {
|
||||
if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]));
|
||||
SERIAL_ECHOPAIR(" Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
|
||||
SERIAL_ECHOPAIR(" M92 X", LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]),
|
||||
" Y", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]),
|
||||
" Z", LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]));
|
||||
#if DISABLED(DISTINCT_E_FACTORS)
|
||||
SERIAL_ECHOPAIR(" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS]));
|
||||
#endif
|
||||
|
@ -37,8 +37,8 @@ void report_M92(const bool echo=true, const int8_t e=-1) {
|
|||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||
if (e >= 0 && i != e) continue;
|
||||
if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOPAIR(" M92 T", (int)i);
|
||||
SERIAL_ECHOLNPAIR(" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
|
||||
SERIAL_ECHOLNPAIR(" M92 T", (int)i,
|
||||
" E", VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -101,12 +101,10 @@ void GcodeSuite::M92() {
|
|||
micro_steps = argH ? argH : Z_MICROSTEPS;
|
||||
const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS];
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps);
|
||||
SERIAL_ECHOPAIR(", z_full_step_mm:", z_full_step_mm);
|
||||
SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm);
|
||||
if (wanted) {
|
||||
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm;
|
||||
SERIAL_ECHOPGM(", best:[");
|
||||
SERIAL_ECHO(best);
|
||||
SERIAL_ECHOPAIR(", best:[", best);
|
||||
if (best != wanted) { SERIAL_CHAR(','); SERIAL_ECHO(best + z_full_step_mm); }
|
||||
SERIAL_CHAR(']');
|
||||
}
|
||||
|
|
|
@ -43,14 +43,12 @@ void GcodeSuite::M280() {
|
|||
}
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(" Servo ", servo_index);
|
||||
SERIAL_ECHOLNPAIR(": ", servo[servo_index].read());
|
||||
SERIAL_ECHOLNPAIR(" Servo ", servo_index, ": ", servo[servo_index].read());
|
||||
}
|
||||
}
|
||||
else {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOPAIR("Servo ", servo_index);
|
||||
SERIAL_ECHOLNPGM(" out of range");
|
||||
SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ void L6470_report_current(L6470 &motor, const uint8_t axis) {
|
|||
break;
|
||||
}
|
||||
SERIAL_ECHO(dtostrf(val * 100 / 256, 10, 2, numstr));
|
||||
SERIAL_ECHO("%% ");
|
||||
SERIAL_ECHOPGM("%% ");
|
||||
serialprintPGM(suf);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
|
|
@ -99,13 +99,13 @@ void GcodeSuite::M900() {
|
|||
|
||||
if (!parser.seen_any()) {
|
||||
#if EXTRUDERS < 2
|
||||
SERIAL_ECHOLNPAIR("Advance S", ext_slot, " K", planner.extruder_advance_K[0]);
|
||||
SERIAL_ECHOLNPAIR("(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")");
|
||||
SERIAL_ECHOLNPAIR("Advance S", ext_slot, " K", planner.extruder_advance_K[0],
|
||||
"(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")");
|
||||
#else
|
||||
LOOP_L_N(i, EXTRUDERS) {
|
||||
const int slot = (int)TEST(lin_adv_slot, i);
|
||||
SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i]);
|
||||
SERIAL_ECHOLNPAIR("(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")");
|
||||
SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i],
|
||||
"(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")");
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,7 @@ void GcodeSuite::M413() {
|
|||
}
|
||||
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
if (parser.seen('R') || parser.seen('L')) recovery.load();
|
||||
if (parser.seen("RL")) recovery.load();
|
||||
if (parser.seen('W')) recovery.save(true);
|
||||
if (parser.seen('P')) recovery.purge();
|
||||
if (parser.seen('E')) serialprintPGM(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
|
||||
|
|
|
@ -28,11 +28,10 @@
|
|||
#include "../../module/tool_change.h"
|
||||
#include "../../module/motion.h"
|
||||
|
||||
|
||||
mpe_settings_t mpe_settings;
|
||||
|
||||
inline void mpe_settings_report() {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Magnetic Parking Extruder");
|
||||
SERIAL_ECHO_MSG("Magnetic Parking Extruder");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("L: Left parking :", mpe_settings.parking_xpos[0]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("R: Right parking :", mpe_settings.parking_xpos[1]);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("I: Grab Offset :", mpe_settings.grab_distance);
|
||||
|
|
|
@ -178,7 +178,7 @@ bool UIFlashStorage::is_present = false;
|
|||
((manufacturer_id == 0x1F) && (device_type == 0x86) && (capacity == 0x01)) ; // Adesto AT255F161
|
||||
|
||||
if (!is_known) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to locate supported SPI Flash Memory.");
|
||||
SERIAL_ECHO_MSG("Unable to locate supported SPI Flash Memory.");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Capacity , got: ", capacity);
|
||||
|
@ -252,7 +252,7 @@ bool UIFlashStorage::is_present = false;
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("No LULZ delimiter found.");
|
||||
SERIAL_ECHO_MSG("No LULZ delimiter found.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ bool UIFlashStorage::is_present = false;
|
|||
|
||||
int32_t write_offset = read_offset + 4 + block_size;
|
||||
if ((write_offset + 4 + block_size) > data_storage_area_size) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Not enough free space in Flash.");
|
||||
SERIAL_ECHO_MSG("Not enough free space in Flash.");
|
||||
return -1; // Not enough free space
|
||||
}
|
||||
return write_offset;
|
||||
|
@ -300,7 +300,7 @@ bool UIFlashStorage::is_present = false;
|
|||
|
||||
void UIFlashStorage::write_config_data(const void *data, size_t size) {
|
||||
if (!is_present) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("SPI Flash chip not present. Not saving UI settings.");
|
||||
SERIAL_ECHO_MSG("SPI Flash chip not present. Not saving UI settings.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ bool UIFlashStorage::is_present = false;
|
|||
// make sure that the data is different before rewriting.
|
||||
|
||||
if (verify_config_data(data, size)) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("UI settings already written, skipping write.");
|
||||
SERIAL_ECHO_MSG("UI settings already written, skipping write.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -427,12 +427,12 @@ bool UIFlashStorage::is_present = false;
|
|||
|
||||
MediaFileReader reader;
|
||||
if (!reader.open((char*) buff)) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to find media file");
|
||||
SERIAL_ECHO_MSG("Unable to find media file");
|
||||
return FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (get_media_file_size(slot) != 0xFFFFFFFFUL) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Media file already exists");
|
||||
SERIAL_ECHO_MSG("Media file already exists");
|
||||
return WOULD_OVERWRITE;
|
||||
}
|
||||
|
||||
|
@ -518,9 +518,8 @@ bool UIFlashStorage::is_present = false;
|
|||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Boot media file size:", bytes_remaining);
|
||||
addr = get_media_file_start(slot);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int16_t UIFlashStorage::BootMediaReader::read(void *data, const size_t size) {
|
||||
|
|
|
@ -923,8 +923,7 @@ template <class T> bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len
|
|||
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
if (command_write_ptr == 0xFFFFFFFFul) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Attempt to write to FIFO before CommandFifo::Cmd_Start().");
|
||||
SERIAL_ECHO_MSG("Attempt to write to FIFO before CommandFifo::Cmd_Start().");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1016,8 +1015,8 @@ template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
|
|||
if (Command_Space < (len + padding)) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Waiting for ", len + padding);
|
||||
SERIAL_ECHOPAIR(" bytes in command queue, now free: ", Command_Space);
|
||||
SERIAL_ECHOPAIR("Waiting for ", len + padding,
|
||||
" bytes in command queue, now free: ", Command_Space);
|
||||
#endif
|
||||
do {
|
||||
Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
|
@ -1071,8 +1070,7 @@ void CLCD::init() {
|
|||
uint8_t device_id = mem_read_8(REG::ID); // Read Device ID, Should Be 0x7C;
|
||||
if (device_id == 0x7c) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("FTDI chip initialized ");
|
||||
SERIAL_ECHO_MSG("FTDI chip initialized ");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace FTDI {
|
|||
constexpr uint8_t STENCIL_OP_DECR = 4;
|
||||
constexpr uint8_t STENCIL_OP_INVERT = 5;
|
||||
|
||||
typedef enum: uint32_t {
|
||||
typedef enum : uint32_t {
|
||||
BITMAPS = 1,
|
||||
POINTS = 2,
|
||||
LINES = 3,
|
||||
|
@ -281,7 +281,7 @@ namespace FTDI_FT810 {
|
|||
}
|
||||
|
||||
namespace FTDI {
|
||||
enum effect_t {
|
||||
enum effect_t : unsigned char {
|
||||
SILENCE = 0x00,
|
||||
SQUARE_WAVE = 0x01,
|
||||
SINE_WAVE = 0x02,
|
||||
|
@ -342,7 +342,7 @@ namespace FTDI {
|
|||
UNMUTE = 0x61
|
||||
};
|
||||
|
||||
enum note_t {
|
||||
enum note_t : unsigned char {
|
||||
END_SONG = 0xFF,
|
||||
REST = 0x00,
|
||||
|
||||
|
|
|
@ -78,8 +78,7 @@ bool DLCache::wait_until_idle() {
|
|||
const unsigned long startTime = millis();
|
||||
do {
|
||||
if ((millis() - startTime) > 250) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Timeout on DL_Cache::Wait_Until_Idle()");
|
||||
SERIAL_ECHO_MSG("Timeout on DL_Cache::Wait_Until_Idle()");
|
||||
CLCD::CommandFifo::reset();
|
||||
return false;
|
||||
}
|
||||
|
@ -130,15 +129,15 @@ bool DLCache::store(uint32_t num_bytes /* = 0*/) {
|
|||
// Not enough memory to cache the display list.
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Not enough space in GRAM to cache display list, free space: ", free_space);
|
||||
SERIAL_ECHOLNPAIR(" Required: ", dl_size);
|
||||
SERIAL_ECHOLNPAIR("Not enough space in GRAM to cache display list, free space: ", free_space,
|
||||
" Required: ", dl_size);
|
||||
#endif
|
||||
return false;
|
||||
} else {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Saving DL to RAMG cache, bytes: ", dl_size);
|
||||
SERIAL_ECHOLNPAIR(" Free space: ", free_space);
|
||||
SERIAL_ECHOLNPAIR("Saving DL to RAMG cache, bytes: ", dl_size,
|
||||
" Free space: ", free_space);
|
||||
#endif
|
||||
cmd.memcpy(dl_addr, MAP::RAM_DL, dl_size);
|
||||
cmd.execute();
|
||||
|
@ -168,8 +167,8 @@ void DLCache::append() {
|
|||
cmd.execute();
|
||||
wait_until_idle();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Appending to DL from RAMG cache, bytes: ", dl_size);
|
||||
SERIAL_ECHOLNPAIR(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
SERIAL_ECHOLNPAIR("Appending to DL from RAMG cache, bytes: ", dl_size,
|
||||
" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -176,8 +176,7 @@ class CachedScreen {
|
|||
static bool storeBackground() {
|
||||
DLCache dlcache(DL_SLOT);
|
||||
if (!dlcache.store(DL_SIZE)) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("CachedScreen::storeBackground() failed: not enough DL cache space");
|
||||
SERIAL_ECHO_MSG("CachedScreen::storeBackground() failed: not enough DL cache space");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -38,8 +38,7 @@ namespace FTDI {
|
|||
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Playing note ", note);
|
||||
SERIAL_ECHOLNPAIR(", instrument ", effect);
|
||||
SERIAL_ECHOLNPAIR("Playing note ", int(note), ", instrument ", int(effect));
|
||||
#endif
|
||||
|
||||
// Play the note
|
||||
|
|
|
@ -66,8 +66,7 @@ bool MediaPlayerScreen::playCardMedia() {
|
|||
if (!reader.open(fname))
|
||||
return false;
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Starting to play STARTUP.AVI");
|
||||
SERIAL_ECHO_MSG("Starting to play STARTUP.AVI");
|
||||
playStream(&reader, MediaFileReader::read);
|
||||
reader.close();
|
||||
#endif
|
||||
|
@ -79,8 +78,7 @@ bool MediaPlayerScreen::playBootMedia() {
|
|||
UIFlashStorage::BootMediaReader reader;
|
||||
if (!reader.isAvailable()) return false;
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Starting to play boot video");
|
||||
SERIAL_ECHO_MSG("Starting to play boot video");
|
||||
playStream(&reader, UIFlashStorage::BootMediaReader::read);
|
||||
return true;
|
||||
}
|
||||
|
@ -138,8 +136,7 @@ void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream
|
|||
t = millis();
|
||||
timeouts--;
|
||||
if (timeouts == 0) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Timeout playing video");
|
||||
SERIAL_ECHO_MSG("Timeout playing video");
|
||||
cmd.reset();
|
||||
goto exit;
|
||||
}
|
||||
|
@ -151,8 +148,7 @@ void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream
|
|||
CLCD::mem_write_32(CLCD::REG::MEDIAFIFO_WRITE, writePtr);
|
||||
} while (nBytes == block_size);
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Done playing video");
|
||||
SERIAL_ECHO_MSG("Done playing video");
|
||||
|
||||
exit:
|
||||
spiInit(SPI_SPEED); // Restore default speed
|
||||
|
|
|
@ -52,8 +52,7 @@ void TouchCalibrationScreen::onEntry() {
|
|||
|
||||
while (CLCD::is_touching()) {
|
||||
#if ENABLED(TOUCH_UI_DEBUG)
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Waiting for touch release");
|
||||
SERIAL_ECHO_MSG("Waiting for touch release");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,8 +192,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
|
|||
if (!dir.open(&parent, dosFilename, O_READ)) {
|
||||
if (lsAction == LS_SerialPrint) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
|
||||
SERIAL_ECHOLN(dosFilename);
|
||||
SERIAL_ECHOLNPAIR(MSG_SD_CANT_OPEN_SUBDIR, dosFilename);
|
||||
}
|
||||
}
|
||||
lsDive(path, dir);
|
||||
|
@ -292,8 +291,7 @@ void CardReader::ls() {
|
|||
if (!dir.open(&diveDir, segment, O_READ)) {
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
|
||||
SERIAL_ECHO(segment);
|
||||
SERIAL_ECHOPAIR(MSG_SD_CANT_OPEN_SUBDIR, segment);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue