disablePrimaryUart for MRE for GDI
This commit is contained in:
parent
09f543a3d5
commit
1a8b6d24fc
|
@ -113,8 +113,8 @@ static void resetTs() {
|
|||
void printTsStats(void) {
|
||||
#if EFI_PROD_CODE
|
||||
#ifdef EFI_CONSOLE_RX_BRAIN_PIN
|
||||
efiPrintf("Primary Channel RX", hwPortname(EFI_CONSOLE_RX_BRAIN_PIN));
|
||||
efiPrintf("Primary Channel TX", hwPortname(EFI_CONSOLE_TX_BRAIN_PIN));
|
||||
efiPrintf("Primary UART RX", hwPortname(EFI_CONSOLE_RX_BRAIN_PIN));
|
||||
efiPrintf("Primary UART TX", hwPortname(EFI_CONSOLE_TX_BRAIN_PIN));
|
||||
#endif
|
||||
|
||||
if (false) {
|
||||
|
|
|
@ -40,8 +40,10 @@ class SerialTsChannel;
|
|||
|
||||
TsChannelBase* setupChannel() {
|
||||
#if EFI_PROD_CODE
|
||||
efiSetPadMode("Primary Channel RX", EFI_CONSOLE_RX_BRAIN_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
|
||||
efiSetPadMode("Primary Channel TX", EFI_CONSOLE_TX_BRAIN_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
|
||||
// historically the idea was that primary UART has to be very hard-coded as the last line of reliability defense
|
||||
// as of 2022 it looks like sometimes we just need the GPIO on MRE for instance more than we need UART
|
||||
efiSetPadMode("Primary UART RX", EFI_CONSOLE_RX_BRAIN_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
|
||||
efiSetPadMode("Primary UART TX", EFI_CONSOLE_TX_BRAIN_PIN, PAL_MODE_ALTERNATE(EFI_CONSOLE_AF));
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
primaryChannel.start(engineConfiguration->uartConsoleSerialSpeed);
|
||||
|
@ -71,8 +73,8 @@ class SerialTsChannel;
|
|||
|
||||
TsChannelBase* setupChannel() {
|
||||
#if EFI_PROD_CODE
|
||||
efiSetPadMode("Secondary Channel RX", engineConfiguration->binarySerialRxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
|
||||
efiSetPadMode("Secondary Channel TX", engineConfiguration->binarySerialTxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
|
||||
efiSetPadMode("Secondary UART RX", engineConfiguration->binarySerialRxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
|
||||
efiSetPadMode("Secondary UART TX", engineConfiguration->binarySerialTxPin, PAL_MODE_ALTERNATE(TS_SERIAL_AF));
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
secondaryChannel.start(engineConfiguration->uartConsoleSerialSpeed);
|
||||
|
@ -86,7 +88,10 @@ class SerialTsChannel;
|
|||
|
||||
void startSerialChannels() {
|
||||
#if HAS_PRIMARY
|
||||
primaryChannelThread.Start();
|
||||
// todo: invert setting one day?
|
||||
if (!engineConfiguration->disablePrimaryUart) {
|
||||
primaryChannelThread.Start();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_SECONDARY
|
||||
|
|
|
@ -1000,7 +1000,7 @@ end_struct
|
|||
uint16_t tps2SecondaryMin;;"ADC", 1, 0, 0, 1000, 0
|
||||
uint16_t tps2SecondaryMax;;"ADC", 1, 0, 0, 1000, 0
|
||||
|
||||
bit unused1464b0
|
||||
bit disablePrimaryUart
|
||||
bit fuelClosedLoopCorrectionEnabled;+Enables lambda sensor closed loop feedback for fuelling.
|
||||
bit isVerboseIAC;+Print details into rusEfi console\nenable verbose_idle
|
||||
bit unused1464b3
|
||||
|
|
|
@ -3563,6 +3563,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
|
||||
; Racing Features->Launch Control
|
||||
dialog = smLaunchControl, "Launch Control Settings EXPERIMENTAL"
|
||||
field = "disablePrimaryUart", disablePrimaryUart
|
||||
field = "Enable Launch Control", launchControlEnabled
|
||||
field = "Activation Mode", launchActivationMode
|
||||
field = "Switch Input", launchActivatePin, {launchActivationMode == 0 && launchControlEnabled == 1}
|
||||
|
|
Loading…
Reference in New Issue