TS: use BOARD_NAME in Test and Version commands reply (#211)

* TS: use BOARD_NAME in Test and Version commands reply

* making source code two bytes smaller

* making source code two bytes smaller

* making source code two bytes smaller

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-03-07 00:18:54 -05:00 committed by GitHub
parent 7411f42d21
commit 6364c7cb2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -215,8 +215,6 @@ static bool isKnownCommand(char command) {
* rusEfi own test command
*/
#define VCS_VERSION "unknown"
static void handleTestCommand(TsChannelBase* tsChannel) {
tsState.testCommandCounter++;
char testOutputBuffer[64];
@ -225,10 +223,10 @@ static void handleTestCommand(TsChannelBase* tsChannel) {
* extension of the protocol to simplify troubleshooting
*/
tunerStudioDebug(tsChannel, "got T (Test)");
chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), VCS_VERSION "\r\n");
chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), BOARD_NAME "\r\n");
tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer));
chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), __DATE__ "\r\n");
chsnprintf(testOutputBuffer, sizeof(testOutputBuffer), __DATE__ "\r\n");
tsChannel->write((const uint8_t*)testOutputBuffer, strlen(testOutputBuffer));
/*
@ -464,8 +462,7 @@ void tunerStudioError(TsChannelBase* tsChannel, const char *msg) {
static void handleGetVersion(TsChannelBase* tsChannel) {
char versionBuffer[32];
//chsnprintf(versionBuffer, sizeof(versionBuffer), "rusEFI v%d@%s", getRusEfiVersion(), VCS_VERSION);
chsnprintf(versionBuffer, sizeof(versionBuffer), "rusEFI Wideband Rev2");
chsnprintf(versionBuffer, sizeof(versionBuffer), BOARD_NAME);
tsChannel->sendResponse(TS_CRC, (const uint8_t *) versionBuffer, strlen(versionBuffer) + 1);
}