Skip to content

Commit

Permalink
remove page TS command (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 authored Nov 8, 2024
1 parent ed9420d commit de4b157
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 23 deletions.
13 changes: 1 addition & 12 deletions firmware/console/binary/tunerstudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ void TunerStudio::sendErrorCode(TsChannelBase* tsChannel, uint8_t code) {
::sendErrorCode(tsChannel, code);
}

void TunerStudio::handlePageSelectCommand(TsChannelBase *tsChannel) {
tsState.pageCommandCounter++;

efiPrintf("TS -> Set page (no-op)");

sendOkResponse(tsChannel);
}

bool validateOffsetCount(size_t offset, size_t count, TsChannelBase* tsChannel);

extern bool rebootForPresetPending;
Expand Down Expand Up @@ -276,7 +268,7 @@ static void handleBurnCommand(TsChannelBase* tsChannel) {

static bool isKnownCommand(char command) {
return command == TS_HELLO_COMMAND || command == TS_READ_COMMAND || command == TS_OUTPUT_COMMAND
|| command == TS_PAGE_COMMAND || command == TS_BURN_COMMAND || command == TS_SINGLE_WRITE_COMMAND
|| command == TS_BURN_COMMAND || command == TS_SINGLE_WRITE_COMMAND
|| command == TS_CHUNK_WRITE_COMMAND || command == TS_EXECUTE
|| command == TS_IO_TEST_COMMAND
|| command == TS_SET_LOGGER_SWITCH
Expand Down Expand Up @@ -585,9 +577,6 @@ int TunerStudio::handleCrcCommand(TsChannelBase* tsChannel, uint8_t* data, int i
case TS_EXECUTE:
handleExecuteCommand(tsChannel, reinterpret_cast<char*>(data), incomingPacketSize - 1);
break;
case TS_PAGE_COMMAND:
handlePageSelectCommand(tsChannel);
break;
case TS_CHUNK_WRITE_COMMAND:
handleWriteChunkCommand(tsChannel, offset, count, data + sizeof(TunerStudioWriteChunkRequest));
break;
Expand Down
2 changes: 0 additions & 2 deletions firmware/console/binary/tunerstudio_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class TunerStudio : public TunerStudioBase {
*/
void handleQueryCommand(TsChannelBase* tsChannel, ts_response_format_e mode);
void handleExecuteCommand(TsChannelBase* tsChannel, char *data, int incomingPacketSize);
// does more or less nothing, we only handle the command to make frontend application happy
void handlePageSelectCommand(TsChannelBase *tsChannel);
void handleWriteChunkCommand(TsChannelBase* tsChannel, uint16_t offset, uint16_t count,
void *content);
void handleCrc32Check(TsChannelBase *tsChannel, uint16_t offset, uint16_t count);
Expand Down
2 changes: 0 additions & 2 deletions firmware/integration/rusefi_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,6 @@ end_struct
#define TS_PERF_TRACE_BEGIN '_'
#define TS_PERF_TRACE_GET_BUFFER 'b'

! 0x50 80
#define TS_PAGE_COMMAND 'P'
! 0x46
#define TS_COMMAND_F 'F'
#define TS_GET_PROTOCOL_VERSION_COMMAND_F 'F'
Expand Down
1 change: 0 additions & 1 deletion firmware/tunerstudio/tunerstudio.template.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enable2ndByteCanID = false
pageIdentifier = "\x00\x00"
pageReadCommand = "@@TS_READ_COMMAND_char@@%2o%2c"
burnCommand = "@@TS_BURN_COMMAND_char@@"
pageActivate = "@@TS_PAGE_COMMAND_char@@"
pageValueWrite = "@@TS_SINGLE_WRITE_COMMAND_char@@%2o%v"
pageChunkWrite = "@@TS_CHUNK_WRITE_COMMAND_char@@%2o%2c%v"
crc32CheckCommand = "@@TS_CRC_CHECK_COMMAND_char@@%2o%2c"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public class BinaryProtocol {

public static String findCommand(byte command) {
switch (command) {
case Fields.TS_PAGE_COMMAND:
return "PAGE";
case Fields.TS_COMMAND_F:
return "PROTOCOL";
case Fields.TS_CRC_CHECK_COMMAND:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ private void runProxy(LinkManager linkManager, Socket clientSocket, Context cont
stream.sendPacket((TS_OK + "rusEFI proxy").getBytes());
} else if (command == Fields.TS_CRC_CHECK_COMMAND) {
handleCrc(linkManager, stream);
} else if (command == Fields.TS_PAGE_COMMAND) {
stream.sendPacket(TS_OK.getBytes());
} else if (command == Fields.TS_READ_COMMAND) {
ByteRange byteRange = ByteRange.valueOf(payload);
handleRead(linkManager, byteRange, stream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ private static void handleCommand(EcuState ecuState, IoStream stream, IncomingDa
new HelloCommand(Fields.TS_SIGNATURE).handle(stream);
} else if (command == Fields.TS_GET_PROTOCOL_VERSION_COMMAND_F) {
stream.sendPacket((TS_OK + TS_PROTOCOL).getBytes());
} else if (command == Fields.TS_PAGE_COMMAND) {
stream.sendPacket(TS_OK.getBytes());
} else if (command == Fields.TS_CRC_CHECK_COMMAND) {
stream.sendPacket(BinaryProtocolServer.createCrcResponse(TOTALLY_EMPTY_CONFIGURATION));
} else if (command == Fields.TS_SET_LOGGER_SWITCH) {
Expand Down

0 comments on commit de4b157

Please sign in to comment.