JNI for test coverage #3965

This commit is contained in:
rusefillc 2022-03-15 10:47:02 -04:00
parent 5f73d9bf7b
commit cdc7c2497b
2 changed files with 4 additions and 5 deletions

View File

@ -526,6 +526,7 @@ void tunerStudioError(TsChannelBase* tsChannel, const char *msg) {
#if EFI_TUNER_STUDIO
#if EFI_PROD_CODE || EFI_SIMULATOR
/**
* Query with CRC takes place while re-establishing connection
* Query without CRC takes place on TunerStudio startup
@ -544,7 +545,6 @@ void handleQueryCommand(TsChannelBase* tsChannel, ts_response_format_e mode) {
* rusEfi own test command
*/
static void handleTestCommand(TsChannelBase* tsChannel) {
#if EFI_PROD_CODE || EFI_SIMULATOR
tsState.testCommandCounter++;
char testOutputBuffer[64];
/**
@ -569,17 +569,14 @@ static void handleTestCommand(TsChannelBase* tsChannel) {
tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer));
}
tsChannel->flush();
#endif
}
extern CommandHandler console_line_callback;
static void handleGetVersion(TsChannelBase* tsChannel) {
#if EFI_PROD_CODE || EFI_SIMULATOR
char versionBuffer[32];
chsnprintf(versionBuffer, sizeof(versionBuffer), "rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION);
tsChannel->sendResponse(TS_CRC, (const uint8_t *) versionBuffer, strlen(versionBuffer) + 1);
#endif
}
#if EFI_TEXT_LOGGING
@ -814,6 +811,8 @@ int TunerStudioBase::handleCrcCommand(TsChannelBase* tsChannel, char *data, int
return true;
}
#endif // EFI_PROD_CODE || EFI_SIMULATOR
void startTunerStudioConnectivity(void) {
// Assert tune & output channel struct sizes
static_assert(sizeof(persistent_config_s) == TOTAL_CONFIG_SIZE, "TS datapage size mismatch");

View File

@ -6,7 +6,7 @@
#include "status_loop.h"
#if EFI_TUNER_STUDIO
#if EFI_TUNER_STUDIO && (EFI_PROD_CODE || EFI_SIMULATOR)
/**
* @brief 'Output' command sends out a snapshot of current values