From f3f7910d58d7c3b87b84d13c15ecf7d0643c5078 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 30 Mar 2015 10:10:23 -0500 Subject: [PATCH] auto-sync --- firmware/console/binary/tunerstudio.cpp | 4 ++-- firmware/gen_config.bat | 2 +- firmware/integration/rusefi_config.txt | 9 +++++++++ firmware/rusefi.cpp | 4 ++-- firmware/tunerstudio/rusefi.ini | 6 +++--- java_console/io/src/com/rusefi/TsPageSize.java | 5 +++++ .../io/src/com/rusefi/binaryprotocol/BinaryProtocol.java | 1 - java_console/io/src/com/rusefi/io/serial/PortHolder.java | 4 ++-- .../src/com/rusefi/binaryprotocol/BinaryProtocolCmd.java | 7 ++----- 9 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 java_console/io/src/com/rusefi/TsPageSize.java diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 550000e173..9a68de8284 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -272,9 +272,9 @@ void handleCrc32Check(ts_channel_s *tsChannel, ts_response_format_e mode, uint16 count = SWAP_UINT16(count); - count = 14008; + count = getTunerStudioPageSize(pageId); - scheduleMsg(&tsLogger, "CRC32 request: offset %d size %d", offset, count); + scheduleMsg(&tsLogger, "CRC32 request: pageId %d offset %d size %d", pageId, offset, count); uint32_t crc = SWAP_UINT32(crc32((void * ) getWorkingPageAddr(0), count)); diff --git a/firmware/gen_config.bat b/firmware/gen_config.bat index 21be10ec01..4969cbd5c1 100644 --- a/firmware/gen_config.bat +++ b/firmware/gen_config.bat @@ -1,2 +1,2 @@ -java -jar ../java_tools/ConfigDefinition.jar integration tunerstudio controllers\algo \ No newline at end of file +java -jar ../java_tools/ConfigDefinition.jar integration tunerstudio controllers\algo ../java_console/io/src diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 6915b885c2..f44c32d958 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -516,6 +516,15 @@ fuel_table_t injectionPhase; float[FUEL_LOAD_COUNT] injPhaseLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 float[FUEL_RPM_COUNT] injPhaseRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 +! ignition_table_t ignitionIatCorrTable; +! float[IGN_LOAD_COUNT] ignitionIatCorrLoadBins;;"Load", 1, 0.0, 0, 300.0, 2 +! float[IGN_RPM_COUNT] ignitionIatCorrRpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 + + +! float[IAT_CURVE_SIZE] iatIdleCorrBins;;"C", 1, 0, -100.0, 250.0, 2 +! float[IAT_CURVE_SIZE] iatIdleCorr;;"%", 100, 0, 0.0, 500.0, 2 + + ! ve_table_t ve2Table; ! float[FUEL_LOAD_COUNT] ve2LoadBins;;"%", 1, 0.0, 0, 300.0, 2 ! float[FUEL_RPM_COUNT] ve2RpmBins;;"RPM", 1, 0.0, 0, 18000.0, 2 diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index e47ff2210e..2f1fb4cc9b 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -269,12 +269,12 @@ void firmwareError(const char *errorMsg, ...) { static char UNUSED_RAM_SIZE[2999]; -static char UNUSED_CCM_SIZE[4900] CCM_OPTIONAL; +static char UNUSED_CCM_SIZE[3600] CCM_OPTIONAL; int getRusEfiVersion(void) { if (UNUSED_RAM_SIZE[0]== 0) return 1; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] == 0) return 1; // this is here to make the compiler happy about the unused array - return 20150329; + return 20150330; } diff --git a/firmware/tunerstudio/rusefi.ini b/firmware/tunerstudio/rusefi.ini index 8d470fde52..7f8946acc1 100644 --- a/firmware/tunerstudio/rusefi.ini +++ b/firmware/tunerstudio/rusefi.ini @@ -13,8 +13,7 @@ enable2ndByteCanID = false endianness = little nPages = 1 - - pageSize = 14008 + pageIdentifier = "\x00\x00" pageReadCommand = "R\x00\x00%2o%2c" @@ -41,8 +40,9 @@ enable2ndByteCanID = false ; see PAGE_0_SIZE in C source code ; CONFIG_DEFINITION_START -; this section was generated by ConfigDefinition.jar on Sun Mar 29 20:08:13 EDT 2015 +; this section was generated by ConfigDefinition.jar on Mon Mar 30 10:47:35 EDT 2015 +pageSize = 14008 page = 1 engineType = bits, S32, 0, [0:2], "AUDI_AAN", "DODGE_NEON_1995", "FORD_ASPIRE_1996", "FORD_FIESTA", "NISSAN_PRIMERA", "HONDA_ACCORD", "FORD_INLINE_6_1995", "GY6_139QMB" ;skipping headerMagicValue offset 4 diff --git a/java_console/io/src/com/rusefi/TsPageSize.java b/java_console/io/src/com/rusefi/TsPageSize.java new file mode 100644 index 0000000000..412dc4740a --- /dev/null +++ b/java_console/io/src/com/rusefi/TsPageSize.java @@ -0,0 +1,5 @@ +package com.rusefi; + +public interface TsPageSize { + int IMAGE_SIZE = 14008; +} diff --git a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java index a18bc070a1..1fb1c15bbd 100644 --- a/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java +++ b/java_console/io/src/com/rusefi/binaryprotocol/BinaryProtocol.java @@ -16,7 +16,6 @@ import java.util.Arrays; * 3/6/2015 */ public class BinaryProtocol { - public static final int IMAGE_SIZE = 14008; private static final int BLOCKING_FACTOR = 256; private static final byte RESPONSE_OK = 0; private static final byte RESPONSE_BURN_OK = 0x04; diff --git a/java_console/io/src/com/rusefi/io/serial/PortHolder.java b/java_console/io/src/com/rusefi/io/serial/PortHolder.java index c7dee3b7fd..b86ad33f8d 100644 --- a/java_console/io/src/com/rusefi/io/serial/PortHolder.java +++ b/java_console/io/src/com/rusefi/io/serial/PortHolder.java @@ -1,8 +1,8 @@ package com.rusefi.io.serial; import com.rusefi.FileLog; -import com.rusefi.Logger; import com.rusefi.Timeouts; +import com.rusefi.TsPageSize; import com.rusefi.binaryprotocol.BinaryProtocol; import com.rusefi.core.MessagesCentral; import com.rusefi.io.CommandQueue; @@ -79,7 +79,7 @@ public class PortHolder { bp = new BinaryProtocol(FileLog.LOGGER, serialPort); bp.switchToBinaryProtocol(); - bp.readImage(BinaryProtocol.IMAGE_SIZE); + bp.readImage(TsPageSize.IMAGE_SIZE); if (bp.isClosed) return false; diff --git a/java_console/ui/src/com/rusefi/binaryprotocol/BinaryProtocolCmd.java b/java_console/ui/src/com/rusefi/binaryprotocol/BinaryProtocolCmd.java index 67f0ade007..63b08c41d8 100644 --- a/java_console/ui/src/com/rusefi/binaryprotocol/BinaryProtocolCmd.java +++ b/java_console/ui/src/com/rusefi/binaryprotocol/BinaryProtocolCmd.java @@ -2,10 +2,7 @@ package com.rusefi.binaryprotocol; import com.romraider.editor.ecu.ECUEditor; import com.romraider.util.SettingsManager; -import com.rusefi.ConfigurationImage; -import com.rusefi.Logger; -import com.rusefi.RomRaiderWrapper; -import com.rusefi.UploadChanges; +import com.rusefi.*; import com.rusefi.io.serial.PortHolder; import jssc.SerialPort; @@ -41,7 +38,7 @@ public class BinaryProtocolCmd { logger.info("Looks good"); bp.switchToBinaryProtocol(); - bp.readImage(BinaryProtocol.IMAGE_SIZE); + bp.readImage(TsPageSize.IMAGE_SIZE); // // image.saveToFile("rusefi_configuration.bin"); //