Sync MK3<->MK4 MMU2 log
This commit is contained in:
parent
fd9f4ffb9e
commit
eb7a73e748
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#ifdef __AVR__
|
||||||
#ifndef UNITTEST
|
#include <avr/pgmspace.h>
|
||||||
#include "Marlin.h"
|
#endif
|
||||||
|
|
||||||
// Beware - before changing this prefix, think twice
|
// Beware - before changing this prefix, think twice
|
||||||
// you'd need to change appmain.cpp app_marlin_serial_output_write_hook
|
// you'd need to change appmain.cpp app_marlin_serial_output_write_hook
|
||||||
|
|
@ -14,16 +14,22 @@ namespace MMU2 {
|
||||||
/// @param msg pointer to a string in PROGMEM
|
/// @param msg pointer to a string in PROGMEM
|
||||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||||
void LogErrorEvent_P(const char *msg);
|
void LogErrorEvent_P(const char *msg_P);
|
||||||
|
|
||||||
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
/// Report the msg into the general logging subsystem (through Marlin's SERIAL_ECHO stuff)
|
||||||
/// @param msg pointer to a string in PROGMEM
|
/// @param msg pointer to a string in PROGMEM
|
||||||
/// On the AVR platform this variant reads the input string from PROGMEM.
|
/// On the AVR platform this variant reads the input string from PROGMEM.
|
||||||
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
/// On the ARM platform it calls LogErrorEvent directly (silently expecting the compiler to optimize it away)
|
||||||
void LogEchoEvent_P(const char *msg);
|
void LogEchoEvent_P(const char *msg_P);
|
||||||
|
|
||||||
} // namespace
|
} // namespace MMU2
|
||||||
|
|
||||||
|
#ifndef UNITTEST
|
||||||
|
#ifdef __AVR__
|
||||||
|
#include "Marlin.h"
|
||||||
|
#else
|
||||||
|
#include "../../core/serial.h"
|
||||||
|
#endif
|
||||||
#define SERIAL_MMU2() \
|
#define SERIAL_MMU2() \
|
||||||
{ serialprintPGM(mmu2Magic); }
|
{ serialprintPGM(mmu2Magic); }
|
||||||
|
|
||||||
|
|
@ -49,11 +55,14 @@ void LogEchoEvent_P(const char *msg);
|
||||||
} while (0)
|
} while (0)
|
||||||
#define MMU2_ERROR_MSG(S) MMU2_ECHO_MSG(S) //!@todo Decide MMU errors on serial line
|
#define MMU2_ERROR_MSG(S) MMU2_ECHO_MSG(S) //!@todo Decide MMU errors on serial line
|
||||||
|
|
||||||
#else // #ifndef UNITTEST
|
#else // #ifndef UNITTEST
|
||||||
|
#include "stubs/stub_interfaces.h"
|
||||||
|
#define MMU2_ECHO_MSGLN(S) marlinLogSim.AppendLine(S)
|
||||||
|
#define MMU2_ERROR_MSGLN(S) marlinLogSim.AppendLine(S)
|
||||||
|
#define MMU2_ECHO_MSGRPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||||
|
#define MMU2_ERROR_MSGRPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||||
|
#define SERIAL_ECHOLNPGM(S) /*marlinLogSim.AppendLine(S)*/
|
||||||
|
#define SERIAL_ECHOPGM(S) /* */
|
||||||
|
#define SERIAL_ECHOLN(S) /*marlinLogSim.AppendLine(S)*/
|
||||||
|
|
||||||
#define MMU2_ECHO_MSGLN(S) /* */
|
#endif // #ifndef UNITTEST
|
||||||
#define MMU2_ERROR_MSGLN(S) /* */
|
|
||||||
#define MMU2_ECHO_MSGRPGM(S) /* */
|
|
||||||
#define MMU2_ERROR_MSGRPGM(S) /* */
|
|
||||||
|
|
||||||
#endif // #ifndef UNITTEST
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue