From 53fdc40c7d1131ba2574a3c6900e30cbfd40c38c Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 26 Nov 2021 21:03:45 -0500 Subject: [PATCH] automation around outputs section #197 --- firmware/console/binary/output_channels.txt | 24 +++++++ .../console/binary/ts_outputs_generated.h | 70 ++++++++++++++++++- firmware/console/binary/tunerstudio_outputs.h | 28 -------- 3 files changed, 91 insertions(+), 31 deletions(-) diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index 6718a6b58f..071dfcc19a 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -173,4 +173,28 @@ uint16_t rpmAcceleration;;"",1, 0, 0, 0, 0 uint16_t autoscale debugIntField4;;"", 1, 0, 0, 0, 0 uint16_t autoscale debugIntField5;;"", 1, 0, 0, 0, 0 + uint16_t autoscale accelerationX;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + uint16_t autoscale accelerationY;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + + uint16_t[EGT_CHANNEL_COUNT] egtValues;;"", 1, 0, 0, 0, 0 + + uint16_t autoscale throttle2Position;;"",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0 + + uint16_t autoscale rawTps1Primary;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale rawPpsPrimary;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale rawClt;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale rawIat;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + uint16_t autoscale rawOilPressure;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + + uint16_t autoscale tuneCrc16;;"", 1, 0, 0, 0, 0 + uint8_t autoscale unusedAt246;;"", 1, 0, 0, 0, 0 + uint8_t autoscale tcuCurrentGear;;"", 1, 0, 0, 0, 0 + + uint16_t autoscale rawPpsSecondary;;"",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 0, 0 + + uint8_t[12] autoscale knockLevels;;"",1, 0, 0, 0, 0 + + uint8_t autoscale tcuDesiredGear;;"",{1/1}, 0, 0, 0, 0 + uint8_t autoscale flexPercent;;"",{1/2}, 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 7bfdbe6460..3004f767d3 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 20:52:04 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:02:55 EST 2021 // by class com.rusefi.output.CHeaderConsumer // begin #pragma once @@ -438,8 +438,72 @@ struct ts_outputs_s { * offset 210 */ scaled_channel debugIntField5 = (uint16_t)0; - /** total size 212*/ + /** + * offset 212 + */ + scaled_channel accelerationX = (uint16_t)0; + /** + * offset 214 + */ + scaled_channel accelerationY = (uint16_t)0; + /** + * offset 216 + */ + uint16_t egtValues[EGT_CHANNEL_COUNT]; + /** + * offset 232 + */ + scaled_channel throttle2Position = (uint16_t)0; + /** + * offset 234 + */ + scaled_channel rawTps1Primary = (uint16_t)0; + /** + * offset 236 + */ + scaled_channel rawPpsPrimary = (uint16_t)0; + /** + * offset 238 + */ + scaled_channel rawClt = (uint16_t)0; + /** + * offset 240 + */ + scaled_channel rawIat = (uint16_t)0; + /** + * offset 242 + */ + scaled_channel rawOilPressure = (uint16_t)0; + /** + * offset 244 + */ + scaled_channel tuneCrc16 = (uint16_t)0; + /** + * offset 246 + */ + scaled_channel unusedAt246 = (uint8_t)0; + /** + * offset 247 + */ + scaled_channel tcuCurrentGear = (uint8_t)0; + /** + * offset 248 + */ + scaled_channel rawPpsSecondary = (uint16_t)0; + /** + * offset 250 + */ + scaled_channel knockLevels[12]; + /** + * offset 262 + */ + scaled_channel tcuDesiredGear = (uint8_t)0; + /** + * offset 263 + */ + scaled_channel flexPercent = (uint8_t)0; + /** total size 264*/ }; // end -// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 20:52:04 EST 2021 +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Fri Nov 26 21:02:55 EST 2021 diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 81dba0df86..f20a851515 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -44,34 +44,6 @@ enum class TsCalMode : uint8_t { struct TunerStudioOutputChannels : ts_outputs_s { /* see also [OutputChannels] in rusefi.input */ - // accelerometer - scaled_percent accelerationX; // 212 - scaled_percent accelerationY; // 214 - - // EGT - uint16_t egtValues[EGT_CHANNEL_COUNT] ; // 216 - - scaled_percent throttle2Position; // 232 - - scaled_voltage rawTps1Primary; // 234 - scaled_voltage rawPpsPrimary; // 236 - scaled_voltage rawClt; // 238 - scaled_voltage rawIat; // 240 - scaled_voltage rawOilPressure; // 242 - - scaled_channel tuneCrc16; // 244 - - scaled_channel unusedAt246; - - scaled_channel tcuCurrentGear; // 247 - - scaled_voltage rawPpsSecondary; // 248 - - scaled_channel knockLevels[12]; // 250 - - scaled_channel tcuDesiredGear; // 262 - scaled_channel flexPercent; // 263 - scaled_voltage rawIdlePositionSensor; // 264 scaled_voltage rawWastegatePositionSensor; // 266