finish it off: remove scheduleMsg (#2575)
* finish it off * one more logger ptr * fwd decl * Revert "one more logger ptr" This reverts commit a21fb0087ddc748978d716db2710800cf26e437b. * unused Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
c26987b96b
commit
a70f113b77
|
@ -74,7 +74,6 @@ class Engine;
|
|||
class TriggerState;
|
||||
class TriggerFormDetails;
|
||||
class TriggerConfiguration;
|
||||
class Logging;
|
||||
|
||||
// https://github.com/rusefi/rusefi/issues/2010 shows the corner case wheel with huge depth requirement
|
||||
#define GAP_TRACKING_LENGTH 18
|
||||
|
|
|
@ -148,9 +148,9 @@ static void reportPins(void) {
|
|||
|
||||
void printSpiConfig(const char *msg, spi_device_e device) {
|
||||
#if HAL_USE_SPI
|
||||
scheduleMsg(logging, "%s %s mosi=%s", msg, getSpi_device_e(device), hwPortname(getMosiPin(device)));
|
||||
scheduleMsg(logging, "%s %s miso=%s", msg, getSpi_device_e(device), hwPortname(getMisoPin(device)));
|
||||
scheduleMsg(logging, "%s %s sck=%s", msg, getSpi_device_e(device), hwPortname(getSckPin(device)));
|
||||
efiPrintf("%s %s mosi=%s", msg, getSpi_device_e(device), hwPortname(getMosiPin(device)));
|
||||
efiPrintf("%s %s miso=%s", msg, getSpi_device_e(device), hwPortname(getMisoPin(device)));
|
||||
efiPrintf("%s %s sck=%s", msg, getSpi_device_e(device), hwPortname(getSckPin(device)));
|
||||
#endif // HAL_USE_SPI
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ void printDateTime(void) {
|
|||
efiPrintf("%D - unix time", unix_time);
|
||||
date_get_tm(&timp);
|
||||
|
||||
scheduleMsg(nullptr, "Current RTC localtime is: %04u-%02u-%02u %02u:%02u:%02u w=%d", timp.tm_year + 1900, timp.tm_mon + 1, timp.tm_mday, timp.tm_hour,
|
||||
efiPrintf("Current RTC localtime is: %04u-%02u-%02u %02u:%02u:%02u w=%d", timp.tm_year + 1900, timp.tm_mon + 1, timp.tm_mday, timp.tm_hour,
|
||||
timp.tm_min, timp.tm_sec, rtcWorks);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,12 +77,12 @@ static void extCallback(ioportmask_t channel) {
|
|||
}
|
||||
|
||||
static void joystickInfo(void) {
|
||||
scheduleMsg(sharedLogger, "total %d center=%d@%s", joyTotal, joyCenter,
|
||||
efiPrintf("total %d center=%d@%s", joyTotal, joyCenter,
|
||||
hwPortname(CONFIG(joystickCenterPin)));
|
||||
scheduleMsg(sharedLogger, "a=%d@%s", joyA, hwPortname(CONFIG(joystickAPin)));
|
||||
scheduleMsg(sharedLogger, "b=%d@%s", joyB, hwPortname(CONFIG(joystickBPin)));
|
||||
scheduleMsg(sharedLogger, "c=%d@%s", joyC, hwPortname(CONFIG(joystickCPin)));
|
||||
scheduleMsg(sharedLogger, "d=%d@%s", joyD, hwPortname(CONFIG(joystickDPin)));
|
||||
efiPrintf("a=%d@%s", joyA, hwPortname(CONFIG(joystickAPin)));
|
||||
efiPrintf("b=%d@%s", joyB, hwPortname(CONFIG(joystickBPin)));
|
||||
efiPrintf("c=%d@%s", joyC, hwPortname(CONFIG(joystickCPin)));
|
||||
efiPrintf("d=%d@%s", joyD, hwPortname(CONFIG(joystickDPin)));
|
||||
}
|
||||
|
||||
static bool isJoystickEnabled() {
|
||||
|
|
|
@ -171,8 +171,6 @@ void Logging::appendFloat(float value, int precision) {
|
|||
}
|
||||
}
|
||||
|
||||
static char header[16];
|
||||
|
||||
void appendMsgPrefix(Logging *logging) {
|
||||
logging->append(PROTOCOL_MSG DELIMETER);
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ void efiPrintfInternal(const char *format, ...) {
|
|||
* This method appends the content of specified thread-local logger into the global buffer
|
||||
* of logging content.
|
||||
*
|
||||
* This is a legacy function, most normal logging should use scheduleMsg
|
||||
* This is a legacy function, most normal logging should use efiPrintf
|
||||
*/
|
||||
void scheduleLogging(Logging *logging) {
|
||||
#if EFI_PROD_CODE && EFI_TEXT_LOGGING
|
||||
|
|
|
@ -16,14 +16,13 @@ const char* swapOutputBuffers(size_t *actualOutputBufferSize);
|
|||
|
||||
namespace priv
|
||||
{
|
||||
// internal implementation, use scheduleMsg below
|
||||
// internal implementation, use efiPrintf below
|
||||
void efiPrintfInternal(const char *fmt, ...);
|
||||
}
|
||||
|
||||
// "normal" logging messages need a header and footer, so put them in
|
||||
// the format string at compile time
|
||||
#define efiPrintf(fmt, ...) priv::efiPrintfInternal(PROTOCOL_MSG DELIMETER fmt DELIMETER, ##__VA_ARGS__)
|
||||
#define scheduleMsg(logging, fmt, ...) efiPrintf(fmt, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* This is the legacy function to copy the contents of a local Logging object in to the output buffer
|
||||
|
|
Loading…
Reference in New Issue