Show cams in TS trigger logger #2496
This commit is contained in:
parent
56b79da839
commit
29017946ca
|
@ -1,9 +1,11 @@
|
|||
package com.rusefi.binaryprotocol.test;
|
||||
|
||||
import com.macfaq.io.LittleEndianOutputStream;
|
||||
import com.rusefi.CompatibleFunction;
|
||||
import com.rusefi.Listener;
|
||||
import com.rusefi.binaryprotocol.BinaryProtocol;
|
||||
import com.rusefi.binaryprotocol.IncomingDataBuffer;
|
||||
import com.rusefi.binaryprotocol.IoHelper;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.TsOutputs;
|
||||
import com.rusefi.io.IoStream;
|
||||
|
@ -13,6 +15,7 @@ import com.rusefi.io.tcp.TcpIoStream;
|
|||
import com.rusefi.ui.StatusConsumer;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
|
@ -99,7 +102,22 @@ public class TcpServerSandbox {
|
|||
} else if (command == Fields.TS_CRC_CHECK_COMMAND) {
|
||||
stream.sendPacket(BinaryProtocolServer.createCrcResponse(TOTALLY_EMPTY_CONFIGURATION));
|
||||
} else if (command == Fields.TS_SET_LOGGER_SWITCH) {
|
||||
stream.sendPacket(TS_OK.getBytes());
|
||||
} else if (command == Fields.TS_GET_LOGGER_GET_BUFFER) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
baos.write(TS_OK.charAt(0));
|
||||
LittleEndianOutputStream dout = new LittleEndianOutputStream(baos);
|
||||
int count = 256;
|
||||
dout.writeShort(count * 5);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
baos.write(i);
|
||||
baos.write(0);
|
||||
baos.write(0);
|
||||
baos.write(0);
|
||||
baos.write(100);
|
||||
}
|
||||
stream.sendPacket(baos.toByteArray());
|
||||
} else if (command == Fields.TS_OUTPUT_COMMAND) {
|
||||
byte[] response = getOutputCommandResponse(payload, ecuState.outputs);
|
||||
stream.sendPacket(response);
|
||||
|
|
Loading…
Reference in New Issue