refactoring
This commit is contained in:
parent
fd247c7899
commit
2bcd8e3025
|
@ -33,16 +33,11 @@ typedef enum {
|
|||
TS_CRC = 1
|
||||
} ts_response_format_e;
|
||||
|
||||
// see 'blockingFactor' in rusefi.ini todo: move to rusefi_config.txt
|
||||
// see BLOCKING_FACTOR in java console code
|
||||
#define BLOCKING_FACTOR 400
|
||||
|
||||
typedef struct {
|
||||
BaseChannel * channel;
|
||||
uint8_t writeBuffer[7]; // size(2 bytes) + response(1 byte) + crc32 (4 bytes)
|
||||
/**
|
||||
* we use 'blockingFactor = 320' in rusefi.ini
|
||||
* todo: should we just do (320 + CRC_WRAPPING_SIZE) ?
|
||||
* See 'blockingFactor' in rusefi.ini
|
||||
*/
|
||||
char crcReadBuffer[BLOCKING_FACTOR + 30];
|
||||
} ts_channel_s;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#define ignitionPin11logic
|
||||
#define ignitionPin12logic
|
||||
#define LE_COMMAND_LENGTH 200
|
||||
#define BLOCKING_FACTOR 400
|
||||
#define FSIO_ADC_COUNT 4
|
||||
#define TS_OUTPUT_SIZE 356
|
||||
#define TS_FILE_VERSION 20161225
|
||||
|
|
|
@ -30,6 +30,9 @@ struct_no_prefix engine_configuration_s
|
|||
! todo there is still a spot where this 200 is hard-coded
|
||||
#define LE_COMMAND_LENGTH 200
|
||||
|
||||
! see 'blockingFactor' in rusefi.ini
|
||||
#define BLOCKING_FACTOR 400
|
||||
|
||||
#define FSIO_ADC_COUNT 4
|
||||
|
||||
! this is here so that rusEfi console can access it, too
|
||||
|
|
|
@ -33,18 +33,18 @@ import static com.rusefi.binaryprotocol.IoHelper.*;
|
|||
*/
|
||||
public class BinaryProtocol {
|
||||
|
||||
private static final String PROTOCOL_PLAIN = "protocol.plain";
|
||||
private static final String USE_PLAIN_PROTOCOL_PROPERTY = "protocol.plain";
|
||||
/**
|
||||
* This properly allows to switch to non-CRC32 mode
|
||||
* todo: finish this feature, assuming we even need it.
|
||||
*/
|
||||
private static boolean PLAIN_PROTOCOL = Boolean.getBoolean(PROTOCOL_PLAIN);
|
||||
private static boolean PLAIN_PROTOCOL = Boolean.getBoolean(USE_PLAIN_PROTOCOL_PROPERTY);
|
||||
static {
|
||||
FileLog.MAIN.logLine(PROTOCOL_PLAIN + ": " + PLAIN_PROTOCOL);
|
||||
FileLog.MAIN.logLine(USE_PLAIN_PROTOCOL_PROPERTY + ": " + PLAIN_PROTOCOL);
|
||||
}
|
||||
|
||||
// see BLOCKING_FACTOR in firmware code
|
||||
private static final int BLOCKING_FACTOR = 400;
|
||||
private static final int BLOCKING_FACTOR = Fields.BLOCKING_FACTOR;
|
||||
private static final byte RESPONSE_OK = 0;
|
||||
private static final byte RESPONSE_BURN_OK = 0x04;
|
||||
private static final byte RESPONSE_COMMAND_OK = 0x07;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Jun 19 11:17:25 MSK 2017
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Wed Jun 21 07:10:43 MSK 2017
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int BLOCKING_FACTOR = 400;
|
||||
public static final int FSIO_ADC_COUNT = 4;
|
||||
public static final int TS_OUTPUT_SIZE = 356;
|
||||
public static final int TS_FILE_VERSION = 20161225;
|
||||
|
|
Loading…
Reference in New Issue