Merge branch 'master' of https://github.com/rusefi/rusefi into second_can
This commit is contained in:
commit
c95cbcbb3e
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Mon Aug 03 20:50:06 UTC 2020
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Aug 05 03:19:46 UTC 2020
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -3532,4 +3532,4 @@ struct persistent_config_s {
|
|||
typedef struct persistent_config_s persistent_config_s;
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Mon Aug 03 20:50:06 UTC 2020
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Aug 05 03:19:46 UTC 2020
|
||||
|
|
|
@ -1075,8 +1075,8 @@
|
|||
#define showHumanReadableWarning_offset 976
|
||||
#define showSdCardWarning_offset 76
|
||||
#define SIGNATURE_BOARD kin
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1634949560
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 3559534882
|
||||
#define silentTriggerError_offset 1464
|
||||
#define slowAdcAlpha_offset 2088
|
||||
#define sparkDwellRpmBins_offset 332
|
||||
|
@ -1325,6 +1325,13 @@
|
|||
#define TS_RESPONSE_BURN_OK 4
|
||||
#define TS_RESPONSE_COMMAND_OK 7
|
||||
#define TS_RESPONSE_OK 0
|
||||
#define TS_SD_PROTOCOL_DO 1
|
||||
#define TS_SD_PROTOCOL_FETCH_COMPRESSED 8
|
||||
#define TS_SD_PROTOCOL_FETCH_DATA 0x14
|
||||
#define TS_SD_PROTOCOL_FETCH_INFO 0x11
|
||||
#define TS_SD_PROTOCOL_READ_DIR 2
|
||||
#define TS_SD_PROTOCOL_REMOVE_FILE 6
|
||||
#define TS_SD_PROTOCOL_RTC 7
|
||||
#define TS_SD_R_COMMAND 'r'
|
||||
#define TS_SD_W_COMMAND 'w'
|
||||
#define TS_SET_LOGGER_SWITCH 'l'
|
||||
|
@ -1346,7 +1353,7 @@
|
|||
#define ts_show_spi true
|
||||
#define ts_show_trigger_comparator true
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.kin.1634949560"
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.kin.3559534882"
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define tunerStudioSerialSpeed_offset 728
|
||||
#define twoWireBatchIgnition_offset 1476
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#pragma once
|
||||
#define VCS_DATE 20200804
|
||||
#define VCS_DATE 20200805
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -3532,4 +3532,4 @@ struct persistent_config_s {
|
|||
typedef struct persistent_config_s persistent_config_s;
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
// by class com.rusefi.output.FileFsioSettingsConsumer
|
||||
FSIO_SETTING_FANONTEMPERATURE = 1000,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
// by class com.rusefi.output.FileFsioSettingsConsumer
|
||||
case FSIO_SETTING_FANONTEMPERATURE:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
// by class com.rusefi.output.FileFsioSettingsConsumer
|
||||
static LENameOrdinalPair lefanOnTemperature(FSIO_SETTING_FANONTEMPERATURE, "cfg_fanOnTemperature");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
// by class com.rusefi.output.FileFsioSettingsConsumer
|
||||
case FSIO_SETTING_FANONTEMPERATURE:
|
||||
|
|
|
@ -1075,8 +1075,8 @@
|
|||
#define showHumanReadableWarning_offset 976
|
||||
#define showSdCardWarning_offset 76
|
||||
#define SIGNATURE_BOARD all
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1319574552
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 4227757186
|
||||
#define silentTriggerError_offset 1464
|
||||
#define slowAdcAlpha_offset 2088
|
||||
#define sparkDwellRpmBins_offset 332
|
||||
|
@ -1325,6 +1325,13 @@
|
|||
#define TS_RESPONSE_BURN_OK 4
|
||||
#define TS_RESPONSE_COMMAND_OK 7
|
||||
#define TS_RESPONSE_OK 0
|
||||
#define TS_SD_PROTOCOL_DO 1
|
||||
#define TS_SD_PROTOCOL_FETCH_COMPRESSED 8
|
||||
#define TS_SD_PROTOCOL_FETCH_DATA 0x14
|
||||
#define TS_SD_PROTOCOL_FETCH_INFO 0x11
|
||||
#define TS_SD_PROTOCOL_READ_DIR 2
|
||||
#define TS_SD_PROTOCOL_REMOVE_FILE 6
|
||||
#define TS_SD_PROTOCOL_RTC 7
|
||||
#define TS_SD_R_COMMAND 'r'
|
||||
#define TS_SD_W_COMMAND 'w'
|
||||
#define TS_SET_LOGGER_SWITCH 'l'
|
||||
|
@ -1346,7 +1353,7 @@
|
|||
#define ts_show_spi true
|
||||
#define ts_show_trigger_comparator false
|
||||
#define ts_show_tunerstudio_port true
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.all.1319574552"
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.all.4227757186"
|
||||
#define TS_SINGLE_WRITE_COMMAND 'W'
|
||||
#define tunerStudioSerialSpeed_offset 728
|
||||
#define twoWireBatchIgnition_offset 1476
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD all
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1319574552
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.all.1319574552"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 4227757186
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.all.4227757186"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD frankenso_na6
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1925900737
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.frankenso_na6.1925900737"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 3348332891
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.frankenso_na6.3348332891"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD kin
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1634949560
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.kin.1634949560"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 3559534882
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.kin.3559534882"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD mre_f4
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 3853734828
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.mre_f4.3853734828"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 1357527862
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.mre_f4.1357527862"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD mre_f7
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 3853734828
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.mre_f7.3853734828"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 1357527862
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.mre_f7.1357527862"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD prometheus_405
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1498504614
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.prometheus_405.1498504614"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 3959960892
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.prometheus_405.3959960892"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD prometheus_469
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 1498504614
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.prometheus_469.1498504614"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 3959960892
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.prometheus_469.3959960892"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD proteus_f4
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 568128749
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.proteus_f4.568128749"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 2491784311
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.proteus_f4.2491784311"
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_BOARD proteus_f7
|
||||
#define SIGNATURE_DATE 2020.08.03
|
||||
#define SIGNATURE_HASH 568128749
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.03.proteus_f7.568128749"
|
||||
#define SIGNATURE_DATE 2020.08.05
|
||||
#define SIGNATURE_HASH 2491784311
|
||||
#define TS_SIGNATURE "rusEFI 2020.08.05.proteus_f7.2491784311"
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
# Andrey Belomutskiy, (c) 2012-2017
|
||||
#
|
||||
|
||||
# different way to have the same result would be using "self"
|
||||
# (self and (coolant > fan_off_setting)) | (coolant > fan_on_setting) | is_clt_broken
|
||||
FAN_CONTROL_LOGIC=(fan and (coolant > fan_off_setting)) | (coolant > fan_on_setting) | is_clt_broken
|
||||
|
||||
FUEL_PUMP_LOGIC=(time_since_boot < startup_fuel_pump_duration) | (rpm > 0)
|
||||
|
|
|
@ -1664,6 +1664,14 @@ end_struct
|
|||
#define TS_SD_R_COMMAND 'r'
|
||||
#define TS_SD_W_COMMAND 'w'
|
||||
|
||||
#define TS_SD_PROTOCOL_RTC 7
|
||||
#define TS_SD_PROTOCOL_FETCH_INFO 0x11
|
||||
#define TS_SD_PROTOCOL_FETCH_DATA 0x14
|
||||
#define TS_SD_PROTOCOL_DO 1
|
||||
#define TS_SD_PROTOCOL_READ_DIR 2
|
||||
#define TS_SD_PROTOCOL_REMOVE_FILE 6
|
||||
#define TS_SD_PROTOCOL_FETCH_COMPRESSED 8
|
||||
|
||||
// High speed logger commands
|
||||
#define TS_SET_LOGGER_SWITCH 'l'
|
||||
#define TS_GET_LOGGER_GET_BUFFER 'L'
|
||||
|
|
Binary file not shown.
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.all.1319574552"
|
||||
signature = "rusEFI 2020.08.05.all.4227757186"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.all.1319574552" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.all.4227757186" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.frankenso_na6.1925900737"
|
||||
signature = "rusEFI 2020.08.05.frankenso_na6.3348332891"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.frankenso_na6.1925900737" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.frankenso_na6.3348332891" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:50:00 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:40 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.kin.1634949560"
|
||||
signature = "rusEFI 2020.08.05.kin.3559534882"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.kin.1634949560" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.kin.3559534882" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Mon Aug 03 20:50:06 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on kinetis_gen_config.bat integration/rusefi_config.txt Wed Aug 05 03:19:46 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.mre_f4.3853734828"
|
||||
signature = "rusEFI 2020.08.05.mre_f4.1357527862"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.mre_f4.3853734828" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.mre_f4.1357527862" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:59 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:38 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.mre_f7.3853734828"
|
||||
signature = "rusEFI 2020.08.05.mre_f7.1357527862"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.mre_f7.3853734828" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.mre_f7.1357527862" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:55 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:37 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.prometheus_405.1498504614"
|
||||
signature = "rusEFI 2020.08.05.prometheus_405.3959960892"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.prometheus_405.1498504614" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.prometheus_405.3959960892" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:50:03 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:42 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.prometheus_469.1498504614"
|
||||
signature = "rusEFI 2020.08.05.prometheus_469.3959960892"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.prometheus_469.1498504614" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.prometheus_469.3959960892" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:50:02 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:41 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.proteus_f4.568128749"
|
||||
signature = "rusEFI 2020.08.05.proteus_f4.2491784311"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.proteus_f4.568128749" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.proteus_f4.2491784311" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:50:05 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:45 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -33,12 +33,12 @@ enable2ndByteCanID = false
|
|||
|
||||
[MegaTune]
|
||||
; https://rusefi.com/forum/viewtopic.php?p=36201#p36201
|
||||
signature = "rusEFI 2020.08.03.proteus_f7.568128749"
|
||||
signature = "rusEFI 2020.08.05.proteus_f7.2491784311"
|
||||
|
||||
[TunerStudio]
|
||||
queryCommand = "S"
|
||||
versionInfo = "V" ; firmwave version for title bar.
|
||||
signature = "rusEFI 2020.08.03.proteus_f7.568128749" ; signature is expected to be 7 or more characters.
|
||||
signature = "rusEFI 2020.08.05.proteus_f7.2491784311" ; signature is expected to be 7 or more characters.
|
||||
|
||||
[Constants]
|
||||
; new packet serial format with CRC
|
||||
|
@ -76,7 +76,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:50:04 UTC 2020
|
||||
; this section was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:44 UTC 2020
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
|
|
@ -40,7 +40,7 @@ public class SerialAutoChecker implements Runnable {
|
|||
IncomingDataBuffer incomingData = stream.getDataBuffer();
|
||||
try {
|
||||
HelloCommand.send(stream);
|
||||
byte[] response = incomingData.getPacket("", false);
|
||||
byte[] response = incomingData.getPacket("");
|
||||
if (!checkResponseCode(response, BinaryProtocolCommands.RESPONSE_OK))
|
||||
return;
|
||||
String signature = new String(response, 1, response.length - 1);
|
||||
|
|
|
@ -46,6 +46,10 @@ public class IncomingDataBuffer {
|
|||
return incomingData;
|
||||
}
|
||||
|
||||
public byte[] getPacket(String msg) throws EOFException {
|
||||
return getPacket(msg, false, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public byte[] getPacket(String msg, boolean allowLongResponse) throws EOFException {
|
||||
return getPacket(msg, allowLongResponse, System.currentTimeMillis());
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ public interface IoStream extends WriteStream, Closeable, StreamStatistics {
|
|||
Logging log = getLogging(IoStream.class);
|
||||
|
||||
static String printHexBinary(byte[] data) {
|
||||
if (data == null)
|
||||
return "(null)";
|
||||
char[] hexCode = "0123456789ABCDEF".toCharArray();
|
||||
|
||||
StringBuilder r = new StringBuilder(data.length * 2);
|
||||
|
|
|
@ -25,7 +25,7 @@ public class HelloCommand implements Command {
|
|||
|
||||
@Nullable
|
||||
public static String getHelloResponse(IncomingDataBuffer incomingData) throws EOFException {
|
||||
byte[] response = incomingData.getPacket("[hello]", false);
|
||||
byte[] response = incomingData.getPacket("[hello]");
|
||||
if (!checkResponseCode(response, BinaryProtocolCommands.RESPONSE_OK))
|
||||
return null;
|
||||
return new String(response, 1, response.length - 1);
|
||||
|
|
|
@ -34,6 +34,7 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
* This class makes rusEfi console a proxy for other tuning software, this way we can have two tools connected via same
|
||||
* serial port simultaneously
|
||||
*
|
||||
* See BinaryProtocolServerSandbox
|
||||
* @author Andrey Belomutskiy
|
||||
* 11/24/15
|
||||
*/
|
||||
|
@ -213,18 +214,18 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
|
||||
private void handleSD_W_command(TcpIoStream stream, Packet packet, byte[] payload) throws IOException {
|
||||
log.info("TS_SD: 'w' " + IoStream.printHexBinary(packet.packet));
|
||||
if (payload[1] == 0 && payload[2] == 0x11) {
|
||||
if (payload[1] == 0 && payload[2] == TS_SD_PROTOCOL_FETCH_INFO) {
|
||||
|
||||
if (payload[6] == 1) {
|
||||
if (payload[6] == TS_SD_PROTOCOL_DO) {
|
||||
log.info("TS_SD: do command, command=" + payload[payload.length - 1]);
|
||||
sendOkResponse(stream);
|
||||
} else if (payload[6] == 2) {
|
||||
} else if (payload[6] == TS_SD_PROTOCOL_READ_DIR) {
|
||||
log.info("TS_SD: read directory command " + payload[payload.length - 1]);
|
||||
sendOkResponse(stream);
|
||||
} else if (payload[6] == 6) {
|
||||
} else if (payload[6] == TS_SD_PROTOCOL_REMOVE_FILE) {
|
||||
log.info("TS_SD: remove file command " + Arrays.toString(packet.packet));
|
||||
sendOkResponse(stream);
|
||||
} else if (payload[6] == 8) {
|
||||
} else if (payload[6] == TS_SD_PROTOCOL_FETCH_COMPRESSED) {
|
||||
log.info("TS_SD: read compressed file command " + Arrays.toString(packet.packet));
|
||||
ByteBuffer bb = ByteBuffer.wrap(payload, 7, 8);
|
||||
bb.order(ByteOrder.BIG_ENDIAN);
|
||||
|
@ -232,6 +233,8 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
int sectorCount = bb.getInt();
|
||||
log.info("TS_SD: sectorNumber=" + sectorNumber + ", sectorCount=" + sectorCount);
|
||||
sendOkResponse(stream);
|
||||
} else {
|
||||
log.info("TS_SD: Got unexpected w fetch " + IoStream.printHexBinary(packet.packet));
|
||||
}
|
||||
} else {
|
||||
log.info("TS_SD: Got unexpected w " + IoStream.printHexBinary(packet.packet));
|
||||
|
@ -240,11 +243,11 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
|
||||
private void handleSD_R_command(TcpIoStream stream, Packet packet, byte[] payload) throws IOException {
|
||||
log.info("TS_SD: 'r' " + IoStream.printHexBinary(packet.packet));
|
||||
if (payload[1] == 0 && payload[2] == 7) {
|
||||
if (payload[1] == 0 && payload[2] == TS_SD_PROTOCOL_RTC) {
|
||||
log.info("TS_SD: RTC read command");
|
||||
byte[] response = new byte[9];
|
||||
stream.sendPacket(response);
|
||||
} else if (payload[1] == 0 && payload[2] == 0x11) {
|
||||
} else if (payload[1] == 0 && payload[2] == TS_SD_PROTOCOL_FETCH_INFO) {
|
||||
ByteBuffer bb = ByteBuffer.wrap(payload, 5, 2);
|
||||
bb.order(ByteOrder.BIG_ENDIAN);
|
||||
int bufferLength = bb.getShort();
|
||||
|
@ -268,7 +271,7 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
|
||||
response[9] = 0;
|
||||
response[10] = 1; // number of files
|
||||
} else {
|
||||
} else if (bufferLength == 0x202){
|
||||
// SD read directory command
|
||||
//
|
||||
|
||||
|
@ -289,9 +292,12 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
|||
// response[1 + 30] = (byte) 1;
|
||||
// response[1 + 31] = (byte) 0; // size
|
||||
|
||||
} else {
|
||||
log.info("TS_SD: Got unexpected r fetch " + IoStream.printHexBinary(packet.packet));
|
||||
return;
|
||||
}
|
||||
stream.sendPacket(response);
|
||||
} else if (payload[1] == 0 && payload[2] == 0x14) {
|
||||
} else if (payload[1] == 0 && payload[2] == TS_SD_PROTOCOL_FETCH_DATA) {
|
||||
ByteBuffer bb = ByteBuffer.wrap(payload, 3, 4);
|
||||
bb.order(ByteOrder.BIG_ENDIAN);
|
||||
int blockNumber = bb.getShort();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Mon Aug 03 20:49:50 UTC 2020
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh integration/rusefi_config.txt Wed Aug 05 03:19:35 UTC 2020
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -177,6 +177,7 @@ public class Fields {
|
|||
public static final int camInputs3_offset = 558;
|
||||
public static final int camInputs4_offset = 559;
|
||||
public static final int can2BaudRate_offset = 2110;
|
||||
public static final int CAN_DEFAULT_BASE = 0x200;
|
||||
public static final int canBaudRate_offset = 2108;
|
||||
public static final int canNbcType_offset = 480;
|
||||
public static final int canReadEnabled_offset = 1464;
|
||||
|
@ -1057,7 +1058,6 @@ public class Fields {
|
|||
public static final int servoOutputPins8_offset = 3147;
|
||||
public static final int showHumanReadableWarning_offset = 976;
|
||||
public static final int showSdCardWarning_offset = 76;
|
||||
public static final int SIGNATURE_HASH = 1319574552;
|
||||
public static final int silentTriggerError_offset = 1464;
|
||||
public static final int slowAdcAlpha_offset = 2088;
|
||||
public static final int sparkDwellRpmBins_offset = 332;
|
||||
|
@ -1303,10 +1303,17 @@ public class Fields {
|
|||
public static final int TS_RESPONSE_BURN_OK = 4;
|
||||
public static final int TS_RESPONSE_COMMAND_OK = 7;
|
||||
public static final int TS_RESPONSE_OK = 0;
|
||||
public static final int TS_SD_PROTOCOL_DO = 1;
|
||||
public static final int TS_SD_PROTOCOL_FETCH_COMPRESSED = 8;
|
||||
public static final int TS_SD_PROTOCOL_FETCH_DATA = 0x14;
|
||||
public static final int TS_SD_PROTOCOL_FETCH_INFO = 0x11;
|
||||
public static final int TS_SD_PROTOCOL_READ_DIR = 2;
|
||||
public static final int TS_SD_PROTOCOL_REMOVE_FILE = 6;
|
||||
public static final int TS_SD_PROTOCOL_RTC = 7;
|
||||
public static final char TS_SD_R_COMMAND = 'r';
|
||||
public static final char TS_SD_W_COMMAND = 'w';
|
||||
public static final char TS_SET_LOGGER_SWITCH = 'l';
|
||||
public static final String TS_SIGNATURE = "rusEFI 2020.08.03.all.1319574552";
|
||||
public static final String TS_SIGNATURE = "rusEFI 2020.08.05.all.4227757186";
|
||||
public static final char TS_SINGLE_WRITE_COMMAND = 'W';
|
||||
public static final int tunerStudioSerialSpeed_offset = 728;
|
||||
public static final int twoWireBatchIgnition_offset = 1476;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<roms>
|
||||
|
||||
<!-- was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh Mon Aug 03 20:49:51 UTC 2020 -->
|
||||
<!-- was generated automatically by rusEfi tool ConfigDefinition.jar based on gen_config.sh Wed Aug 05 03:19:36 UTC 2020 -->
|
||||
|
||||
<rom>
|
||||
<romid>
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
<component name="libraryTable">
|
||||
<library name="jsr305-2.0.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../java_console/lib/jsr305-2.0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$PROJECT_DIR$/../../java_console/lib/jsr305-2.0.1.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -15,7 +15,7 @@
|
|||
debug="true"
|
||||
target="${javac.target}"
|
||||
destdir="build/classes"
|
||||
classpath="lib/junit.jar:../../java_console/lib/annotations.jar:lib/snakeyaml.jar">
|
||||
classpath="../../java_console/lib/jsr305-2.0.1.jar:lib/junit.jar:../../java_console/lib/annotations.jar:lib/snakeyaml.jar">
|
||||
<src path="src"/>
|
||||
<src path="${console_path}/autoupdate/src"/>
|
||||
<src path="${console_path}/inifile/src"/>
|
||||
|
|
|
@ -17,7 +17,8 @@ import static com.rusefi.ReaderState.MULT_TOKEN;
|
|||
public class VariableRegistry {
|
||||
private static final String _16_HEX_SUFFIX = "_16_hex";
|
||||
private static final String _HEX_SUFFIX = "_hex";
|
||||
private TreeMap<String, String> data = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||
private static final String HEX_PREFIX = "0x";
|
||||
private final TreeMap<String, String> data = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||
public static final VariableRegistry INSTANCE = new VariableRegistry();
|
||||
|
||||
private final Pattern VAR = Pattern.compile("(@@(.*?)@@)");
|
||||
|
@ -85,6 +86,13 @@ public class VariableRegistry {
|
|||
|
||||
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
|
||||
private void tryToRegisterAsInteger(String var, String value) {
|
||||
if (value.trim().startsWith(HEX_PREFIX)) {
|
||||
int intValue = Integer.parseInt(value.trim().substring(HEX_PREFIX.length()), 16);
|
||||
intValues.put(var, intValue);
|
||||
javaDefinitions.put(var, "\tpublic static final int " + var + " = " + value + ";" + EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
int intValue = Integer.parseInt(value);
|
||||
SystemOut.println("key [" + var + "] value: " + intValue);
|
||||
|
|
|
@ -121,6 +121,25 @@ public class ConfigFieldParserTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefine() throws IOException {
|
||||
VariableRegistry.INSTANCE.clear();
|
||||
ReaderState state = new ReaderState();
|
||||
String test =
|
||||
"#define ERROR_BUFFER_SIZE 120\n" +
|
||||
"#define ERROR_BUFFER_SIZE_H 0x120\n" +
|
||||
"";
|
||||
BufferedReader reader = new BufferedReader(new StringReader(test));
|
||||
|
||||
JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);
|
||||
state.readBufferedReader(reader, Arrays.asList(javaFieldsConsumer));
|
||||
|
||||
assertEquals("\tpublic static final int ERROR_BUFFER_SIZE = 120;\n" +
|
||||
"\tpublic static final int ERROR_BUFFER_SIZE_H = 0x120;\n" +
|
||||
"",
|
||||
VariableRegistry.INSTANCE.getJavaConstants());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFsioVisible() throws IOException {
|
||||
{
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
package com.rusefi.ts_plugin;
|
||||
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.io.ConnectionStateListener;
|
||||
import com.rusefi.io.IoStream;
|
||||
import com.rusefi.io.LinkManager;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
|
||||
import static com.rusefi.config.generated.Fields.TS_SD_PROTOCOL_FETCH_INFO;
|
||||
|
||||
public class ConnectPanel {
|
||||
private final JPanel content = new JPanel(new BorderLayout());
|
||||
|
||||
private LinkManager controllerConnector;
|
||||
|
||||
public ConnectPanel() {
|
||||
JPanel flow = new JPanel(new FlowLayout());
|
||||
|
||||
|
||||
JButton connect = new JButton("Connect");
|
||||
connect.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
controllerConnector = new LinkManager()
|
||||
.setCompositeLogicEnabled(false)
|
||||
.setNeedPullData(false);
|
||||
|
||||
controllerConnector.startAndConnect(":2390", ConnectionStateListener.VOID);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
JButton poke = new JButton("poke");
|
||||
poke.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
byte[] packet;
|
||||
byte[] response;
|
||||
IoStream stream = controllerConnector.getConnector().getBinaryProtocol().getStream();
|
||||
|
||||
packet = new byte[3];
|
||||
packet[0] = Fields.TS_SD_R_COMMAND;
|
||||
packet[2] = Fields.TS_SD_PROTOCOL_RTC;
|
||||
stream.sendPacket(packet);
|
||||
response = stream.getDataBuffer().getPacket("RTC status");
|
||||
System.out.println("RTC response " + IoStream.printHexBinary(response));
|
||||
|
||||
|
||||
packet = new byte[17];
|
||||
packet[0] = Fields.TS_SD_W_COMMAND;
|
||||
packet[2] = TS_SD_PROTOCOL_FETCH_INFO;
|
||||
packet[6] = Fields.TS_SD_PROTOCOL_READ_DIR;
|
||||
stream.sendPacket(packet);
|
||||
response = stream.getDataBuffer().getPacket("read dir command");
|
||||
System.out.println("read dir command " + IoStream.printHexBinary(response));
|
||||
|
||||
|
||||
packet = new byte[8];
|
||||
packet[0] = Fields.TS_SD_R_COMMAND;
|
||||
packet[1] = 0;
|
||||
packet[2] = TS_SD_PROTOCOL_FETCH_INFO;
|
||||
packet[5] = 0x02;
|
||||
packet[6] = 0x02;
|
||||
stream.sendPacket(packet);
|
||||
response = stream.getDataBuffer().getPacket("read command", true);
|
||||
System.out.println("read command " + IoStream.printHexBinary(response));
|
||||
|
||||
|
||||
} catch (IOException ioException) {
|
||||
ioException.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
flow.add(connect);
|
||||
flow.add(poke);
|
||||
|
||||
content.add(flow);
|
||||
}
|
||||
|
||||
public JComponent getContent() {
|
||||
return content;
|
||||
}
|
||||
}
|
|
@ -47,6 +47,7 @@ public class PluginEntry implements TsPluginBody {
|
|||
tabbedPane.addTab("Upload", uploadTab.getContent());
|
||||
tabbedPane.addTab("Broadcast", broadcastTab.getContent());
|
||||
tabbedPane.addTab("Remote ECU", remoteTab.getContent());
|
||||
tabbedPane.addTab("Read SD Card", new SdCardReader().getContent());
|
||||
content.add(tabbedPane);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package com.rusefi.ts_plugin;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class SdCardReader {
|
||||
private final JPanel content = new JPanel();
|
||||
|
||||
public SdCardReader() {
|
||||
content.add(new ConnectPanel().getContent());
|
||||
}
|
||||
|
||||
public Component getContent() {
|
||||
return content;
|
||||
}
|
||||
}
|
|
@ -111,6 +111,39 @@ TEST(fsio, testIfFunction) {
|
|||
testExpression("1 22 33 if", 22);
|
||||
}
|
||||
|
||||
TEST(fsio, testHysteresisSelf) {
|
||||
WITH_ENGINE_TEST_HELPER(FORD_INLINE_6_1995);
|
||||
|
||||
LEElement thepool[TEST_POOL_SIZE];
|
||||
LEElementPool pool(thepool, TEST_POOL_SIZE);
|
||||
// value ON: 450
|
||||
// value OFF: 400
|
||||
// Human formula: (self and (rpm > 400)) | (rpm > 450)
|
||||
LEElement * element = pool.parseExpression("self rpm 400 > and rpm 450 > |");
|
||||
ASSERT_TRUE(element != NULL) << "Not NULL expected";
|
||||
|
||||
LECalculator c;
|
||||
double selfValue = 0;
|
||||
|
||||
engine->fsioState.mockRpm = 0;
|
||||
selfValue = c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ(0, selfValue);
|
||||
|
||||
engine->fsioState.mockRpm = 430;
|
||||
selfValue = c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
// OFF since not ON yet
|
||||
ASSERT_EQ(0, selfValue);
|
||||
|
||||
engine->fsioState.mockRpm = 460;
|
||||
selfValue = c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ(1, selfValue);
|
||||
|
||||
engine->fsioState.mockRpm = 430;
|
||||
selfValue = c.getValue2(selfValue, element PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
// OFF since was ON yet
|
||||
ASSERT_EQ(1, selfValue);
|
||||
}
|
||||
|
||||
TEST(fsio, testLogicExpressions) {
|
||||
testParsing();
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue