| 3115 | } |
| 3116 | |
| 3117 | void Platform::MessageV(const GCodeBuffer *_ecv_null gb, MessageType type, const char *_ecv_array fmt, va_list vargs) noexcept |
| 3118 | { |
| 3119 | String<FormatStringLength> formatString; |
| 3120 | #if HAS_SBC_INTERFACE |
| 3121 | if (reprap.UsingSbcInterface() && ((type & GenericMessage) == GenericMessage || (type & BinaryCodeReplyFlag) != 0)) |
| 3122 | { |
| 3123 | formatString.vprintf(fmt, vargs); |
| 3124 | reprap.GetSbcInterface().HandleGCodeReply(type, formatString.c_str()); |
| 3125 | if ((type & BinaryCodeReplyFlag) != 0) |
| 3126 | { |
| 3127 | return; |
| 3128 | } |
| 3129 | } |
| 3130 | #endif |
| 3131 | |
| 3132 | if ((type & ErrorMessageFlag) != 0) |
| 3133 | { |
| 3134 | formatString.copy("Error: "); |
| 3135 | formatString.vcatf(fmt, vargs); |
| 3136 | } |
| 3137 | else if ((type & WarningMessageFlag) != 0) |
| 3138 | { |
| 3139 | formatString.copy("Warning: "); |
| 3140 | formatString.vcatf(fmt, vargs); |
| 3141 | } |
| 3142 | else |
| 3143 | { |
| 3144 | formatString.vprintf(fmt, vargs); |
| 3145 | } |
| 3146 | |
| 3147 | RawMessage(gb, (MessageType)(type & ~(ErrorMessageFlag | WarningMessageFlag)), formatString.c_str()); |
| 3148 | } |
| 3149 | |
| 3150 | void Platform::MessageF(MessageType type, const char *_ecv_array fmt, ...) noexcept |
| 3151 | { |
no test coverage detected