Skip to content

Commit 15f26b4

Browse files
authored
πŸ§‘β€πŸ’» AS_CHAR => C (MarlinFirmware#26569)
1 parent 10d80eb commit 15f26b4

33 files changed

+80
-80
lines changed

β€ŽMarlin/src/HAL/LPC1768/eeprom_sdcard.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ bool PersistentStore::access_finish() {
9191
static void debug_rw(const bool write, int &pos, const uint8_t *value, const size_t size, const FRESULT s, const size_t total=0) {
9292
#if ENABLED(DEBUG_SD_EEPROM_EMULATION)
9393
FSTR_P const rw_str = write ? F("write") : F("read");
94-
SERIAL_ECHOLN(AS_CHAR(' '), rw_str, F("_data("), pos, AS_CHAR(','), *value, AS_CHAR(','), size, F(", ...)"));
94+
SERIAL_ECHOLN(C(' '), rw_str, F("_data("), pos, C(','), *value, C(','), size, F(", ...)"));
9595
if (total)
9696
SERIAL_ECHOLN(F(" f_"), rw_str, F("()="), s, F("\n size="), size, F("\n bytes_"), write ? F("written=") : F("read="), total);
9797
else

β€ŽMarlin/src/HAL/shared/Delay.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
#if ENABLED(MARLIN_DEV_MODE)
110110
void dump_delay_accuracy_check() {
111111
auto report_call_time = [](FSTR_P const name, FSTR_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) {
112-
SERIAL_ECHOLN(F("Calling "), name, F(" for "), cycles, AS_CHAR(' '), unit, F(" took: "), total, AS_CHAR(' '), unit);
112+
SERIAL_ECHOLN(F("Calling "), name, F(" for "), cycles, C(' '), unit, F(" took: "), total, C(' '), unit);
113113
if (do_flush) SERIAL_FLUSHTX();
114114
};
115115

β€ŽMarlin/src/core/debug_section.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SectionLog {
3939

4040
void echo_msg(FSTR_P const fpre) {
4141
SERIAL_ECHO(fpre);
42-
if (the_msg) SERIAL_ECHO(AS_CHAR(' '), the_msg);
42+
if (the_msg) SERIAL_ECHO(C(' '), the_msg);
4343
SERIAL_CHAR(' ');
4444
print_xyz(xyz_pos_t(current_position));
4545
}

β€ŽMarlin/src/core/mstring.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class MString {
9898

9999
void debug(FSTR_P const f) {
100100
#if ENABLED(MSTRING_DEBUG)
101-
SERIAL_ECHOLN(f, AS_CHAR(':'), uintptr_t(str), AS_CHAR(' '), length(), AS_CHAR(' '), str);
101+
SERIAL_ECHOLN(f, C(':'), uintptr_t(str), C(' '), length(), C(' '), str);
102102
#endif
103103
}
104104

β€ŽMarlin/src/core/serial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ template <typename T> void SERIAL_ECHOLN(T x) { SERIAL_IMPL.println(x); }
148148

149149
// Wrapper for ECHO commands to interpret a char
150150
void SERIAL_ECHO(serial_char_t x);
151-
#define AS_DIGIT(C) AS_CHAR('0' + (C))
151+
#define AS_DIGIT(n) C('0' + (n))
152152

153153
// Print an integer with a numeric base such as PrintBase::Hex
154154
template <typename T> void SERIAL_PRINT(T x, PrintBase y) { SERIAL_IMPL.print(x, y); }

β€ŽMarlin/src/core/types.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ typedef IF<TERN0(ABL_USES_GRID, (GRID_MAX_POINTS > 255)), uint16_t, uint8_t>::ty
298298
#define MMM_TO_MMS(MM_M) feedRate_t(static_cast<float>(MM_M) / 60.0f)
299299
#define MMS_TO_MMM(MM_S) (static_cast<float>(MM_S) * 60.0f)
300300

301-
// Packaged character for AS_CHAR macro and other usage
301+
// Packaged character for C macro and other usage
302302
typedef struct SerialChar { char c; SerialChar(char n) : c(n) { } } serial_char_t;
303-
#define AS_CHAR(C) serial_char_t(C)
303+
#define C(c) serial_char_t(c)
304304

305305
// Packaged types: float with precision and/or width; a repeated space/character
306306
typedef struct WFloat { float value; char width; char prec;

β€ŽMarlin/src/feature/bedlevel/ubl/ubl_G29.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ void unified_bed_leveling::G29() {
465465
SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh.");
466466
}
467467
if (param.V_verbosity > 1)
468-
SERIAL_ECHOLN(F("Probing around ("), param.XY_pos.x, AS_CHAR(','), param.XY_pos.y, F(").\n"));
468+
SERIAL_ECHOLN(F("Probing around ("), param.XY_pos.x, C(','), param.XY_pos.y, F(").\n"));
469469
probe_entire_mesh(param.XY_pos, parser.seen_test('T'), parser.seen_test('E'), parser.seen_test('U'));
470470

471471
report_current_position();
@@ -1572,14 +1572,14 @@ void unified_bed_leveling::smart_fill_mesh() {
15721572
if (DEBUGGING(LEVELING)) {
15731573
#if ENABLED(UBL_TILT_ON_MESH_POINTS)
15741574
const xy_pos_t oldLpos = oldRpos.asLogical();
1575-
DEBUG_ECHO(F("Calculated point: ("), p_float_t(oldRpos.x, 7), AS_CHAR(','), p_float_t(oldRpos.y, 7),
1576-
F(") logical: ("), p_float_t(oldLpos.x, 7), AS_CHAR(','), p_float_t(oldLpos.y, 7),
1575+
DEBUG_ECHO(F("Calculated point: ("), p_float_t(oldRpos.x, 7), C(','), p_float_t(oldRpos.y, 7),
1576+
F(") logical: ("), p_float_t(oldLpos.x, 7), C(','), p_float_t(oldLpos.y, 7),
15771577
F(")\nSelected mesh point: ")
15781578
);
15791579
#endif
15801580
const xy_pos_t lpos = rpos.asLogical();
1581-
DEBUG_ECHO( AS_CHAR('('), p_float_t(rpos.x, 7), AS_CHAR(','), p_float_t(rpos.y, 7),
1582-
F(") logical: ("), p_float_t(lpos.x, 7), AS_CHAR(','), p_float_t(lpos.y, 7),
1581+
DEBUG_ECHO( C('('), p_float_t(rpos.x, 7), C(','), p_float_t(rpos.y, 7),
1582+
F(") logical: ("), p_float_t(lpos.x, 7), C(','), p_float_t(lpos.y, 7),
15831583
F(") measured: "), p_float_t(measured_z, 7),
15841584
F(" correction: "), p_float_t(zcorr, 7)
15851585
);
@@ -1614,22 +1614,22 @@ void unified_bed_leveling::smart_fill_mesh() {
16141614
vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1).get_normal();
16151615

16161616
if (param.V_verbosity > 2)
1617-
SERIAL_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), AS_CHAR(','), p_float_t(normal.y, 7), AS_CHAR(','), p_float_t(normal.z, 7), AS_CHAR(']'));
1617+
SERIAL_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), C(','), p_float_t(normal.y, 7), C(','), p_float_t(normal.z, 7), C(']'));
16181618

16191619
matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1));
16201620

16211621
GRID_LOOP(i, j) {
16221622
float mx = get_mesh_x(i), my = get_mesh_y(j), mz = z_values[i][j];
16231623

16241624
if (DEBUGGING(LEVELING)) {
1625-
DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> "));
1625+
DEBUG_ECHOLN(F("before rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> "));
16261626
DEBUG_DELAY(20);
16271627
}
16281628

16291629
rotation.apply_rotation_xyz(mx, my, mz);
16301630

16311631
if (DEBUGGING(LEVELING)) {
1632-
DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), AS_CHAR(','), p_float_t(my, 7), AS_CHAR(','), p_float_t(mz, 7), F("] ---> "));
1632+
DEBUG_ECHOLN(F("after rotation = ["), p_float_t(mx, 7), C(','), p_float_t(my, 7), C(','), p_float_t(mz, 7), F("] ---> "));
16331633
DEBUG_DELAY(20);
16341634
}
16351635

@@ -1641,7 +1641,7 @@ void unified_bed_leveling::smart_fill_mesh() {
16411641
rotation.debug(F("rotation matrix:\n"));
16421642
DEBUG_ECHOLN(F("LSF Results A="), p_float_t(lsf_results.A, 7), F(" B="), p_float_t(lsf_results.B, 7), F(" D="), p_float_t(lsf_results.D, 7));
16431643
DEBUG_DELAY(55);
1644-
DEBUG_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), AS_CHAR(','), p_float_t(normal.y, 7), AS_CHAR(','), p_float_t(normal.z, 7), AS_CHAR(']'));
1644+
DEBUG_ECHOLN(F("bed plane normal = ["), p_float_t(normal.x, 7), C(','), p_float_t(normal.y, 7), C(','), p_float_t(normal.z, 7), C(']'));
16451645
DEBUG_EOL();
16461646

16471647
/**
@@ -1659,7 +1659,7 @@ void unified_bed_leveling::smart_fill_mesh() {
16591659
};
16601660
auto debug_pt = [](const int num, const xy_pos_t &pos, const_float_t zadd) {
16611661
d_from();
1662-
DEBUG_ECHOLN(F("Point "), num, AS_CHAR(':'), p_float_t(normed(pos, zadd), 6), F(" Z error = "), p_float_t(zadd - get_z_correction(pos), 6));
1662+
DEBUG_ECHOLN(F("Point "), num, C(':'), p_float_t(normed(pos, zadd), 6), F(" Z error = "), p_float_t(zadd - get_z_correction(pos), 6));
16631663
};
16641664
debug_pt(1, probe_pt[0], normal.z * gotz[0]);
16651665
debug_pt(2, probe_pt[1], normal.z * gotz[1]);
@@ -1668,7 +1668,7 @@ void unified_bed_leveling::smart_fill_mesh() {
16681668
constexpr xy_float_t safe_xy = { Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT };
16691669
d_from(); DEBUG_ECHOLN(F("safe home with Z="), F("0 : "), p_float_t(normed(safe_xy, 0), 6));
16701670
d_from(); DEBUG_ECHOLN(F("safe home with Z="), F("mesh value "), p_float_t(normed(safe_xy, get_z_correction(safe_xy)), 6));
1671-
DEBUG_ECHO(F(" Z error = ("), Z_SAFE_HOMING_X_POINT, AS_CHAR(','), Z_SAFE_HOMING_Y_POINT, F(") = "), p_float_t(get_z_correction(safe_xy), 6));
1671+
DEBUG_ECHO(F(" Z error = ("), Z_SAFE_HOMING_X_POINT, C(','), Z_SAFE_HOMING_Y_POINT, F(") = "), p_float_t(get_z_correction(safe_xy), 6));
16721672
#endif
16731673
#endif
16741674
} // DEBUGGING(LEVELING)

β€ŽMarlin/src/feature/encoder_i2c.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
4949

5050
initialized = true;
5151

52-
SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis, addr = ", address);
52+
SERIAL_ECHOLNPGM("Setting up encoder on ", C(AXIS_CHAR(encoderAxis)), " axis, addr = ", address);
5353

5454
position = get_position();
5555
}
@@ -67,7 +67,7 @@ void I2CPositionEncoder::update() {
6767
/*
6868
if (trusted) { //commented out as part of the note below
6969
trusted = false;
70-
SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis encoder. Disengaging error correction until module is trusted again.");
70+
SERIAL_ECHOLNPGM("Fault detected on ", C(AXIS_CHAR(encoderAxis)), " axis encoder. Disengaging error correction until module is trusted again.");
7171
}
7272
*/
7373
return;
@@ -92,7 +92,7 @@ void I2CPositionEncoder::update() {
9292
if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) {
9393
trusted = true;
9494

95-
SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(AXIS_CHAR(encoderAxis)), " axis has been fault-free for set duration, reinstating error correction.");
95+
SERIAL_ECHOLNPGM("Untrusted encoder module on ", C(AXIS_CHAR(encoderAxis)), " axis has been fault-free for set duration, reinstating error correction.");
9696

9797
//the encoder likely lost its place when the error occurred, so we'll reset and use the printer's
9898
//idea of where it the axis is to re-initialize
@@ -106,7 +106,7 @@ void I2CPositionEncoder::update() {
106106
SERIAL_ECHOLNPGM("Current position is ", pos);
107107
SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks);
108108
SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset);
109-
SERIAL_ECHOLN(F("New position reads as "), get_position(), AS_CHAR('('), mm_from_count(get_position()), AS_CHAR(')'));
109+
SERIAL_ECHOLN(F("New position reads as "), get_position(), C('('), mm_from_count(get_position()), C(')'));
110110
#endif
111111
}
112112
#endif

β€ŽMarlin/src/feature/encoder_i2c.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -261,32 +261,32 @@ class I2CPositionEncodersMgr {
261261

262262
static void report_error_count(const int8_t idx, const AxisEnum axis) {
263263
CHECK_IDX();
264-
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(AXIS_CHAR(axis)), " axis is ", encoders[idx].get_error_count());
264+
SERIAL_ECHOLNPGM("Error count on ", C(AXIS_CHAR(axis)), " axis is ", encoders[idx].get_error_count());
265265
}
266266

267267
static void reset_error_count(const int8_t idx, const AxisEnum axis) {
268268
CHECK_IDX();
269269
encoders[idx].set_error_count(0);
270-
SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(AXIS_CHAR(axis)), " axis has been reset.");
270+
SERIAL_ECHOLNPGM("Error count on ", C(AXIS_CHAR(axis)), " axis has been reset.");
271271
}
272272

