defined(__DOXYGEN__) ? fix #748

This commit is contained in:
rusefi 2019-04-12 22:10:57 -04:00
parent 541c445a2d
commit d8281626df
45 changed files with 200 additions and 200 deletions

View File

@ -2,7 +2,7 @@
#include "global.h"
#include "bootloader/bootloader.h"
#if defined(EFI_BOOTLOADER_INCLUDE_CODE) || defined(__DOXYGEN__)
#if defined(EFI_BOOTLOADER_INCLUDE_CODE)
#if defined __GNUC__
#define BOOTLOADER_SECTION __attribute__((section(".bl"))) /* todo: add 'used'? */

View File

@ -22,7 +22,7 @@
#include "global.h"
#if EFI_ENGINE_AUDI_AAN || defined(__DOXYGEN__)
#if EFI_ENGINE_AUDI_AAN
#include "engine_controller.h"

View File

@ -18,7 +18,7 @@
#include "engine_math.h"
#include "fsio_impl.h"
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
#include "can_hw.h"
#include "scheduler.h"
#include "electronic_throttle.h"
@ -27,7 +27,7 @@
EXTERN_ENGINE;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
static int periodIndex = 0;
static OutputPin testPin;
@ -206,7 +206,7 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// todo: 8.2 or 10k?
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__)
#if EFI_CAN_SUPPORT
enableFrankensoCan();
#endif /* EFI_CAN_SUPPORT */
}
@ -284,7 +284,7 @@ void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
CONFIGB(etb1.directionPin2) = GPIOC_9;
CONFIGB(etb1.controlPin1) = GPIOE_14;
#if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__)
#if EFI_ELECTRONIC_THROTTLE_BODY
setDefaultEtbParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
// values are above 100% since we have feedforward part of the total summation
engineConfiguration->etb.minValue = -200;

View File

@ -16,7 +16,7 @@
#include "global.h"
#if EFI_SUPPORT_DODGE_NEON || defined(__DOXYGEN__)
#if EFI_SUPPORT_DODGE_NEON
#include "dodge_neon.h"
#include "engine_configuration.h"
@ -454,7 +454,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->auxPid[0].dFactor = 0.1;
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
// /**
// * set_fsio_setting 1 0.55
// */

View File

@ -18,7 +18,7 @@
#include "engine_math.h"
#include "allsensors.h"
#if EFI_SUPPORT_1995_FORD_INLINE_6 || defined(__DOXYGEN__)
#if EFI_SUPPORT_1995_FORD_INLINE_6
EXTERN_ENGINE;

View File

@ -18,7 +18,7 @@
#include "advance_map.h"
#include "engine_configuration.h"
#if EFI_SUPPORT_FORD_ASPIRE || defined(__DOXYGEN__)
#if EFI_SUPPORT_FORD_ASPIRE
/**
* This is just the default map which is stored into flash memory in case flash is empty

View File

@ -224,7 +224,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
// VICS solenoid
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
/**
* to test
* set_fsio_setting 1 5000

View File

@ -11,7 +11,7 @@
#include "global.h"
#if EFI_SUPPORT_FORD_FIESTA || defined(__DOXYGEN__)
#if EFI_SUPPORT_FORD_FIESTA
#include "ford_fiesta.h"
#include "engine_math.h"

View File

@ -7,7 +7,7 @@
#ifndef FORD_FIESTA_H_
#define FORD_FIESTA_H_
#if EFI_SUPPORT_FORD_FIESTA || defined(__DOXYGEN__)
#if EFI_SUPPORT_FORD_FIESTA
#include "engine.h"

View File

@ -164,7 +164,7 @@ void setHonda600(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// todo: 8.2 or 10k?
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__)
#if EFI_CAN_SUPPORT
enableFrankensoCan();
#endif /* EFI_CAN_SUPPORT */
}

View File

