TS SD integration #1653
This commit is contained in:
parent
a8ba5311f2
commit
3b8525b521
|
@ -208,7 +208,7 @@ void handleTsR(ts_channel_s *tsChannel, char *input) {
|
||||||
uint16_t blockNumber = SWAP_UINT16(data16[1]);
|
uint16_t blockNumber = SWAP_UINT16(data16[1]);
|
||||||
scheduleMsg(&sharedLogger, "TS_SD: fetch data command blockNumber=%d", blockNumber);
|
scheduleMsg(&sharedLogger, "TS_SD: fetch data command blockNumber=%d", blockNumber);
|
||||||
|
|
||||||
int offset = blockNumber * TRANSFER_SIZE;
|
// int offset = blockNumber * TRANSFER_SIZE;
|
||||||
|
|
||||||
buffer[0] = input[2];
|
buffer[0] = input[2];
|
||||||
buffer[1] = input[3];
|
buffer[1] = input[3];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.rusefi.ts_plugin;
|
package com.rusefi.ts_plugin;
|
||||||
|
|
||||||
|
import com.rusefi.autodetect.PortDetector;
|
||||||
import com.rusefi.io.ConnectionStateListener;
|
import com.rusefi.io.ConnectionStateListener;
|
||||||
import com.rusefi.io.LinkManager;
|
import com.rusefi.io.LinkManager;
|
||||||
|
|
||||||
|
@ -40,8 +41,15 @@ public class ConnectPanel {
|
||||||
.setCompositeLogicEnabled(false)
|
.setCompositeLogicEnabled(false)
|
||||||
.setNeedPullData(false);
|
.setNeedPullData(false);
|
||||||
|
|
||||||
//controllerConnector.startAndConnect(":2390", ConnectionStateListener.VOID);
|
String autoDetectedPort = PortDetector.autoDetectSerial(null);
|
||||||
controllerConnector.startAndConnect(":29001", new ConnectionStateListener() {
|
if (autoDetectedPort == null) {
|
||||||
|
status.setText("rusEFI not detected");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//":2390"
|
||||||
|
//String port = ":29001";
|
||||||
|
controllerConnector.startAndConnect(autoDetectedPort, new ConnectionStateListener() {
|
||||||
public void onConnectionEstablished() {
|
public void onConnectionEstablished() {
|
||||||
status.setText("Connected to rusEFI");
|
status.setText("Connected to rusEFI");
|
||||||
disconnect.setEnabled(true);
|
disconnect.setEnabled(true);
|
||||||
|
|
Loading…
Reference in New Issue