From 5aab1d70bb7b4ebcf81e398121089774b576946b Mon Sep 17 00:00:00 2001 From: rusEfi Date: Tue, 21 Oct 2014 06:02:54 -0500 Subject: [PATCH] auto-sync --- firmware/console/tunerstudio/tunerstudio.cpp | 2 +- firmware/console/tunerstudio/tunerstudio_algo.h | 7 ++++++- firmware/rusefi.cpp | 10 +++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/firmware/console/tunerstudio/tunerstudio.cpp b/firmware/console/tunerstudio/tunerstudio.cpp index 1f6bfe3522..ad4be7816d 100644 --- a/firmware/console/tunerstudio/tunerstudio.cpp +++ b/firmware/console/tunerstudio/tunerstudio.cpp @@ -36,7 +36,7 @@ #include "console_io.h" #include "crc.h" -#if EFI_TUNER_STUDIO +#if EFI_TUNER_STUDIO || defined(__DOXYGEN__) #if EFI_PROD_CODE #include "pin_repository.h" diff --git a/firmware/console/tunerstudio/tunerstudio_algo.h b/firmware/console/tunerstudio/tunerstudio_algo.h index eebc526979..ffd81db08d 100644 --- a/firmware/console/tunerstudio/tunerstudio_algo.h +++ b/firmware/console/tunerstudio/tunerstudio_algo.h @@ -38,7 +38,12 @@ typedef struct { int writeValueCommandCounter; int writeChunkCommandCounter; int errorCounter; - // this field is in the end to simply aligning situation + /** + * For some reason I could not get the 'pages' feature of Tuner Studio working - as + * a workaround the whole configuration is just one page + * + * this field is in the end to simply aligning situation + */ short currentPageId; } TunerStudioState; diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 23cf7c392a..283b660e5f 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -74,11 +74,19 @@ * 2.777ms, so we schedule spark firing at '2.777ms after the 690 position sensor event', thus combining trigger events * with time-based offset. * + * @section config Persistent Configuration + * engine_configuration_s structure is kept in the internal flash memory, it has all the settings. Currently rusefi.ini has a direct mapping of this structure. + * + * Please note that due to TunerStudio protocol it's important to have the total structure size in synch between the firmware and TS .ini file - + * just to make sure that this is not forgotten the size of the structure is hard-coded as PAGE_0_SIZE constant. There is always some 'unused' fields added in advance so that + * one can add some fields without the pain of increasing the total config page size. + *
See flash_main.cpp + * * * @section sec_fuel_injection Fuel Injection * * - * @sectuion sec_misc + * @sectuion sec_misc Misc * *
See main_trigger_callback.cpp for main trigger event handler *
See fuel_math.cpp for details on fuel amount logic