@ -50,7 +50,7 @@ void setLadaKalina(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// starter relay solenoid
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
/**
* to test
* set_fsio_setting 1 5000

View File

@ -97,7 +97,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX);
//#if EFI_FSIO || defined(__DOXYGEN__)
//#if EFI_FSIO
// // backup main relay pin
// setFsio(0, GPIOE_6, "1" PASS_ENGINE_PARAMETER_SUFFIX);
//#endif

View File

@ -230,7 +230,7 @@ void setMiataNA6_MAP_Configuration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
// set_fsio_expression 0 "((rpm > fsio_setting(4) & (fsio_analog_input < fsio_setting(5)) | rpm > fsio_setting(1) | (coolant > fsio_setting(2) > | (vbatt < fsio_setting(3)"
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
// todo: convert
setFsio(0, GPIOC_13, COMBINED_WARNING_LIGHT PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */

View File

@ -84,7 +84,7 @@ void setMitsubishiConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->HD44780height = 4;
setEgoSensor(ES_Innovate_MTX_L PASS_ENGINE_PARAMETER_SUFFIX);
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
setFsioExt(0, GPIOC_9, RPM_ABOVE_6000_SOLENOID_80_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
setFsioExt(1, GPIOC_7, RPM_ABOVE_2000_SOLENOID_50_DUTY, 200 PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* EFI_FSIO */

View File

@ -9,7 +9,7 @@
#include "global.h"
#if EFI_SUPPORT_NISSAN_PRIMERA || defined(__DOXYGEN__)
#if EFI_SUPPORT_NISSAN_PRIMERA
#include "nissan_primera.h"
void setNissanPrimeraEngineConfiguration(engine_configuration_s *engineConfiguration) {

View File

@ -73,7 +73,7 @@ void setTestVVTEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engineConfiguration->debugMode = DBG_VVT;
}
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
#if EFI_UNIT_TEST
void setTestEngineIssue366both(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
setTestEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);

View File

@ -38,11 +38,11 @@
* in chconf.h
*
*/
#if !defined(EFI_ENABLE_ASSERTS) || defined(__DOXYGEN__)
#if !defined(EFI_ENABLE_ASSERTS)
#define EFI_ENABLE_ASSERTS TRUE
#endif /* EFI_ENABLE_ASSERTS */
#if !defined(EFI_ENABLE_MOCK_ADC) || defined(__DOXYGEN__)
#if !defined(EFI_ENABLE_MOCK_ADC)
#define EFI_ENABLE_MOCK_ADC TRUE
#endif /* EFI_ENABLE_MOCK_ADC */
@ -141,7 +141,7 @@
#define EFI_CJ125 TRUE
#endif
#if !defined(EFI_MEMS) || defined(__DOXYGEN__)
#if !defined(EFI_MEMS)
#define EFI_MEMS FALSE
#endif

View File

@ -7,7 +7,7 @@
#include "bluetooth.h"
#include "engine_configuration.h"
#if EFI_BLUETOOTH_SETUP || defined(__DOXYGEN__)
#if EFI_BLUETOOTH_SETUP
static bool btProcessIsStarted = false;
static bool btProcessIsRunning = false;

View File

@ -82,11 +82,11 @@
#include "loggingcentral.h"
#include "status_loop.h"
#include "mmc_card.h"
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
#include "rusEfiFunctionalTest.h"
#endif
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
EXTERN_ENGINE
;
@ -101,7 +101,7 @@ extern short currentPageId;
*/
LoggingWithStorage tsLogger("binary");
#if !defined(EFI_NO_CONFIG_WORKING_COPY) || defined(__DOXYGEN__)
#if !defined(EFI_NO_CONFIG_WORKING_COPY)
/**
* this is a local copy of the configuration. Any changes to this copy
* have no effect until this copy is explicitly propagated to the main working copy
@ -139,7 +139,7 @@ static void printErrorCounters(void) {
}
void printTsStats(void) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
if (false) {
// todo: is this code needed somewhere else?
scheduleMsg(&tsLogger, "TS RX on %s", hwPortname(engineConfiguration->binarySerialRxPin));
@ -172,7 +172,7 @@ static void setTsSpeed(int value) {
printTsStats();
}
#if EFI_BLUETOOTH_SETUP || defined(__DOXYGEN__)
#if EFI_BLUETOOTH_SETUP
// Bluetooth HC-05 module initialization start (it waits for disconnect and then communicates to the module)
static void bluetoothHC05(const char *baudRate, const char *name, const char *pinCode) {
bluetoothStart(&tsChannel, BLUETOOTH_HC_05, baudRate, name, pinCode);
@ -188,7 +188,7 @@ static void bluetoothSPP(const char *baudRate, const char *name, const char *pin
#endif /* EFI_BLUETOOTH_SETUP */
void tunerStudioDebug(const char *msg) {
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "%s", msg);
#endif
}
@ -196,7 +196,7 @@ void tunerStudioDebug(const char *msg) {
char *getWorkingPageAddr(int pageIndex) {
switch (pageIndex) {
case 0:
#if !defined(EFI_NO_CONFIG_WORKING_COPY) || defined(__DOXYGEN__)
#if !defined(EFI_NO_CONFIG_WORKING_COPY)
return (char*) &configWorkingCopy.engineConfiguration;
#else
return (char*) &engineConfiguration;
@ -274,7 +274,7 @@ static void onlineApplyWorkingCopyBytes(int currentPageId, uint32_t offset, int
return;
}
scheduleMsg(&tsLogger, "applying soft change from %d length %d", offset, count);
#if !defined(EFI_NO_CONFIG_WORKING_COPY) || defined(__DOXYGEN__)
#if !defined(EFI_NO_CONFIG_WORKING_COPY)
memcpy(((char*) &persistentState.persistentConfiguration) + offset, ((char*) &configWorkingCopy) + offset,
count);
#endif /* EFI_NO_CONFIG_WORKING_COPY */
@ -285,7 +285,7 @@ static void onlineApplyWorkingCopyBytes(int currentPageId, uint32_t offset, int
* read log file content for rusEfi console
*/
static void handleReadFileContent(ts_channel_s *tsChannel, short fileId, short offset, short length) {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
readLogFileContent(tsChannel->crcReadBuffer, fileId, offset, length);
#endif /* EFI_FILE_LOGGING */
}
@ -350,7 +350,7 @@ void handleWriteValueCommand(ts_channel_s *tsChannel, ts_response_format_e mode,
tunerStudioDebug("got W (Write)"); // we can get a lot of these
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
// scheduleMsg(logger, "Page number %d\r\n", pageId); // we can get a lot of these
#endif
@ -386,7 +386,7 @@ void handlePageReadCommand(ts_channel_s *tsChannel, ts_response_format_e mode, u
tsState.readPageCommandsCounter++;
currentPageId = pageId;
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "READ mode=%d page=%d offset=%d size=%d", mode, (int) currentPageId, offset, count);
#endif
@ -407,13 +407,13 @@ void handlePageReadCommand(ts_channel_s *tsChannel, ts_response_format_e mode, u
const uint8_t *addr = (const uint8_t *) (getWorkingPageAddr(currentPageId) + offset);
sr5SendResponse(tsChannel, mode, addr, count);
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
// scheduleMsg(&tsLogger, "Sending %d done", count);
#endif
}
void requestBurn(void) {
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
#if EFI_INTERNAL_FLASH
setNeedToWriteConfiguration();
#endif
incrementGlobalConfigurationVersion(PASS_ENGINE_PARAMETER_SIGNATURE);
@ -436,13 +436,13 @@ void handleBurnCommand(ts_channel_s *tsChannel, ts_response_format_e mode, uint1
currentPageId = page;
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
// pointless since we only have one page now
// scheduleMsg(logger, "Page number %d", currentPageId);
#endif
// todo: how about some multi-threading?
#if !defined(EFI_NO_CONFIG_WORKING_COPY) || defined(__DOXYGEN__)
#if !defined(EFI_NO_CONFIG_WORKING_COPY)
memcpy(&persistentState.persistentConfiguration, &configWorkingCopy, sizeof(persistent_config_s));
#endif /* EFI_NO_CONFIG_WORKING_COPY */
@ -483,14 +483,14 @@ void runBinaryProtocolLoop(ts_channel_s *tsChannel) {
uint8_t firstByte;
int received = sr5ReadData(tsChannel, &firstByte, 1);
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("received %d\r\n", received);
#endif
if (received != 1) {
// tunerStudioError("ERROR: no command");
#if EFI_BLUETOOTH_SETUP || defined(__DOXYGEN__)
#if EFI_BLUETOOTH_SETUP
// assume there's connection loss and notify the bluetooth init code
bluetoothSoftwareDisconnectNotify();
#endif /* EFI_BLUETOOTH_SETUP */
@ -538,7 +538,7 @@ void runBinaryProtocolLoop(ts_channel_s *tsChannel) {
continue;
}
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("command %c\r\n", command);
#endif
@ -595,7 +595,7 @@ static THD_FUNCTION(tsThreadEntryPoint, arg) {
* Copy real configuration into the communications layer working copy
*/
void syncTunerStudioCopy(void) {
#if !defined(EFI_NO_CONFIG_WORKING_COPY) || defined(__DOXYGEN__)
#if !defined(EFI_NO_CONFIG_WORKING_COPY)
memcpy(&configWorkingCopy, &persistentState.persistentConfiguration, sizeof(persistent_config_s));
#endif /* EFI_NO_CONFIG_WORKING_COPY */
}
@ -617,7 +617,7 @@ void tunerStudioError(const char *msg) {
*/
void handleQueryCommand(ts_channel_s *tsChannel, ts_response_format_e mode) {
tsState.queryCommandCounter++;
#if EFI_TUNER_STUDIO_VERBOSE || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO_VERBOSE
scheduleMsg(&tsLogger, "got S/H (queryCommand) mode=%d", mode);
printTsStats();
#endif
@ -675,12 +675,12 @@ static void handleGetText(ts_channel_s *tsChannel) {
int outputSize;
char *output = swapOutputBuffers(&outputSize);
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("get test sending [%d]\r\n", outputSize);
#endif
sr5WriteCrcPacket(tsChannel, TS_RESPONSE_COMMAND_OK, output, outputSize);
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("sent [%d]\r\n", outputSize);
#endif
}
@ -689,7 +689,7 @@ static void handleExecuteCommand(ts_channel_s *tsChannel, char *data, int incomi
sr5WriteCrcPacket(tsChannel, TS_RESPONSE_COMMAND_OK, NULL, 0);
data[incomingPacketSize] = 0;
char *trimmed = efiTrim(data);
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("execute [%s]\r\n", trimmed);
#endif
(console_line_callback)(trimmed);
@ -792,7 +792,7 @@ int tunerStudioHandleCrcCommand(ts_channel_s *tsChannel, char *data, int incomin
}
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
executeTSCommand(subsystem, index);
#endif /* EFI_PROD_CODE */
sendOkResponse(tsChannel, TS_CRC);
@ -817,7 +817,7 @@ void startTunerStudioConnectivity(void) {
addConsoleAction("reset_ts", resetTs);
addConsoleActionI("set_ts_speed", setTsSpeed);
#if EFI_BLUETOOTH_SETUP || defined(__DOXYGEN__)
#if EFI_BLUETOOTH_SETUP
// Usage: "bluetooth_hc06 <baud> <name> <pincode>"
// Example: "bluetooth_hc06 38400 rusefi 1234"
addConsoleActionSSS("bluetooth_hc05", bluetoothHC05);

View File

@ -9,7 +9,7 @@
#include "tunerstudio_io.h"
#include "console_io.h"
#include "engine.h"
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
#include "rusEfiFunctionalTest.h"
#endif
@ -17,11 +17,11 @@ EXTERN_ENGINE;
extern LoggingWithStorage tsLogger;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
#include "pin_repository.h"
#include "usbconsole.h"
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#if HAL_USE_SERIAL_USB
extern SerialUSBDriver SDU1;
#endif /* HAL_USE_SERIAL_USB */
@ -84,8 +84,8 @@ static SerialConfig tsSerialConfig = { 0, 0, USART_CR2_STOP1_BITS | USART_CR2_LI
void startTsPort(ts_channel_s *tsChannel) {
tsChannel->channel = (BaseChannel *) NULL;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if defined(CONSOLE_USB_DEVICE) || defined(__DOXYGEN__)
#if EFI_PROD_CODE
#if defined(CONSOLE_USB_DEVICE)
print("TunerStudio over USB serial");
/**
* This method contains a long delay, that's the reason why this is not done on the main thread
@ -135,8 +135,8 @@ void startTsPort(ts_channel_s *tsChannel) {
}
bool stopTsPort(ts_channel_s *tsChannel) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_USB_SERIAL || defined(__DOXYGEN__)
#if EFI_PROD_CODE
#if EFI_USB_SERIAL
// don't stop USB!
//usb_serial_stop();
return false;
@ -160,7 +160,7 @@ bool stopTsPort(ts_channel_s *tsChannel) {
void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
efiAssertVoid(CUSTOM_ERR_6570, getCurrentRemainingStack() > 64, "tunerStudioWriteData");
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("chSequentialStreamWrite [%d]\r\n", size);
#endif
@ -186,11 +186,11 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
#endif
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("transferred [%d]\r\n", transferred);
#endif
if (transferred != size) {
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
logMsg("!!! NOT ACCEPTED %d out of %d !!!", transferred, size);
#endif /* EFI_SIMULATOR */
scheduleMsg(&tsLogger, "!!! NOT ACCEPTED %d out of %d !!!", transferred, size);
@ -198,7 +198,7 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
}
int sr5ReadDataTimeout(ts_channel_s *tsChannel, uint8_t * buffer, int size, int timeout) {
#if TS_UART_DMA_MODE || defined(__DOXYGEN__)
#if TS_UART_DMA_MODE
UNUSED(tsChannel);
return (int)iqReadTimeout(&tsUartDma.fifoRxQueue, (uint8_t * )buffer, (size_t)size, timeout);
#elif TS_UART_MODE
@ -251,7 +251,7 @@ void sr5SendResponse(ts_channel_s *tsChannel, ts_response_format_e mode, const u
}
bool sr5IsReady(ts_channel_s *tsChannel) {
#if EFI_USB_SERIAL || defined(__DOXYGEN__)
#if EFI_USB_SERIAL
if (isUsbSerial(tsChannel->channel)) {
// TS uses USB when console uses serial
return is_usb_serial_ready();

View File

@ -85,7 +85,7 @@ typedef struct {
// todo: double-check this
#define CRC_WRAPPING_SIZE (CRC_VALUE_SIZE + 3)
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#if HAL_USE_SERIAL_USB
#define CONSOLE_USB_DEVICE SDU1
#endif /* HAL_USE_SERIAL_USB */

View File

@ -24,13 +24,13 @@
#include "rfiutil.h"
#include "tunerstudio.h"
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
#include "rusEfiFunctionalTest.h"
#endif /*EFI_SIMULATOR */
EXTERN_ENGINE;
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#if HAL_USE_SERIAL_USB
#include "usbcfg.h"
#include "usbconsole.h"
extern SerialUSBDriver SDU1;
@ -73,7 +73,7 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
short c = (short) streamGet(chp);
onDataArrived();
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
#if defined(EFI_CONSOLE_UART_DEVICE)
uint32_t flags;
chSysLock()
@ -132,14 +132,14 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
CommandHandler console_line_callback;
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR ) || defined(__DOXYGEN__)
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR )
static SerialConfig serialConfig = { 0, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
#endif
#if EFI_PROD_CODE || EFI_EGT || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_EGT
bool isUsbSerial(BaseChannel * channel) {
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#if HAL_USE_SERIAL_USB
return channel == (BaseChannel *) &CONSOLE_USB_DEVICE;
#else
return false;
@ -147,11 +147,11 @@ bool isUsbSerial(BaseChannel * channel) {
}
BaseChannel * getConsoleChannel(void) {
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
#if defined(EFI_CONSOLE_UART_DEVICE)
return (BaseChannel *) EFI_CONSOLE_UART_DEVICE;
#endif /* EFI_CONSOLE_UART_DEVICE */
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
#if HAL_USE_SERIAL_USB
return (BaseChannel *) &CONSOLE_USB_DEVICE;
#else
return NULL;
@ -163,7 +163,7 @@ bool isCommandLineConsoleReady(void) {
}
#endif /* EFI_PROD_CODE || EFI_EGT */
#if !defined(EFI_CONSOLE_NO_THREAD) || defined(__DOXYGEN__)
#if !defined(EFI_CONSOLE_NO_THREAD)
ts_channel_s binaryConsole;
@ -174,7 +174,7 @@ static THD_FUNCTION(consoleThreadEntryPoint, arg) {
binaryConsole.channel = (BaseChannel *) getConsoleChannel();
if (binaryConsole.channel != NULL) {
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
runBinaryProtocolLoop(&binaryConsole);
#endif /* EFI_TUNER_STUDIO */
}
@ -204,7 +204,7 @@ void startConsole(Logging *sharedLogger, CommandHandler console_line_callback_p)
logger = sharedLogger;
console_line_callback = console_line_callback_p;
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR) || defined(__DOXYGEN__)
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR)
/*
* Activates the serial
* it is important to set 'NONE' as flow control! in terminal application on the PC
@ -221,7 +221,7 @@ void startConsole(Logging *sharedLogger, CommandHandler console_line_callback_p)
chEvtRegisterMask((event_source_t *) chnGetEventSource(EFI_CONSOLE_UART_DEVICE), &consoleEventListener, 1);
#endif /* EFI_PROD_CODE */
#if !defined(EFI_CONSOLE_NO_THREAD) || defined(__DOXYGEN__)
#if !defined(EFI_CONSOLE_NO_THREAD)
chThdCreateStatic(consoleThreadStack, sizeof(consoleThreadStack), NORMALPRIO, (tfunc_t)consoleThreadEntryPoint, NULL);
#endif /* EFI_CONSOLE_NO_THREAD */

View File

@ -96,7 +96,7 @@ static void sayHello(void) {
scheduleMsg(&logger, "EFI_SIGNAL_EXECUTOR_HW_TIMER=%d", EFI_SIGNAL_EXECUTOR_HW_TIMER);
#endif
#if defined(EFI_SHAFT_POSITION_INPUT) || defined(__DOXYGEN__)
#if defined(EFI_SHAFT_POSITION_INPUT)
scheduleMsg(&logger, "EFI_SHAFT_POSITION_INPUT=%d", EFI_SHAFT_POSITION_INPUT);
#endif
#ifdef EFI_INTERNAL_ADC
@ -116,7 +116,7 @@ static void sayHello(void) {
* This methods prints all threads and their total times
*/
static void cmd_threads(void) {
#if CH_DBG_THREADS_PROFILING || defined(__DOXYGEN__)
#if CH_DBG_THREADS_PROFILING
/* todo: fix this code to work with fresh chibios
static const char *states[] = { CH_STATE_NAMES };
thread_t *tp;

View File

@ -30,7 +30,7 @@
#include "engine_controller.h"
#include "adc_inputs.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
#include "wave_analyzer.h"
#endif /* EFI_WAVE_ANALYZER */
@ -63,7 +63,7 @@
extern afr_Map3D_t afrMap;
extern bool main_loop_started;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
// todo: move this logic to algo folder!
#include "rtc_helper.h"
#include "lcd_HD44780.h"
@ -75,7 +75,7 @@ extern bool main_loop_started;
#include "single_timer_executor.h"
#endif /* EFI_PROD_CODE */
#if EFI_CJ125 || defined(__DOXYGEN__)
#if EFI_CJ125
#include "cj125.h"
#endif /* EFI_CJ125 */
@ -83,7 +83,7 @@ extern bool main_loop_started;
#include "map_averaging.h"
#endif
#if EFI_FSIO || defined(__DOXYGEN__)
#if EFI_FSIO
#include "fsio_impl.h"
#endif /* EFI_FSIO */
@ -92,7 +92,7 @@ static volatile bool fullLog = true;
int warningEnabled = true;
//int warningEnabled = FALSE;
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
extern TunerStudioOutputChannels tsOutputChannels;
extern tunerstudio_counters_s tsState;
#endif
@ -102,7 +102,7 @@ extern int maxTriggerReentraint;
extern uint32_t maxLockedDuration;
#define FULL_LOGGING_KEY "fl"
#if !defined(STATUS_LOGGING_BUFFER_SIZE) || defined(__DOXYGEN__)
#if !defined(STATUS_LOGGING_BUFFER_SIZE)
#define STATUS_LOGGING_BUFFER_SIZE 1800
#endif /* STATUS_LOGGING_BUFFER_SIZE */
@ -113,7 +113,7 @@ static void setWarningEnabled(int value) {
warningEnabled = value;
}
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
// this one needs to be in main ram so that SD card SPI DMA works fine
static char FILE_LOGGER[1000] MAIN_RAM;
static Logging fileLogger("file logger", FILE_LOGGER, sizeof(FILE_LOGGER));
@ -125,12 +125,12 @@ static int logFileLineIndex = 0;
static void reportSensorF(Logging *log, bool isLogFileFormatting, const char *caption, const char *units, float value,
int precision) {
if (!isLogFileFormatting) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
debugFloat(log, caption, value, precision);
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
} else {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
if (logFileLineIndex == 0) {
append(log, caption);
append(log, TAB);
@ -148,11 +148,11 @@ static void reportSensorF(Logging *log, bool isLogFileFormatting, const char *ca
static void reportSensorI(Logging *log, bool fileFormat, const char *caption, const char *units, int value) {
if (!fileFormat) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
debugInt(log, caption, value);
#endif /* EFI_PROD_CODE || EFI_SIMULATOR */
} else {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
if (logFileLineIndex == 0) {
append(log, caption);
append(log, TAB);
@ -188,7 +188,7 @@ static void printSensors(Logging *log, bool fileFormat) {
reportSensorF(log, fileFormat, "time", "", sec, 3); // log column 1
int rpm = 0;
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
#if EFI_SHAFT_POSITION_INPUT
rpm = GET_RPM();
reportSensorI(log, fileFormat, "rpm", "RPM", rpm); // log column 2
#endif
@ -208,13 +208,13 @@ static void printSensors(Logging *log, bool fileFormat) {
if (hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE)) {
reportSensorF(log, fileFormat, GAUGE_NAME_VBAT, "V", getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE), 2); // log column #6
}
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
#if EFI_ANALOG_SENSORS
if (hasMapSensor(PASS_ENGINE_PARAMETER_SIGNATURE)) {
reportSensorF(log, fileFormat, "MAP", "kPa", getMap(), 2);
// reportSensorF(log, fileFormat, "map_r", "V", getRawMap(), 2);
}
#endif /* EFI_ANALOG_SENSORS */
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
#if EFI_ANALOG_SENSORS
if (hasBaroSensor()) {
reportSensorF(log, fileFormat, "baro", "kPa", getBaroPressure(), 2);
}
@ -232,7 +232,7 @@ static void printSensors(Logging *log, bool fileFormat) {
// below are the more advanced data points which only go into log file
#if HAL_USE_ADC || defined(__DOXYGEN__)
#if HAL_USE_ADC
reportSensorF(log, fileFormat, GAUGE_NAME_CPU_TEMP, "C", getMCUInternalTemperature(), 2); // log column #3
#endif
@ -246,18 +246,18 @@ static void printSensors(Logging *log, bool fileFormat) {
reportSensorF(log, fileFormat, "mafr", "kg/hr", getRealMaf(PASS_ENGINE_PARAMETER_SIGNATURE), 2);
}
#if EFI_IDLE_CONTROL || defined(__DOXYGEN__)
#if EFI_IDLE_CONTROL
reportSensorF(log, fileFormat, GAUGE_NAME_IAC, "%", getIdlePosition(), 2);
#endif /* EFI_IDLE_CONTROL */
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
#if EFI_ANALOG_SENSORS
reportSensorF(log, fileFormat, GAUGE_NAME_TARGET_AFR, "AFR", engine->engineState.targetAFR, 2);
#endif /* EFI_ANALOG_SENSORS */
#define DEBUG_F_PRECISION 6
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
reportSensorF(log, fileFormat, GAUGE_NAME_DEBUG_F1, "v", tsOutputChannels.debugFloatField1, DEBUG_F_PRECISION);
reportSensorF(log, fileFormat, GAUGE_NAME_DEBUG_F1, "v", tsOutputChannels.debugFloatField2, DEBUG_F_PRECISION);
reportSensorF(log, fileFormat, GAUGE_NAME_DEBUG_F1, "v", tsOutputChannels.debugFloatField3, DEBUG_F_PRECISION);
@ -297,7 +297,7 @@ static void printSensors(Logging *log, bool fileFormat) {
reportSensorI(log, fileFormat, GAUGE_NAME_VERSION, "#", getRusEfiVersion());
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
#if EFI_VEHICLE_SPEED
if (hasVehicleSpeedSensor()) {
float vehicleSpeed = getVehicleSpeed();
reportSensorF(log, fileFormat, GAUGE_NAME_VVS, "kph", vehicleSpeed, 2);
@ -347,7 +347,7 @@ static void printSensors(Logging *log, bool fileFormat) {
void writeLogLine(void) {
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
if (!main_loop_started)
return;
resetLogging(&fileLogger);
@ -379,7 +379,7 @@ static void printStatus(void) {
*/
static systime_t timeOfPreviousPrintVersion = (systime_t) -1;
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
if (hwPin != GPIO_UNASSIGNED) {
appendPrintf(&logger, "outpin%s%s@%s%s", DELIMETER, pinName, hwPortname(hwPin), DELIMETER);
@ -398,14 +398,14 @@ void printOverallStatus(systime_t nowSeconds) {
timeOfPreviousPrintVersion = nowSeconds;
int seconds = getTimeNowSeconds();
printCurrentState(&logger, seconds, getConfigurationName(engineConfiguration->engineType));
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
printOutPin(CRANK1, CONFIGB(triggerInputPins)[0]);
printOutPin(CRANK2, CONFIGB(triggerInputPins)[1]);
printOutPin(VVT_NAME, engineConfiguration->camInput);
printOutPin(HIP_NAME, CONFIGB(hip9011IntHoldPin));
printOutPin(TACH_NAME, CONFIGB(tachOutputPin));
printOutPin(DIZZY_NAME, engineConfiguration->dizzySparkOutputPin);
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
printOutPin(WA_CHANNEL_1, CONFIGB(logicAnalyzerPins)[0]);
printOutPin(WA_CHANNEL_2, CONFIGB(logicAnalyzerPins)[1]);
#endif /* EFI_WAVE_ANALYZER */
@ -448,7 +448,7 @@ void updateDevConsoleState(void) {
*/
printSensors(&logger, false);
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
// todo: unify with simulator!
if (hasFirmwareError()) {
scheduleMsg(&logger, "FATAL error: %s", getFirmwareError());
@ -458,7 +458,7 @@ void updateDevConsoleState(void) {
}
#endif
#if (EFI_PROD_CODE && HAL_USE_ADC) || defined(__DOXYGEN__)
#if EFI_PROD_CODE && HAL_USE_ADC
printFullAdcReportIfNeeded(&logger);
#endif
@ -468,7 +468,7 @@ void updateDevConsoleState(void) {
systime_t nowSeconds = getTimeNowSeconds();
#if (EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT) || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
int currentCkpEventCounter = engine->triggerCentral.triggerState.getTotalEventCounter();
if (prevCkpEventCounter == currentCkpEventCounter && timeOfPreviousReport == nowSeconds) {
return;
@ -510,7 +510,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
scheduleMsg(&logger2, "baro correction=%.2f", engine->engineState.baroCorrection);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL
scheduleMsg(&logger, "base cranking fuel %.2f", engineConfiguration->cranking.baseFuel);
scheduleMsg(&logger2, "cranking fuel: %.2f", getCrankingFuel(PASS_ENGINE_PARAMETER_SIGNATURE));
@ -530,7 +530,7 @@ static void showFuelInfo2(float rpm, float engineLoad) {
#endif
}
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL
static void showFuelInfo(void) {
showFuelInfo2((float) GET_RPM(), getEngineLoadT(PASS_ENGINE_PARAMETER_SIGNATURE));
}
@ -584,10 +584,10 @@ static void setBlinkingPeriod(int value) {
blinkingPeriodMs = value;
}
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
static bool isTriggerErrorNow() {
#if (EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT) || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT
// todo: WAT? how is communication LED blinkingPeriodMs part of trigger error condition?!
bool justHadError = (getTimeNowNt() - engine->triggerCentral.triggerState.lastDecodingErrorTime) < US2NT(2 * 1000 * 3 * blinkingPeriodMs);
return justHadError || isTriggerDecoderError();
@ -610,7 +610,7 @@ static void blinkingThread(void *arg) {
while (true) {
int onTimeMs = is_usb_serial_ready() ? 3 * blinkingPeriodMs : blinkingPeriodMs;
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
#if EFI_INTERNAL_FLASH
if (getNeedToWriteConfiguration()) {
onTimeMs = 2 * onTimeMs;
}
@ -630,7 +630,7 @@ static void blinkingThread(void *arg) {
chThdSleepMilliseconds(offTimeMs);
enginePins.communicationLedPin.setValue(1);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL
if (isTriggerErrorNow() || isIgnitionTimingError() || consoleByteArrived) {
consoleByteArrived = false;
enginePins.warningLedPin.setValue(1);
@ -643,7 +643,7 @@ static void blinkingThread(void *arg) {
#endif /* EFI_PROD_CODE */
#if EFI_LCD || defined(__DOXYGEN__)
#if EFI_LCD
class LcdController : public PeriodicController<UTILITY_THREAD_STACK_SIZE> {
public:
LcdController() : PeriodicController("BenchThread") { }
@ -662,20 +662,20 @@ private:
static LcdController lcdInstance;
#endif /* EFI_LCD */
#if EFI_HIP_9011 || defined(__DOXYGEN__)
#if EFI_HIP_9011
extern HIP9011 instance;
#endif /* EFI_HIP_9011 */
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ENGINE_PARAMETER_SUFFIX) {
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
#if EFI_SHAFT_POSITION_INPUT
int rpm = GET_RPM();
#else /* EFI_SHAFT_POSITION_INPUT */
int rpm = 0;
#endif /* EFI_SHAFT_POSITION_INPUT */
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
executorStatistics();
#endif /* EFI_PROD_CODE */
@ -717,7 +717,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->vBatt = getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE);
}
tsOutputChannels->tpsADC = getTPS12bitAdc(PASS_ENGINE_PARAMETER_SIGNATURE) / TPS_TS_CONVERSION;
#if EFI_ANALOG_SENSORS || defined(__DOXYGEN__)
#if EFI_ANALOG_SENSORS
tsOutputChannels->baroPressure = hasBaroSensor() ? getBaroPressure() : 0;
#endif /* EFI_ANALOG_SENSORS */
tsOutputChannels->engineLoad = engineLoad;
@ -747,7 +747,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->isWarnNow = engine->engineState.warnings.isWarningNow(timeSeconds, true);
tsOutputChannels->isCltBroken = engine->isCltBroken;
#if EFI_HIP_9011 || defined(__DOXYGEN__)
#if EFI_HIP_9011
tsOutputChannels->isKnockChipOk = (instance.invalidHip9011ResponsesCount == 0);
#endif /* EFI_HIP_9011 */
@ -757,7 +757,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->debugIntField1 = atoi(VCS_VERSION);
break;
case DBG_METRICS:
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
#if EFI_CLOCK_LOCKS
tsOutputChannels->debugIntField1 = maxLockedDuration;
tsOutputChannels->debugIntField2 = maxTriggerReentraint;
#endif /* EFI_CLOCK_LOCKS */
@ -794,7 +794,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
}
break;
case DBG_FSIO_EXPRESSION:
#if EFI_PROD_CODE && EFI_FSIO || defined(__DOXYGEN__)
#if EFI_PROD_CODE && EFI_FSIO
tsOutputChannels->debugFloatField1 = getFsioOutputValue(0 PASS_ENGINE_PARAMETER_SUFFIX);
tsOutputChannels->debugFloatField2 = getFsioOutputValue(1 PASS_ENGINE_PARAMETER_SUFFIX);
tsOutputChannels->debugFloatField3 = getFsioOutputValue(2 PASS_ENGINE_PARAMETER_SUFFIX);
@ -813,14 +813,14 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
case DBG_CRANKING_DETAILS:
tsOutputChannels->debugIntField1 = engine->rpmCalculator.getRevolutionCounterSinceStart();
break;
#if EFI_HIP_9011 || defined(__DOXYGEN__)
#if EFI_HIP_9011
case DBG_KNOCK:
// todo: maybe extract hipPostState(tsOutputChannels);
tsOutputChannels->debugIntField1 = instance.correctResponsesCount;
tsOutputChannels->debugIntField2 = instance.invalidHip9011ResponsesCount;
break;
#endif /* EFI_HIP_9011 */
#if (EFI_CJ125 && HAL_USE_SPI) || defined(__DOXYGEN__)
#if EFI_CJ125 && HAL_USE_SPI
case DBG_CJ125:
cjPostState(tsOutputChannels);
break;
@ -830,7 +830,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
postMapState(tsOutputChannels);
break;
#endif /* EFI_MAP_AVERAGING */
#if EFI_CAN_SUPPORT || defined(__DOXYGEN__)
#if EFI_CAN_SUPPORT
case DBG_CAN:
postCanState(tsOutputChannels);
break;
@ -883,7 +883,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->internalMcuTemperature = getMCUInternalTemperature();
#endif /* HAL_USE_ADC */
#if EFI_MAX_31855 || defined(__DOXYGEN__)
#if EFI_MAX_31855
for (int i = 0; i < EGT_CHANNEL_COUNT; i++)
tsOutputChannels->egtValues.values[i] = getEgtValue(i);
#endif /* EFI_MAX_31855 */
@ -892,14 +892,14 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->idlePosition = getIdlePosition();
#endif
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
tsOutputChannels->isTriggerError = isTriggerErrorNow();
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
#if EFI_INTERNAL_FLASH
tsOutputChannels->needBurn = getNeedToWriteConfiguration();
#endif /* EFI_INTERNAL_FLASH */
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
#if EFI_FILE_LOGGING
tsOutputChannels->hasSdCard = isSdCardAlive();
#endif /* EFI_FILE_LOGGING */
@ -911,7 +911,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->isCylinderCleanupEnabled = engineConfiguration->isCylinderCleanupEnabled;
tsOutputChannels->isCylinderCleanupActivated = engine->isCylinderCleanupMode;
tsOutputChannels->secondTriggerChannelEnabled = engineConfiguration->secondTriggerChannelEnabled;
#if EFI_VEHICLE_SPEED || defined(__DOXYGEN__)
#if EFI_VEHICLE_SPEED
float vehicleSpeed = getVehicleSpeed();
tsOutputChannels->vehicleSpeedKph = vehicleSpeed;
tsOutputChannels->speedToRpmRatio = vehicleSpeed / rpm;
@ -960,12 +960,12 @@ void initStatusLoop(void) {
addConsoleActionI(FULL_LOGGING_KEY, setFullLog);
addConsoleActionI("warn", setWarningEnabled);
#if EFI_ENGINE_CONTROL || defined(__DOXYGEN__)
#if EFI_ENGINE_CONTROL
addConsoleActionFF("fuelinfo2", (VoidFloatFloat) showFuelInfo2);
addConsoleAction("fuelinfo", showFuelInfo);
#endif
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
addConsoleActionI("set_led_blinking_period", setBlinkingPeriod);
@ -975,11 +975,11 @@ void initStatusLoop(void) {
void startStatusThreads(void) {
// todo: refactoring needed, this file should probably be split into pieces
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
initStatusLeds();
chThdCreateStatic(blinkingStack, sizeof(blinkingStack), NORMALPRIO, (tfunc_t) blinkingThread, NULL);
#endif /* EFI_PROD_CODE */
#if EFI_LCD || defined(__DOXYGEN__)
#if EFI_LCD
lcdInstance.Start();
#endif /* EFI_LCD */
}

View File

@ -99,7 +99,7 @@ void initEngineEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
return;
#if EFI_POTENTIOMETER
#if HAL_USE_SPI || defined(__DOXYGEN__)
#if HAL_USE_SPI
initPotentiometers(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#endif /* HAL_USE_SPI */
#endif /* EFI_POTENTIOMETER */

View File

@ -28,7 +28,7 @@
#include "engine_sniffer.h"
#include "adc_inputs.h"
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER
#include "engine_configuration.h"
#include "eficonsole.h"
@ -36,7 +36,7 @@
#define CHART_DELIMETER '!'
#if EFI_HISTOGRAMS || defined(__DOXYGEN__)
#if EFI_HISTOGRAMS
#include "rfiutil.h"
#include "histogram.h"
static histogram_s engineSnifferHisto;
@ -71,7 +71,7 @@ static LoggingWithStorage logger("wave info");
*/
static uint32_t skipUntilEngineCycle = 0;
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
#if ! EFI_UNIT_TEST
extern WaveChart waveChart;
static void resetNow(void) {
skipUntilEngineCycle = engine->rpmCalculator.getRevolutionCounter() + 3;
@ -114,7 +114,7 @@ static void printStatus(void) {
static void setChartActive(int value) {
engineConfiguration->isEngineChartEnabled = value;
printStatus();
#if EFI_CLOCK_LOCKS || defined(__DOXYGEN__)
#if EFI_CLOCK_LOCKS
maxLockedDuration = 0; // todo: why do we reset this here? why only this and not all metrics?
#endif /* EFI_CLOCK_LOCKS */
}
@ -163,7 +163,7 @@ void WaveChart::publish() {
* @brief Register an event for digital sniffer
*/
void WaveChart::addEvent3(const char *name, const char * msg) {
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
#if EFI_TEXT_LOGGING
if (!ENGINE(isEngineChartEnabled)) {
return;
}
@ -237,7 +237,7 @@ void WaveChart::addEvent3(const char *name, const char * msg) {
}
void showWaveChartHistogram(void) {
#if (EFI_HISTOGRAMS && EFI_PROD_CODE) || defined(__DOXYGEN__)
#if EFI_HISTOGRAMS && EFI_PROD_CODE
printHistogram(&logger, &engineSnifferHisto);
#endif
}
@ -250,17 +250,17 @@ void initWaveChart(WaveChart *chart) {
printStatus();
#if DEBUG_WAVE || defined(__DOXYGEN__)
#if DEBUG_WAVE
initLoggingExt(&debugLogging, "wave chart debug", &debugLogging.DEFAULT_BUFFER, sizeof(debugLogging.DEFAULT_BUFFER));
#endif
#if EFI_HISTOGRAMS || defined(__DOXYGEN__)
#if EFI_HISTOGRAMS
initHistogram(&engineSnifferHisto, "wave chart");
#endif /* EFI_HISTOGRAMS */
addConsoleActionI("chartsize", setChartSize);
addConsoleActionI("chart", setChartActive);
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
#if ! EFI_UNIT_TEST
addConsoleAction("reset_engine_chart", resetNow);
#endif
}

View File

@ -11,7 +11,7 @@
#include "global.h"
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER
#include "datalogging.h"
/**

View File

@ -15,7 +15,7 @@
#include "hardware.h"
#include "mpu_util.h"
#if HAL_USE_SPI || defined(__DOXYGEN__)
#if HAL_USE_SPI
EXTERN_ENGINE;
@ -52,7 +52,7 @@ EXTERN_ENGINE;
static Logging * logger;
#if EFI_POTENTIOMETER || defined(__DOXYGEN__)
#if EFI_POTENTIOMETER
static Mcp42010Driver potConfig[DIGIPOT_COUNT];
void initPotentiometer(Mcp42010Driver *driver, SPIDriver *spi, brain_pin_e csPin) {

View File

@ -11,7 +11,7 @@
#include "global.h"
#if HAL_USE_SPI || defined(__DOXYGEN__)
#if HAL_USE_SPI
#include "engine_configuration.h"

View File

@ -17,7 +17,7 @@
#include "console_io.h"
#include "engine.h"
#if EFI_PERF_METRICS || defined(__DOXYGEN__)
#if EFI_PERF_METRICS
#include "test.h"
static Logging* logger;
@ -261,7 +261,7 @@ static void runTests(const int count) {
extern Overflow64Counter halTime;
#if EFI_RTC || defined(__DOXYGEN__)
#if EFI_RTC
static int rtcStartTime;
#endif
@ -271,7 +271,7 @@ static void timeInfo(void) {
scheduleMsg(logger, "chTimeNow as seconds = %d", getTimeNowSeconds());
scheduleMsg(logger, "hal seconds = %d", halTime.get() / (long)CORE_CLOCK);
#if EFI_RTC || defined(__DOXYGEN__)
#if EFI_RTC
int unix = rtcGetTimeUnixSec(&RTCD1) - rtcStartTime;
scheduleMsg(logger, "unix seconds = %d", unix);
#endif
@ -299,7 +299,7 @@ static void runChibioTest(void) {
void initTimePerfActions(Logging *sharedLogger) {
logger = sharedLogger;
#if EFI_RTC || defined(__DOXYGEN__)
#if EFI_RTC
rtcStartTime = rtcGetTimeUnixSec(&RTCD1);
#endif

View File

@ -10,10 +10,10 @@
#include "engine.h"
#include "rpm_calculator.h"
#if EFI_SENSOR_CHART || defined(__DOXYGEN__)
#if EFI_SENSOR_CHART
#include "status_loop.h"
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
#if EFI_TEXT_LOGGING
static char LOGGING_BUFFER[5000] CCM_OPTIONAL;
static Logging scLogging("analog chart", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
#endif /* EFI_TEXT_LOGGING */
@ -24,7 +24,7 @@ static int initialized = false;
EXTERN_ENGINE;
void scAddData(float angle, float value) {
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
#if EFI_TEXT_LOGGING
if (!initialized) {
return; // this is possible because of initialization sequence
}

View File

@ -24,7 +24,7 @@
#include "global.h"
#if EFI_PERF_METRICS || defined(__DOXYGEN__)
#if EFI_PERF_METRICS
#include "test.h"
#include "testbmk.h"

View File

@ -28,14 +28,14 @@
/**
* @brief Delay inserted between test cases.
*/
#if !defined(DELAY_BETWEEN_TESTS) || defined(__DOXYGEN__)
#if !defined(DELAY_BETWEEN_TESTS)
#define DELAY_BETWEEN_TESTS 200
#endif
/**
* @brief If @p TRUE then benchmarks are not included.
*/
#if !defined(TEST_NO_BENCHMARKS) || defined(__DOXYGEN__)
#if !defined(TEST_NO_BENCHMARKS)
#define TEST_NO_BENCHMARKS FALSE
#endif

View File

@ -59,7 +59,7 @@
*/
static Semaphore sem1;
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
#if CH_USE_MUTEXES
static Mutex mtx1;
#endif
@ -443,7 +443,7 @@ ROMCONST struct testcase testbmk8 = {
bmk8_execute
};
#if CH_USE_QUEUES || defined(__DOXYGEN__)
#if CH_USE_QUEUES
/**
* @page test_benchmarks_009 I/O Queues throughput
*
@ -533,7 +533,7 @@ ROMCONST struct testcase testbmk10 = {
bmk10_execute
};
#if CH_USE_SEMAPHORES || defined(__DOXYGEN__)
#if CH_USE_SEMAPHORES
/**
* @page test_benchmarks_011 Semaphores wait/signal performance
*
@ -581,7 +581,7 @@ ROMCONST struct testcase testbmk11 = {
};
#endif /* CH_USE_SEMAPHORES */
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
#if CH_USE_MUTEXES
/**
* @page test_benchmarks_012 Mutexes lock/unlock performance
*
@ -651,12 +651,12 @@ static void bmk13_execute(void) {
test_print("--- Timer : ");
test_printn(sizeof(VirtualTimer));
test_println(" bytes");
#if CH_USE_SEMAPHORES || defined(__DOXYGEN__)
#if CH_USE_SEMAPHORES
test_print("--- Semaph: ");
test_printn(sizeof(Semaphore));
test_println(" bytes");
#endif
#if CH_USE_EVENTS || defined(__DOXYGEN__)
#if CH_USE_EVENTS
test_print("--- EventS: ");
test_printn(sizeof(EventSource));
test_println(" bytes");
@ -664,22 +664,22 @@ static void bmk13_execute(void) {
test_printn(sizeof(EventListener));
test_println(" bytes");
#endif
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
#if CH_USE_MUTEXES
test_print("--- Mutex : ");
test_printn(sizeof(Mutex));
test_println(" bytes");
#endif
#if CH_USE_CONDVARS || defined(__DOXYGEN__)
#if CH_USE_CONDVARS
test_print("--- CondV.: ");
test_printn(sizeof(CondVar));
test_println(" bytes");
#endif
#if CH_USE_QUEUES || defined(__DOXYGEN__)
#if CH_USE_QUEUES
test_print("--- Queue : ");
test_printn(sizeof(GenericQueue));
test_println(" bytes");
#endif
#if CH_USE_MAILBOXES || defined(__DOXYGEN__)
#if CH_USE_MAILBOXES
test_print("--- MailB.: ");
test_printn(sizeof(Mailbox));
test_println(" bytes");
@ -706,14 +706,14 @@ ROMCONST struct testcase * ROMCONST patternbmk[] = {
&testbmk6,
&testbmk7,
&testbmk8,
#if CH_USE_QUEUES || defined(__DOXYGEN__)
#if CH_USE_QUEUES
&testbmk9,
#endif
&testbmk10,
#if CH_USE_SEMAPHORES || defined(__DOXYGEN__)
#if CH_USE_SEMAPHORES
&testbmk11,
#endif
#if CH_USE_MUTEXES || defined(__DOXYGEN__)
#if CH_USE_MUTEXES
&testbmk12,
#endif
&testbmk13,

View File

@ -17,7 +17,7 @@
#include "trigger_central.h"
#include "settings.h"
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
#include "pwm_generator.h"
#include "pin_repository.h"
#endif /* EFI_PROD_CODE */
@ -39,14 +39,14 @@ void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousCo
void initTriggerEmulator(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
#if EFI_EMULATE_POSITION_SENSORS || defined(__DOXYGEN__)
#if EFI_EMULATE_POSITION_SENSORS
print("Emulating %s\r\n", getConfigurationName(engineConfiguration->engineType));
triggerSignal.outputPins[0] = &emulatorOutputs[0];
triggerSignal.outputPins[1] = &emulatorOutputs[1];
triggerSignal.outputPins[2] = &emulatorOutputs[2];
#if EFI_PROD_CODE || defined(__DOXYGEN__)
#if EFI_PROD_CODE
// todo: refactor, make this a loop
triggerSignal.outputPins[0]->initPin("trg emulator ch1", CONFIGB(triggerSimulatorPins)[0],
&CONFIGB(triggerSimulatorPinModes)[0]);

View File

@ -26,14 +26,14 @@
#include "rpm_calculator.h"
#include "engine_sniffer.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
EXTERN_ENGINE;
#define CHART_RESET_DELAY 1
#define MAX_ICU_COUNT 5
#if EFI_ENGINE_SNIFFER || defined(__DOXYGEN__)
#if EFI_ENGINE_SNIFFER
extern WaveChart waveChart;
#endif
extern bool hasFirmwareErrorFlag;
@ -55,7 +55,7 @@ static void ensureInitialized(WaveReader *reader) {
efiAssertVoid(CUSTOM_ERR_6654, reader->hw != NULL && reader->hw->started, "wave analyzer NOT INITIALIZED");
}
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
static void waAnaWidthCallback(WaveReader *reader) {
efitick_t nowUs = getTimeNowUs();
@ -274,7 +274,7 @@ void initWaveAnalyzer(Logging *sharedLogger) {
if (hasFirmwareError()) {
return;
}
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
initWave(WA_CHANNEL_1, 0);
initWave(WA_CHANNEL_2, 1);

View File

@ -12,7 +12,7 @@
#include "global.h"
#if EFI_WAVE_ANALYZER || defined(__DOXYGEN__)
#if EFI_WAVE_ANALYZER
#include "digital_input_hw.h"
#include "engine_sniffer.h"

View File

@ -126,7 +126,7 @@
#include "lcd_HD44780.h"
#endif /* EFI_HD44780_LCD */
#if EFI_ENGINE_EMULATOR || defined(__DOXYGEN__)
#if EFI_ENGINE_EMULATOR
#include "engine_emulator.h"
#endif /* EFI_ENGINE_EMULATOR */
@ -168,7 +168,7 @@ void runRusEfi(void) {
initErrorHandling();
addConsoleAction("reboot", scheduleReboot);
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
#if EFI_SHAFT_POSITION_INPUT
/**
* This is so early because we want to init logger
* which would be used while finding trigger sync index
@ -187,7 +187,7 @@ void runRusEfi(void) {
*/
initPinRepository();
#if EFI_INTERNAL_FLASH || defined(__DOXYGEN__)
#if EFI_INTERNAL_FLASH
/**
* First thing is reading configuration from flash memory.
* In order to have complete flexibility configuration has to go before anything else.
@ -215,11 +215,11 @@ void runRusEfi(void) {
initEngineContoller(&sharedLogger PASS_ENGINE_PARAMETER_SIGNATURE);
rememberCurrentConfiguration();
#if EFI_PERF_METRICS || defined(__DOXYGEN__)
#if EFI_PERF_METRICS
initTimePerfActions(&sharedLogger);
#endif
#if EFI_ENGINE_EMULATOR || defined(__DOXYGEN__)
#if EFI_ENGINE_EMULATOR
initEngineEmulator(&sharedLogger PASS_ENGINE_PARAMETER_SIGNATURE);
#endif
startStatusThreads();
@ -235,7 +235,7 @@ void runRusEfi(void) {
while (true) {
efiAssertVoid(CUSTOM_RM_STACK, getCurrentRemainingStack() > 128, "stack#1");
#if (EFI_CLI_SUPPORT && !EFI_UART_ECHO_TEST_MODE) || defined(__DOXYGEN__)
#if EFI_CLI_SUPPORT && !EFI_UART_ECHO_TEST_MODE
// sensor state + all pending messages for our own dev console
updateDevConsoleState();
#endif /* EFI_CLI_SUPPORT */
@ -256,7 +256,7 @@ void runRusEfi(void) {
void chDbgStackOverflowPanic(thread_t *otp) {
(void)otp;
strcpy(panicMessage, "stack overflow: ");
#if defined(CH_USE_REGISTRY) || defined(__DOXYGEN__)
#if defined(CH_USE_REGISTRY)
int p_name_len = strlen(otp->p_name);
if (p_name_len < sizeof(panicMessage) - 2)
strcat(panicMessage, otp->p_name);

View File

@ -43,7 +43,7 @@ void resetConsoleActions(void) {
}
static void doAddAction(const char *token, action_type_e type, Void callback, void *param) {
#if !defined(EFI_DISABLE_CONSOLE_ACTIONS) || defined(__DOXYGEN__)
#if !defined(EFI_DISABLE_CONSOLE_ACTIONS)
for (uint32_t i = 0; i < efiStrlen(token);i++) {
char ch = token[i];
if (ch != mytolower(ch)) {
@ -168,14 +168,14 @@ static int getParameterCount(action_type_e parameterType) {
* @brief This function prints out a list of all available commands
*/
void helpCommand(void) {
#if EFI_BOARD_TEST || defined(__DOXYGEN__)
#if EFI_BOARD_TEST
if (isBoardTestMode()) {
printBoardTestState();
return;
}
#endif /* EFI_BOARD_TEST */
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(logging, "%d actions available", consoleActionCount);
for (int i = 0; i < consoleActionCount; i++) {
TokenCallback *current = &consoleActions[i];
@ -347,7 +347,7 @@ void handleActionWithParameter(TokenCallback *current, char *parameter) {
REPLACE_SPACES_WITH_ZERO;
int value1 = atoi(parameter);
if (absI(value1) == ERROR_CODE) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(logging, "not an integer [%s]", parameter);
#endif
return;
@ -355,7 +355,7 @@ void handleActionWithParameter(TokenCallback *current, char *parameter) {
parameter += spaceIndex + 1;
int value2 = atoi(parameter);
if (absI(value2) == ERROR_CODE) {
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
scheduleMsg(logging, "not an integer [%s]", parameter);
#endif
return;
@ -531,7 +531,7 @@ static bool handleConsoleLineInternal(const char *commandLine, int lineLength) {
return false;
}
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
#if EFI_PROD_CODE || EFI_SIMULATOR
static void sendOutConfirmation(const char *command, int length) {
scheduleMsg(logging, "%s%d", command, length);
}
@ -561,7 +561,7 @@ void handleConsoleLine(char *line) {
sendOutConfirmation(confirmation, lineLength);
#endif
#if EFI_SIMULATOR || defined(__DOXYGEN__)
#if EFI_SIMULATOR
printf("handleConsoleLine [%s]\r\n", line);
#endif /* EFI_SIMULATOR */

View File

@ -32,7 +32,7 @@
#include "global.h"
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
#if ! EFI_UNIT_TEST
#include "chprintf.h"
#include "chmtx.h"
#include "memstreams.h"

View File

@ -8,7 +8,7 @@
#include "global.h"
#include "efilib.h"
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
#if ! EFI_UNIT_TEST
typedef char log_buf_t[DL_OUTPUT_BUFFER];
@ -41,7 +41,7 @@ static char * outputBuffer;
* of logging content
*/
void scheduleLogging(Logging *logging) {
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
#if EFI_TEXT_LOGGING
// this could be done without locking
int newLength = efiStrlen(logging->buffer);
@ -71,7 +71,7 @@ void scheduleLogging(Logging *logging) {
* this method should always be invoked from the same thread!
*/
char * swapOutputBuffers(int *actualOutputBufferSize) {
#if EFI_ENABLE_ASSERTS || defined(__DOXYGEN__)
#if EFI_ENABLE_ASSERTS
int expectedOutputSize;
#endif /* EFI_ENABLE_ASSERTS */
{ // start of critical section
@ -81,7 +81,7 @@ char * swapOutputBuffers(int *actualOutputBufferSize) {
*/
char *temp = outputBuffer;
#if EFI_ENABLE_ASSERTS || defined(__DOXYGEN__)
#if EFI_ENABLE_ASSERTS
expectedOutputSize = accumulatedSize;
#endif /* EFI_ENABLE_ASSERTS */
outputBuffer = accumulationBuffer;
@ -96,7 +96,7 @@ char * swapOutputBuffers(int *actualOutputBufferSize) {
} // end of critical section
*actualOutputBufferSize = efiStrlen(outputBuffer);
#if EFI_ENABLE_ASSERTS || defined(__DOXYGEN__)
#if EFI_ENABLE_ASSERTS
if (*actualOutputBufferSize != expectedOutputSize) {
int sizeToShow = minI(10, *actualOutputBufferSize);
int offsetToShow = *actualOutputBufferSize - sizeToShow;
@ -121,7 +121,7 @@ void initLoggingCentral(void) {
* in order to reduce memory usage
*/
void scheduleMsg(Logging *logging, const char *fmt, ...) {
#if EFI_TEXT_LOGGING || defined(__DOXYGEN__)
#if EFI_TEXT_LOGGING
if (logging == NULL) {
warning(CUSTOM_ERR_LOGGING_NULL, "logging NULL");
return;

View File

@ -211,7 +211,7 @@ int findIndexMsg(const char *msg, const float array[], int size, float value) {
break;
if (middle != 0 && array[middle - 1] > array[middle]) {
#if EFI_UNIT_TEST || defined(__DOXYGEN__)
#if EFI_UNIT_TEST
firmwareError(CUSTOM_ERR_6610, "%s: out of order %.2f %.2f", msg, array[middle - 1], array[middle]);
#else
warning(CUSTOM_ERR_OUT_OF_ORDER, "%s: out of order %.2f %.2f", msg, array[middle - 1], array[middle]);

View File

@ -110,7 +110,7 @@ void Pid::setErrorAmplification(float coef) {
errorAmplificationCoef = coef;
}
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
void Pid::postState(TunerStudioOutputChannels *tsOutputChannels) {
postState(tsOutputChannels, 1);
}
@ -135,7 +135,7 @@ void Pid::postState(TunerStudioOutputChannels *tsOutputChannels, int pMult) {
#endif /* EFI_TUNER_STUDIO */
void Pid::sleep() {
#if !EFI_UNIT_TEST || defined(__DOXYGEN__)
#if !EFI_UNIT_TEST
int periodMs = maxI(10, pid->periodMs);
chThdSleepMilliseconds(periodMs);
#endif /* EFI_UNIT_TEST */

View File

@ -45,7 +45,7 @@ public:
float getIntegration(void);
float getPrevError(void);
void setErrorAmplification(float coef);
#if EFI_TUNER_STUDIO || defined(__DOXYGEN__)
#if EFI_TUNER_STUDIO
void postState(TunerStudioOutputChannels *tsOutputChannels);
void postState(TunerStudioOutputChannels *tsOutputChannels, int pMult);
#endif /* EFI_TUNER_STUDIO */

View File

@ -119,7 +119,7 @@ void rusEfiFunctionalTest(void) {
initTriggerCentral(&sharedLogger);
initTriggerEmulator(&sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
#if EFI_MAP_AVERAGING || defined(__DOXYGEN__)
#if EFI_MAP_AVERAGING
initMapAveraging(&sharedLogger, engine);
#endif /* EFI_MAP_AVERAGING */