From 5c20e1d52c1e0707200983303980c7b11b6bdef8 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 18 Nov 2021 00:05:27 -0500 Subject: [PATCH] automation around outputs section #197 --- firmware/console/binary/ts_outputs.h | 116 +++++++++++++++++++++++ firmware/gen_output_channels.sh | 9 ++ firmware/integration/output_channels.txt | 38 ++++++++ 3 files changed, 163 insertions(+) create mode 100644 firmware/console/binary/ts_outputs.h create mode 100644 firmware/gen_output_channels.sh diff --git a/firmware/console/binary/ts_outputs.h b/firmware/console/binary/ts_outputs.h new file mode 100644 index 0000000000..f12a276a7b --- /dev/null +++ b/firmware/console/binary/ts_outputs.h @@ -0,0 +1,116 @@ +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) integration/output_channels.txt Thu Nov 18 00:04:44 EST 2021 +// by class com.rusefi.output.CHeaderConsumer +// begin +#pragma once +#include "rusefi_types.h" +// start of ts_outputs_s +struct ts_outputs_s { + /** + offset 0 bit 0 */ + bool sd_present : 1; + /** + offset 0 bit 1 */ + bool isIgnitionEnabledIndicator : 1; + /** + offset 0 bit 2 */ + bool isInjectionEnabledIndicator : 1; + /** + offset 0 bit 3 */ + bool sd_logging_internal : 1; + /** + offset 0 bit 4 */ + bool isCylinderCleanupActivated : 1; + /** + offset 0 bit 5 */ + bool isFuelPumpOn : 1; + /** + offset 0 bit 6 */ + bool isFanOn : 1; + /** + offset 0 bit 7 */ + bool isO2HeaterOn : 1; + /** + offset 0 bit 8 */ + bool checkEngine : 1; + /** + offset 0 bit 9 */ + bool needBurn : 1; + /** + offset 0 bit 10 */ + bool sd_msd : 1; + /** + offset 0 bit 11 */ + bool clutchUpState : 1; + /** + offset 0 bit 12 */ + bool clutchDownState : 1; + /** + offset 0 bit 13 */ + bool isFan2On : 1; + /** + offset 0 bit 14 */ + bool unusedb14 : 1; + /** + offset 0 bit 15 */ + bool brakePedalState : 1; + /** + offset 0 bit 16 */ + bool toothLogReady : 1; + /** + offset 0 bit 17 */ + bool acSwitchState : 1; + /** + offset 0 bit 18 */ + bool isTpsError : 1; + /** + offset 0 bit 19 */ + bool isCltError : 1; + /** + offset 0 bit 20 */ + bool isMapError : 1; + /** + offset 0 bit 21 */ + bool isIatError : 1; + /** + offset 0 bit 22 */ + bool acState : 1; + /** + offset 0 bit 23 */ + bool isTriggerError : 1; + /** + offset 0 bit 24 */ + bool hasCriticalError : 1; + /** + offset 0 bit 25 */ + bool isWarnNow : 1; + /** + offset 0 bit 26 */ + bool isPedalError : 1; + /** + offset 0 bit 27 */ + bool isKnockChipOk : 1; + /** + offset 0 bit 28 */ + bool launchTriggered : 1; + /** + offset 0 bit 29 */ + bool isTps2Error : 1; + /** + offset 0 bit 30 */ + bool isIdleClosedLoop : 1; + /** + offset 0 bit 31 */ + bool isIdleCoasting : 1; + /** + * offset 4 + */ + scaled_channel rpm = (uint16_t)0; + /** + * offset 6 + */ + uint16_t rpmAcceleration = (uint16_t)0; + /** total size 8*/ +}; + +// end +// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) integration/output_channels.txt Thu Nov 18 00:04:44 EST 2021 diff --git a/firmware/gen_output_channels.sh b/firmware/gen_output_channels.sh new file mode 100644 index 0000000000..4e4c0e2da9 --- /dev/null +++ b/firmware/gen_output_channels.sh @@ -0,0 +1,9 @@ +#!/bin/bash + + +java -DSystemOut.name=logs/gen_output_channels \ + -jar ../java_tools/ConfigDefinition.jar \ + -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 diff --git a/firmware/integration/output_channels.txt b/firmware/integration/output_channels.txt index e64c250754..410e2d4870 100644 --- a/firmware/integration/output_channels.txt +++ b/firmware/integration/output_channels.txt @@ -1,3 +1,41 @@ struct_no_prefix ts_outputs_s +bit sd_present +bit isIgnitionEnabledIndicator; +bit isInjectionEnabledIndicator; +bit sd_logging_internal +bit isCylinderCleanupActivated; +bit isFuelPumpOn; +bit isFanOn; +bit isO2HeaterOn; +bit checkEngine; +bit needBurn; + +bit sd_msd +bit clutchUpState; +bit clutchDownState; +bit isFan2On +bit unusedb14; +bit brakePedalState; +bit toothLogReady; +bit acSwitchState; +bit isTpsError; +bit isCltError; +bit isMapError; +bit isIatError; +bit acState; +bit isTriggerError; +bit hasCriticalError; +bit isWarnNow; +bit isPedalError; +bit isKnockChipOk; +bit launchTriggered; +bit isTps2Error; +bit isIdleClosedLoop; +bit isIdleCoasting; + +uint16_t autoscale rpm;;"",1, 0, 0, 0, 0 + +uint16_t rpmAcceleration;;"",1, 0, 0, 0, 0 + end_struct