🎨 Apply F() to serial macros
This commit is contained in:
		@@ -47,10 +47,10 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
 | 
			
		||||
    }
 | 
			
		||||
  #endif
 | 
			
		||||
  SERIAL_ECHOPGM("\n...OUTPUT: ");
 | 
			
		||||
  SERIAL_ECHOPGM_P(sh.STATUS_AXIS & STATUS_HIZ ? PSTR("OFF") : PSTR("ON "));
 | 
			
		||||
  SERIAL_ECHOF(sh.STATUS_AXIS & STATUS_HIZ ? F("OFF") : F("ON "));
 | 
			
		||||
  SERIAL_ECHOPGM("   BUSY: "); echo_yes_no((sh.STATUS_AXIS & STATUS_BUSY) == 0);
 | 
			
		||||
  SERIAL_ECHOPGM("   DIR: ");
 | 
			
		||||
  SERIAL_ECHOPGM_P((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? PSTR("FORWARD") : PSTR("REVERSE"));
 | 
			
		||||
  SERIAL_ECHOF((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? F("FORWARD") : F("REVERSE"));
 | 
			
		||||
  if (sh.STATUS_AXIS_LAYOUT == L6480_STATUS_LAYOUT) {
 | 
			
		||||
    SERIAL_ECHOPGM("   Last Command: ");
 | 
			
		||||
    if (sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD) SERIAL_ECHOPGM("VALID");
 | 
			
		||||
@@ -67,7 +67,7 @@ inline void L6470_say_status(const L64XX_axis_t axis) {
 | 
			
		||||
    SERIAL_ECHOPGM("   Last Command: ");
 | 
			
		||||
    if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
 | 
			
		||||
    SERIAL_ECHOPGM("VALID    ");
 | 
			
		||||
    SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ?  PSTR("COMPLETED    ") : PSTR("Not PERFORMED"));
 | 
			
		||||
    SERIAL_ECHOF(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ?  F("COMPLETED    ") : F("Not PERFORMED"));
 | 
			
		||||
    SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN       " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING        " : "OK             ");
 | 
			
		||||
  }
 | 
			
		||||
  SERIAL_ECHOPGM("   OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);
 | 
			
		||||
 
 | 
			
		||||
@@ -107,7 +107,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
 | 
			
		||||
      SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
 | 
			
		||||
                      "   ADC_OUT: ", L6470_ADC_out);
 | 
			
		||||
      SERIAL_ECHOPGM("   Vs_compensation: ");
 | 
			
		||||
      SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED"));
 | 
			
		||||
      SERIAL_ECHOF((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? F("ENABLED ") : F("DISABLED"));
 | 
			
		||||
      SERIAL_ECHOLNPGM("   Compensation coefficient: ~", comp_coef * 0.01f);
 | 
			
		||||
 | 
			
		||||
      SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
 | 
			
		||||
 
 | 
			
		||||
@@ -51,8 +51,8 @@ void GcodeSuite::M413() {
 | 
			
		||||
    #if PIN_EXISTS(POWER_LOSS)
 | 
			
		||||
      if (parser.seen_test('O')) recovery._outage();
 | 
			
		||||
    #endif
 | 
			
		||||
    if (parser.seen_test('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n"));
 | 
			
		||||
    if (parser.seen_test('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n"));
 | 
			
		||||
    if (parser.seen_test('E')) SERIAL_ECHOF(recovery.exists() ? F("PLR Exists\n") : F("No PLR\n"));
 | 
			
		||||
    if (parser.seen_test('V')) SERIAL_ECHOF(recovery.valid() ? F("Valid\n") : F("Invalid\n"));
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ template<typename TMC>
 | 
			
		||||
void tmc_say_stealth_status(TMC &st) {
 | 
			
		||||
  st.printLabel();
 | 
			
		||||
  SERIAL_ECHOPGM(" driver mode:\t");
 | 
			
		||||
  SERIAL_ECHOLNPGM_P(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle"));
 | 
			
		||||
  SERIAL_ECHOLNF(st.get_stealthChop() ? F("stealthChop") : F("spreadCycle"));
 | 
			
		||||
}
 | 
			
		||||
template<typename TMC>
 | 
			
		||||
void tmc_set_stealthChop(TMC &st, const bool enable) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user