diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index ce4fb04775..be24562a59 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -114,4 +114,30 @@ uint16_t rpmAcceleration;;"",1, 0, 0, 0, 0 uint16_t autoscale totalFuelConsumption;;"",{1/1}, 0, 0, 0, 0 uint16_t autoscale fuelFlowRate;;"",{1/@@PACK_MULT_FUEL_FLOW@@}, 0, 0, 0, 0 +! Y axis values for selectable tables + uint16_t autoscale veTableYAxis;;"",{1/100}, 0, 0, 0, 0 + uint16_t autoscale afrTableYAxis;;"",{1/100}, 0, 0, 0, 0 + + float autoscale knockLevel;;"", 1, 0, 0, 0, 0 + + uint32_t autoscale timeSeconds;;"", 1, 0, 0, 0, 0 + uint32_t autoscale engineMode;;"", 1, 0, 0, 0, 0 + uint32_t autoscale firmwareVersion;;"", 1, 0, 0, 0, 0 + +! todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate +! rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( + uint32_t autoscale tsConfigVersion;;"", 1, 0, 0, 0, 0 + + + ! These two fields indicate to TS that we'd like to set a particular field to a particular value + ! We use a maintainConstantValue in TS for each field we'd like to set, like this: + ! maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } + ! maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } + ! When the mode is set to a particular value, TS will copy the calibrationValue in to the specified field. + ! + ! With this simple construct, the ECU can send any number of internally computed configuration fields + ! back to TunerStudio, getting around the problem of setting values on the controller without TS's knowledge. + ! The ECU simply has to sequentially set a mode/value, wait briefly, then repeat until all the values + ! it wants to send have been sent. + float autoscale calibrationValue;;"", 1, 0, 0, 0, 0 end_struct diff --git a/firmware/console/binary/ts_outputs_generated.h b/firmware/console/binary/ts_outputs_generated.h index 4a3e11ec88..3b6a76da10 100644 --- a/firmware/console/binary/ts_outputs_generated.h +++ b/firmware/console/binary/ts_outputs_generated.h @@ -1,4 +1,4 @@ -// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 18:48:47 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 18:55:26 EST 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -318,8 +318,40 @@ struct ts_outputs_s { * offset 102 */ scaled_channel fuelFlowRate = (uint16_t)0; - /** total size 104*/ + /** + * offset 104 + */ + scaled_channel veTableYAxis = (uint16_t)0; + /** + * offset 106 + */ + scaled_channel afrTableYAxis = (uint16_t)0; + /** + * offset 108 + */ + scaled_channel knockLevel = (float)0; + /** + * offset 112 + */ + scaled_channel timeSeconds = (uint32_t)0; + /** + * offset 116 + */ + scaled_channel engineMode = (uint32_t)0; + /** + * offset 120 + */ + scaled_channel firmwareVersion = (uint32_t)0; + /** + * offset 124 + */ + scaled_channel tsConfigVersion = (uint32_t)0; + /** + * offset 128 + */ + scaled_channel calibrationValue = (float)0; + /** total size 132*/ }; // end -// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 18:48:47 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 18:55:26 EST 2021 diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 8ea4a02388..ce2bdf6d55 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -44,33 +44,6 @@ enum class TsCalMode : uint8_t { struct TunerStudioOutputChannels : ts_outputs_s { /* see also [OutputChannels] in rusefi.input */ - // Y axis values for selectable tables - scaled_channel veTableYAxis; // 104 - scaled_channel afrTableYAxis; // 106 - - // Knock - scaled_channel knockLevel; // 108 - - // Mode, firmware, protocol, run time - scaled_channel timeSeconds; // 112 - scaled_channel engineMode; // 116 - scaled_channel firmwareVersion; // 120 - // todo: this not needed in light of TS_SIGNATURE but rusEFI console still uses it. Need to migrate - // rusEFI console from TS_FILE_VERSION to TS_SIGNATURE :( - - uint32_t tsConfigVersion; // 124 - - // These two fields indicate to TS that we'd like to set a particular field to a particular value - // We use a maintainConstantValue in TS for each field we'd like to set, like this: - // maintainConstantValue = tpsMax, { (calibrationMode == 1 ) ? calibrationValue : tpsMax } - // maintainConstantValue = tpsMin, { (calibrationMode == 2 ) ? calibrationValue : tpsMin } - // When the mode is set to a particular value, TS will copy the calibrationValue in to the specified field. - // - // With this simple construct, the ECU can send any number of internally computed configuration fields - // back to TunerStudio, getting around the problem of setting values on the controller without TS's knowledge. - // The ECU simply has to sequentially set a mode/value, wait briefly, then repeat until all the values - // it wants to send have been sent. - float calibrationValue; // 128 TsCalMode calibrationMode; // 132 uint8_t padding[1]; // 133