The Big Refactoring of 2019: console vs TS vs CONSOLE_MODE_SWITCH_PIN vs text protocol #725

few lines of dead code
This commit is contained in:
rusefi 2019-04-01 11:39:25 -04:00
parent 1db1b7a277
commit 17ad43e443
2 changed files with 7 additions and 14 deletions

View File

@ -140,7 +140,8 @@ static void printErrorCounters(void) {
void printTsStats(void) {
#if EFI_PROD_CODE || defined(__DOXYGEN__)
if (!isCommandLineConsoleOverTTL()) {
if (false) {
// todo: is this code needed somewhere else?
scheduleMsg(&tsLogger, "TS RX on %s", hwPortname(engineConfiguration->binarySerialRxPin));
scheduleMsg(&tsLogger, "TS TX on %s @%d", hwPortname(engineConfiguration->binarySerialTxPin),

View File

@ -74,7 +74,7 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
onDataArrived();
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
if (isCommandLineConsoleOverTTL()) {
uint32_t flags;
chSysLock()
;
@ -85,7 +85,7 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
if (flags & SD_OVERRUN_ERROR) {
// firmwareError(OBD_PCM_Processor_Fault, "serial overrun");
}
}
#endif
#if EFI_UART_ECHO_TEST_MODE
@ -132,10 +132,8 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
CommandHandler console_line_callback;
static const bool b_isCommandLineConsoleOverTTL = true;
bool isCommandLineConsoleOverTTL(void) {
return b_isCommandLineConsoleOverTTL;
return true;
}
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR ) || defined(__DOXYGEN__)
@ -190,9 +188,7 @@ void runConsoleLoop(ts_channel_s *console) {
BaseChannel * getConsoleChannel(void) {
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
if (isCommandLineConsoleOverTTL()) {
return (BaseChannel *) EFI_CONSOLE_UART_DEVICE;
}
return (BaseChannel *) EFI_CONSOLE_UART_DEVICE;
#endif /* EFI_CONSOLE_UART_DEVICE */
#if HAL_USE_SERIAL_USB || defined(__DOXYGEN__)
@ -203,11 +199,7 @@ BaseChannel * getConsoleChannel(void) {
}
bool isCommandLineConsoleReady(void) {
if (isCommandLineConsoleOverTTL()) {
return isSerialConsoleStarted;
} else {
return is_usb_serial_ready();
}
return isSerialConsoleStarted;
}
#endif /* EFI_PROD_CODE || EFI_EGT */