273273
static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
274274
CHECK_IDX();
275275
encoders[idx].set_ec_enabled(enabled);
276-
SERIAL_ECHOPGM("Error correction on ", AS_CHAR(AXIS_CHAR(axis)));
276+
SERIAL_ECHOPGM("Error correction on ", C(AXIS_CHAR(axis)));
277277
SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
278278
}
279279

280280
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
281281
CHECK_IDX();
282282
encoders[idx].set_ec_threshold(newThreshold);
283-
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(AXIS_CHAR(axis)), " axis set to ", newThreshold, "mm.");
283+
SERIAL_ECHOLNPGM("Error correct threshold for ", C(AXIS_CHAR(axis)), " axis set to ", newThreshold, "mm.");
284284
}
285285

286286
static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
287287
CHECK_IDX();
288288
const float threshold = encoders[idx].get_ec_threshold();
289-
SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(AXIS_CHAR(axis)), " axis is ", threshold, "mm.");
289+
SERIAL_ECHOLNPGM("Error correct threshold for ", C(AXIS_CHAR(axis)), " axis is ", threshold, "mm.");
290290
}
291291

292292
static int8_t idx_from_axis(const AxisEnum axis) {

β€ŽMarlin/src/feature/max7219.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ uint8_t Max7219::suspended; // = 0;
136136

137137
void Max7219::error(FSTR_P const func, const int32_t v1, const int32_t v2/*=-1*/) {
138138
#if ENABLED(MAX7219_ERRORS)
139-
SERIAL_ECHO(F("??? Max7219::"), func, AS_CHAR('('), v1);
139+
SERIAL_ECHO(F("??? Max7219::"), func, C('('), v1);
140140
if (v2 > 0) SERIAL_ECHOPGM(", ", v2);
141141
SERIAL_CHAR(')');
142142
SERIAL_EOL();

β€ŽMarlin/src/feature/meatpack.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) {
140140
#if ENABLED(MP_DEBUG)
141141
if (chars_decoded < 1024) {
142142
++chars_decoded;
143-
DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c));
143+
DEBUG_ECHOLNPGM("RB: ", C(c));
144144
}
145145
#endif
146146
}

