This commit is contained in:
Matthew Kennedy 2023-03-03 02:03:22 -08:00
parent b9e28bb5b6
commit 2f5bc850c6
1 changed files with 2 additions and 27 deletions

View File

@ -111,30 +111,6 @@ static void resetTs() {
memset(&tsState, 0, sizeof(tsState)); memset(&tsState, 0, sizeof(tsState));
} }
static void printTsStats(void) {
#if EFI_PROD_CODE
#ifdef EFI_CONSOLE_RX_BRAIN_PIN
efiPrintf("Primary UART RX %s", hwPortname(EFI_CONSOLE_RX_BRAIN_PIN));
efiPrintf("Primary UART TX %s", hwPortname(EFI_CONSOLE_TX_BRAIN_PIN));
#endif
if (false) {
// todo: is this code needed somewhere else?
efiPrintf("TS RX on %s", hwPortname(engineConfiguration->binarySerialRxPin));
efiPrintf("TS TX on %s @%d", hwPortname(engineConfiguration->binarySerialTxPin),
engineConfiguration->tunerStudioSerialSpeed);
}
#endif /* EFI_PROD_CODE */
printErrorCounters();
}
static void setTsSpeed(int value) {
engineConfiguration->tunerStudioSerialSpeed = value;
printTsStats();
}
#endif // EFI_TUNER_STUDIO #endif // EFI_TUNER_STUDIO
void tunerStudioDebug(TsChannelBase* tsChannel, const char *msg) { void tunerStudioDebug(TsChannelBase* tsChannel, const char *msg) {
@ -415,7 +391,7 @@ void TunerStudio::handleQueryCommand(TsChannelBase* tsChannel, ts_response_forma
tsState.queryCommandCounter++; tsState.queryCommandCounter++;
#if EFI_TUNER_STUDIO_VERBOSE #if EFI_TUNER_STUDIO_VERBOSE
efiPrintf("got S/H (queryCommand) mode=%d", mode); efiPrintf("got S/H (queryCommand) mode=%d", mode);
printTsStats(); printErrorCounters();
#endif #endif
const char *signature = getTsSignature(); const char *signature = getTsSignature();
tsChannel->sendResponse(mode, (const uint8_t *)signature, strlen(signature) + 1); tsChannel->sendResponse(mode, (const uint8_t *)signature, strlen(signature) + 1);
@ -830,9 +806,8 @@ void startTunerStudioConnectivity(void) {
memset(&tsState, 0, sizeof(tsState)); memset(&tsState, 0, sizeof(tsState));
addConsoleAction("tsinfo", printTsStats); addConsoleAction("tsinfo", printErrorCounters);
addConsoleAction("reset_ts", resetTs); addConsoleAction("reset_ts", resetTs);
addConsoleActionI("set_ts_speed", setTsSpeed);
#if EFI_BLUETOOTH_SETUP #if EFI_BLUETOOTH_SETUP
// module initialization start (it waits for disconnect and then communicates to the module) // module initialization start (it waits for disconnect and then communicates to the module)