diff --git a/firmware/console/binary/ts_outputs.h b/firmware/console/binary/ts_outputs_generated.h similarity index 100% rename from firmware/console/binary/ts_outputs.h rename to firmware/console/binary/ts_outputs_generated.h diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 5af5501b70..f2a7b98c3f 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -13,6 +13,7 @@ #include "rusefi_types.h" #include "scaled_channel.h" #include "tunerstudio_debug_struct.h" +#include "ts_outputs_generated.h" enum class TsCalMode : uint8_t { None = 0, @@ -36,50 +37,13 @@ enum class TsCalMode : uint8_t { * 2) '[OutputChannels]' block in rusefi.input * 3) com.rusefi.core.Sensor enum in rusEFI console source code * + * status update: there is progress, a portion of this struct is now generated! we inherit from generated + * ts_outputs_s and eventually the whole thing would be generated + * */ -struct TunerStudioOutputChannels { +struct TunerStudioOutputChannels : ts_outputs_s { /* see also [OutputChannels] in rusefi.input */ - /** - * Yes, I do not really enjoy packing bits into integers but we simply have too many boolean flags and I cannot - * water 4 bytes per traffic - I want gauges to work as fast as possible - */ - unsigned int sd_present : 1; // bit 0, 72 - unsigned int isIgnitionEnabledIndicator : 1; // bit 1 - unsigned int isInjectionEnabledIndicator : 1; // bit 2 - unsigned int sd_logging_internal : 1; // bit 3 - unsigned int isCylinderCleanupActivated : 1; // bit 4 - unsigned int isFuelPumpOn : 1; // bit 5 - unsigned int isFanOn : 1; // bit 6 - unsigned int isO2HeaterOn : 1; // bit 7 - unsigned int checkEngine : 1; // bit 8 - unsigned int needBurn : 1; // bit 9 - unsigned int sd_msd : 1; // bit 10 - unsigned int clutchUpState : 1; // bit 11 - unsigned int clutchDownState : 1; // bit 12 - unsigned int isFan2On : 1; // bit 13 - unsigned int unusedb14 : 1; // bit 14 - unsigned int brakePedalState : 1; // bit 15. 0 - not pressed, 1 = pressed - unsigned int toothLogReady : 1; // bit 16 - unsigned int acSwitchState : 1; // bit 17. 0 - not pressed, 1 = pressed - unsigned int isTpsError : 1; // bit 18 - unsigned int isCltError : 1; // bit 19 - unsigned int isMapError : 1; // bit 20 - unsigned int isIatError : 1; // bit 21 - unsigned int acState : 1; // bit 22 - 1 if AC is engaged, 0 otherwise - unsigned int isTriggerError : 1; // bit 23 - unsigned int hasCriticalError : 1; // bit 24 - unsigned int isWarnNow : 1; // bit 25 - unsigned int isPedalError : 1; // bit 26 - unsigned int isKnockChipOk : 1; // bit 27 - unsigned int launchTriggered : 1; // bit 28 - unsigned int isTps2Error : 1; // bit 29 - unsigned int isIdleClosedLoop : 1; // bit 30 - unsigned int isIdleCoasting : 1; // bit 31 - - // RPM, vss - scaled_channel rpm; // 4 - int16_t rpmAcceleration; // 6 scaled_percent speedToRpmRatio; // 8 scaled_channel vehicleSpeedKph; // 10 diff --git a/firmware/gen_output_channels.sh b/firmware/gen_output_channels.sh index 4e4c0e2da9..a8af003266 100644 --- a/firmware/gen_output_channels.sh +++ b/firmware/gen_output_channels.sh @@ -6,4 +6,4 @@ java -DSystemOut.name=logs/gen_output_channels \ -definition integration/output_channels.txt \ -cache_zip_file tunerstudio/generated/cache.zip \ -cache . \ - -c_destination console/binary/ts_outputs.h \ No newline at end of file + -c_destination console/binary/ts_outputs_generated.h \ No newline at end of file