mirror of https://github.com/rusefi/rusefi.git
better guards
This commit is contained in:
parent
1e32c86cbb
commit
cc161fb029
|
@ -47,7 +47,7 @@ static void sayHello() {
|
|||
efiPrintf(PROTOCOL_HELLO_PREFIX " Chibios Kernel: %s", CH_KERNEL_VERSION);
|
||||
efiPrintf(PROTOCOL_HELLO_PREFIX " Compiled: " __DATE__ " - " __TIME__ "");
|
||||
efiPrintf(PROTOCOL_HELLO_PREFIX " COMPILER=%s", __VERSION__);
|
||||
#if USE_OPENBLT
|
||||
#if EFI_USE_OPENBLT
|
||||
efiPrintf(PROTOCOL_HELLO_PREFIX " with OPENBLT");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -103,6 +103,7 @@ static void printRusefiVersion(const char *engineTypeName, const char *firmwareB
|
|||
getTimeNowS());
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
// Inform the console about the mapping between a pin's logical name (for example, injector 3)
|
||||
// and the physical MCU pin backing that function (for example, PE3)
|
||||
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
|
||||
|
@ -118,6 +119,7 @@ static void printOutPin(const char *pinName, brain_pin_e hwPin) {
|
|||
|
||||
efiPrintfProto(PROTOCOL_OUTPIN, "%s@%s", pinName, hwPinName);
|
||||
}
|
||||
#endif // EFI_PROD_CODE
|
||||
|
||||
// Print out the current mapping between logical and physical pins that
|
||||
// the engine sniffer cares about, so we can display a physical pin
|
||||
|
@ -225,8 +227,10 @@ static systime_t timeOfPreviousReport = (systime_t) -1;
|
|||
#endif /* EFI_LOGIC_ANALYZER */
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
static OutputPin* leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
||||
&enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin };
|
||||
#endif // EFI_PROD_CODE
|
||||
|
||||
void initWarningRunningPins() {
|
||||
#if EFI_PROD_CODE
|
||||
|
|
|
@ -457,7 +457,7 @@ static void handleCommandX14(uint16_t index) {
|
|||
#endif
|
||||
return;
|
||||
case TS_RESET_MC33810:
|
||||
#if (BOARD_MC33810_COUNT > 0)
|
||||
#if EFI_PROD_CODE && (BOARD_MC33810_COUNT > 0)
|
||||
mc33810_req_init();
|
||||
#endif
|
||||
return;
|
||||
|
@ -609,7 +609,7 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) {
|
|||
break;
|
||||
|
||||
case 0xba:
|
||||
#if EFI_DFU_JUMP
|
||||
#if EFI_PROD_CODE && EFI_DFU_JUMP
|
||||
jump_to_bootloader();
|
||||
#endif /* EFI_DFU_JUMP */
|
||||
break;
|
||||
|
@ -635,7 +635,7 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) {
|
|||
void onConfigurationChangeBenchTest() {
|
||||
// default values if configuration was not specified
|
||||
if (engineConfiguration->benchTestOnTime == 0) {
|
||||
engineConfiguration->benchTestOnTime = 4;
|
||||
engineConfiguration->benchTestOnTime = 4;
|
||||
}
|
||||
|
||||
if (engineConfiguration->benchTestOffTime < 5) {
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
|
||||
static bool fs_ready = false;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
||||
int totalLoggedBytes = 0;
|
||||
static int fileCreatedCounter = 0;
|
||||
static int writeCounter = 0;
|
||||
static int totalWritesCounter = 0;
|
||||
static int totalSyncCounter = 0;
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "mmc_card.h"
|
||||
|
@ -177,7 +177,7 @@ static void prepareLogFileName() {
|
|||
|
||||
#if HAL_USE_USB_MSD
|
||||
bool result = dateToStringShort(&logName[PREFIX_LEN]);
|
||||
#else
|
||||
#else
|
||||
// TS SD protocol supports only short 8 symbol file names :(
|
||||
bool result = false;
|
||||
#endif
|
||||
|
@ -336,7 +336,7 @@ static BaseBlockDevice* initializeMmcBlockDevice() {
|
|||
if (hasFirmwareError()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
if (!engineConfiguration->isSdCardEnabled ||
|
||||
engineConfiguration->sdCardSpiDevice == SPI_NONE ||
|
||||
!isBrainPinValid(engineConfiguration->sdCardCsPin)) {
|
||||
|
|
Loading…
Reference in New Issue