β€ŽMarlin/src/feature/mixing.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void Mixer::normalize(const uint8_t tool_index) {
6060
}
6161
#ifdef MIXER_NORMALIZER_DEBUG
6262
SERIAL_ECHOPGM("Mixer: Old relation : [ ");
63-
MIXER_STEPPER_LOOP(i) SERIAL_ECHO(collector[i] / csum, AS_CHAR(' '));
63+
MIXER_STEPPER_LOOP(i) SERIAL_ECHO(collector[i] / csum, C(' '));
6464
SERIAL_ECHOLNPGM("]");
6565
#endif
6666

@@ -72,12 +72,12 @@ void Mixer::normalize(const uint8_t tool_index) {
7272
csum = 0;
7373
SERIAL_ECHOPGM("Mixer: Normalize to : [ ");
7474
MIXER_STEPPER_LOOP(i) {
75-
SERIAL_ECHO(uint16_t(color[tool_index][i]), AS_CHAR(' '));
75+
SERIAL_ECHO(uint16_t(color[tool_index][i]), C(' '));
7676
csum += color[tool_index][i];
7777
}
7878
SERIAL_ECHOLNPGM("]");
7979
SERIAL_ECHOPGM("Mixer: New relation : [ ");
80-
MIXER_STEPPER_LOOP(i) SERIAL_ECHO(p_float_t(uint16_t(color[tool_index][i]) / csum, 3), AS_CHAR(' '));
80+
MIXER_STEPPER_LOOP(i) SERIAL_ECHO(p_float_t(uint16_t(color[tool_index][i]) / csum, 3), C(' '));
8181
SERIAL_ECHOLNPGM("]");
8282
#endif
8383

β€ŽMarlin/src/feature/runout.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void event_filament_runout(const uint8_t extruder) {
135135
if (run_runout_script) {
136136
#if MULTI_FILAMENT_SENSOR
137137
MString<strlen(FILAMENT_RUNOUT_SCRIPT)> script;
138-
script.setf(F(FILAMENT_RUNOUT_SCRIPT), AS_CHAR(tool));
138+
script.setf(F(FILAMENT_RUNOUT_SCRIPT), C(tool));
139139
#if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG)
140140
SERIAL_ECHOLNPGM("Runout Command: ", &script);
141141
#endif

β€ŽMarlin/src/gcode/bedlevel/G35.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void GcodeSuite::G35() {
100100
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE);
101101
if (isnan(z_probed_height)) {
102102
SERIAL_ECHO(
103-
F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), AS_CHAR(')'),
103+
F("G35 failed at point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'),
104104
FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y
105105
);
106106
err_break = true;
@@ -109,7 +109,7 @@ void GcodeSuite::G35() {
109109

110110
if (DEBUGGING(LEVELING)) {
111111
DEBUG_ECHOLN(
112-
F("Probing point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), AS_CHAR(')'),
112+
F("Probing point "), i + 1, F(" ("), FPSTR(pgm_read_ptr(&tramming_point_name[i])), C(')'),
113113
FPSTR(SP_X_STR), tramming_points[i].x, FPSTR(SP_Y_STR), tramming_points[i].y,
114114
FPSTR(SP_Z_STR), z_probed_height
115115
);

β€ŽMarlin/src/gcode/calibrate/G33.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void ac_cleanup() {
9292
}
9393

9494
void print_signed_float(FSTR_P const prefix, const_float_t f) {
95-
SERIAL_ECHO(F(" "), prefix, AS_CHAR(':'));
95+
SERIAL_ECHO(F(" "), prefix, C(':'));
9696
serial_offset(f);
9797
}
9898

β€ŽMarlin/src/gcode/calibrate/M48.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void GcodeSuite::M48() {
245245
sigma = SQRT(dev_sum / (n + 1));
246246

247247
if (verbose_level > 1) {
248-
SERIAL_ECHO(n + 1, F(" of "), n_samples, F(": z: "), p_float_t(pz, 3), AS_CHAR(' '));
248+
SERIAL_ECHO(n + 1, F(" of "), n_samples, F(": z: "), p_float_t(pz, 3), C(' '));
249249
dev_report(verbose_level > 2, mean, sigma, min, max);
250250
SERIAL_EOL();
251251
}

β€ŽMarlin/src/gcode/calibrate/M666.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
is_err = true;
5353
else {
5454
delta_endstop_adj[i] = v;
55-
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v);
55+
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", C(AXIS_CHAR(i)), "] = ", v);
5656
}
5757
}
5858
}

β€ŽMarlin/src/gcode/config/M92.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void GcodeSuite::M92() {
8282
if (wanted) {
8383
const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm;
8484
SERIAL_ECHOPGM(", best:[", best);
85-
if (best != wanted) { SERIAL_ECHO(AS_CHAR(','), best + z_full_step_mm); }
85+
if (best != wanted) { SERIAL_ECHO(C(','), best + z_full_step_mm); }
8686
SERIAL_CHAR(']');
8787
}
8888
SERIAL_ECHOLNPGM(" }");

β€ŽMarlin/src/gcode/control/M605.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
HOTEND_LOOP() {
146146
DEBUG_ECHOPGM_P(SP_T_STR, e);
147-
LOOP_NUM_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
147+
LOOP_NUM_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", C(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]);
148148
DEBUG_EOL();
149149
}
150150
DEBUG_EOL();

β€ŽMarlin/src/gcode/feature/advance/M900.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void GcodeSuite::M900() {
131131
SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]);
132132
#else
133133
SERIAL_ECHOPGM("Advance K");
134-
EXTRUDER_LOOP() SERIAL_ECHO(AS_CHAR(' '), AS_CHAR('0' + e), AS_CHAR(':'), planner.extruder_advance_K[e]);
134+
EXTRUDER_LOOP() SERIAL_ECHO(C(' '), C('0' + e), C(':'), planner.extruder_advance_K[e]);
135135
SERIAL_EOL();
136136
#endif
137137

0 commit comments

Comments
Β (0)