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 " Chibios Kernel: %s", CH_KERNEL_VERSION);
|
||||||
efiPrintf(PROTOCOL_HELLO_PREFIX " Compiled: " __DATE__ " - " __TIME__ "");
|
efiPrintf(PROTOCOL_HELLO_PREFIX " Compiled: " __DATE__ " - " __TIME__ "");
|
||||||
efiPrintf(PROTOCOL_HELLO_PREFIX " COMPILER=%s", __VERSION__);
|
efiPrintf(PROTOCOL_HELLO_PREFIX " COMPILER=%s", __VERSION__);
|
||||||
#if USE_OPENBLT
|
#if EFI_USE_OPENBLT
|
||||||
efiPrintf(PROTOCOL_HELLO_PREFIX " with OPENBLT");
|
efiPrintf(PROTOCOL_HELLO_PREFIX " with OPENBLT");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -103,6 +103,7 @@ static void printRusefiVersion(const char *engineTypeName, const char *firmwareB
|
||||||
getTimeNowS());
|
getTimeNowS());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if EFI_PROD_CODE
|
||||||
// Inform the console about the mapping between a pin's logical name (for example, injector 3)
|
// 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)
|
// and the physical MCU pin backing that function (for example, PE3)
|
||||||
static void printOutPin(const char *pinName, brain_pin_e hwPin) {
|
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);
|
efiPrintfProto(PROTOCOL_OUTPIN, "%s@%s", pinName, hwPinName);
|
||||||
}
|
}
|
||||||
|
#endif // EFI_PROD_CODE
|
||||||
|
|
||||||
// Print out the current mapping between logical and physical pins that
|
// Print out the current mapping between logical and physical pins that
|
||||||
// the engine sniffer cares about, so we can display a physical pin
|
// 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 */
|
#endif /* EFI_LOGIC_ANALYZER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if EFI_PROD_CODE
|
||||||
static OutputPin* leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
static OutputPin* leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
||||||
&enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin };
|
&enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin };
|
||||||
|
#endif // EFI_PROD_CODE
|
||||||
|
|
||||||
void initWarningRunningPins() {
|
void initWarningRunningPins() {
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
|
|
@ -457,7 +457,7 @@ static void handleCommandX14(uint16_t index) {
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
case TS_RESET_MC33810:
|
case TS_RESET_MC33810:
|
||||||
#if (BOARD_MC33810_COUNT > 0)
|
#if EFI_PROD_CODE && (BOARD_MC33810_COUNT > 0)
|
||||||
mc33810_req_init();
|
mc33810_req_init();
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
@ -609,7 +609,7 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xba:
|
case 0xba:
|
||||||
#if EFI_DFU_JUMP
|
#if EFI_PROD_CODE && EFI_DFU_JUMP
|
||||||
jump_to_bootloader();
|
jump_to_bootloader();
|
||||||
#endif /* EFI_DFU_JUMP */
|
#endif /* EFI_DFU_JUMP */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
|
|
||||||
static bool fs_ready = false;
|
static bool fs_ready = false;
|
||||||
|
|
||||||
|
#if EFI_PROD_CODE
|
||||||
|
|
||||||
int totalLoggedBytes = 0;
|
int totalLoggedBytes = 0;
|
||||||
static int fileCreatedCounter = 0;
|
static int fileCreatedCounter = 0;
|
||||||
static int writeCounter = 0;
|
static int writeCounter = 0;
|
||||||
static int totalWritesCounter = 0;
|
static int totalWritesCounter = 0;
|
||||||
static int totalSyncCounter = 0;
|
static int totalSyncCounter = 0;
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "mmc_card.h"
|
#include "mmc_card.h"
|
||||||
|
|
Loading…
Reference in New Issue