Commit Graph

251 Commits

Author SHA1 Message Date
Matthew Kennedy a38b3f00c3
Remove array typedef syntax (#3477)
* remove array typedef support completely

* extraneous semicolon

* binary
2021-11-06 09:12:43 -04:00
Scott Smith 16378dcf59
Convert existing tables to use the simpler 3d table definition style in rusefi_config.txt (#3473)
This fixes #3465.
2021-11-05 21:55:33 -04:00
Scott Smith eb781f38b4
Determine the correct mul/div for autoscale from the TS config line instead of specifying it twice. (#3470) 2021-11-05 19:26:25 -04:00
Scott Smith 8e5d65978a
Add 3d table support to the java config file parser. (#3464)
This removes the need to use custom for 3d tables.  Syntax (to avoid changing the ANTLR parser) is
to use 'x' instead of separate [], i.e.:
        uint16_t[HPFP_TARGET_SIZE x HPFP_TARGET_SIZE] hpfpTarget;;"kPa", 1, 0, 0, 65000, 0
2021-11-05 14:27:32 -04:00
Matthew Kennedy 980a7cc833
autoscale fields in generated structs (#3444)
* add to grammar

* parser

* parser

* example consumer

* build config tool

* commit the right jar
2021-11-02 18:59:19 -04:00
rusefillc a8b922b008 https://rusefi.com/forum/viewtopic.php?f=19&t=2177 2021-10-28 13:11:32 -04:00
rusefillc f48d568be7 https://rusefi.com/forum/viewtopic.php?f=19&t=2177 2021-10-28 12:40:34 -04:00
rusefillc 4192aee6de generate java enum from C enum? generate both C and java from yaml? #2102 2021-10-24 12:49:51 -04:00
rusefillc 3882d3d824 placing all logs into same folder 2021-10-23 20:18:09 -04:00
rusefillc 5d5b4f0d56 Trigger setup in TS is highly confusing #3401
rabbit hole: integrating enums with TS templating
2021-10-23 20:09:10 -04:00
rusefillc abadef0e96 enum reader progress 2021-10-20 22:01:50 -04:00
rusefillc 55a6de05ba validate field name duplicates at least sometimes 2021-10-16 23:02:06 -04:00
rusefillc 292173f818 progress - live doc generator works again! 2021-10-16 21:08:50 -04:00
rusefillc eb6db5e5a4 Whatever we call it, no matter how we do it - we need live data / remote view into rusEFI actual state #3353
dead code
2021-10-14 14:11:52 -04:00
David Holdeman 5582518a04
ConfigDefinition stuff (#2940)
* add check for empty string

* try catching duplicates, while allowing same id on a pin

* js brain

* fixes

* fixes

* comment out

* build

* bump submo

* comment
2021-07-09 22:07:07 -04:00
rusefi 9fcca87332 extra state validation is needed 2021-07-09 01:11:20 -04:00
rusefillc 7d7115d0d7 MRE same pin or not? #2897 2021-07-02 18:22:13 -04:00
rusefillc a27edf50fb H64 uses GPIOD_12 twice why does it not fail? #2877 2021-07-02 13:15:48 -04:00
Matthew Kennedy 12bd5bdf2b
new parse: read rusefi.input, write almost-working output ini! (#2851)
* fix offsets inside struct arrays

* style

* fix index writing for arrays of structs

* write TS context comments

* cleanup

* ts writer copies all lines input -> output

* Add _hex and _char definitions

* definition tostring

* replace variables

* wire up firing order replacement

* jar
2021-06-24 16:36:30 -04:00
David Holdeman 81d38068d8
Yaml parsing refactor (#2842)
* throw error on unknown class

* build

* refactor, first try

* fix some errors

* fix some errors

* fix some errors

* fix some errors

* fix some errors

* build

* start at one more

* checks, minor refactor

* try toString

* check for null, idk

* try throwing class not found error

* oh duh

* oh duh numba two

* oh duh numba three

* build

* switch to switch_inputs

* switch output to outputs

* try

* build

* break loop when found

* fix maybe

* add missing s

* fix a bug

* move nothingname check

* catch other class

* use PinType
2021-06-21 19:10:25 -04:00
Matthew Kennedy aa8bfe0020
parse enums (#2832)
* enums and definitions

* bad merge

* txt format

* endBit

* handle 1-size arrays

* strings

* fix auto enum

* hard code 0 and 1

* jar

* jar
2021-06-20 17:35:31 -04:00
Matthew Kennedy 6915efd500
config gen layout fixes (#2829)
* grammar and libs

* gitignore

* parsing

* allow empty line as root statement

* tolerate #if

* config def changes

* s

* ant build

* workaround

* compiled tool

* grammar for unions

* parse unions

* layout logic

* fix union alignment

* union in config

* enable definition resolve

* testing

* zero init behavior

* bit fields respect custom options

* ts prints arrays correctly

* ts prints structs correctly

* auto round numbers

* cleanup

* bad merge

* bad merge

* jar

* kick
2021-06-18 16:58:04 -04:00
Matthew Kennedy d57ea124a1
cleanup for easier ini compare (#2830)
* remove dot zero

* don't parse as double

* minor formatting

* Revert "don't parse as double"

This reverts commit f2427927f7df0f5fa27ed66c888009e3a3da8412.

* expect integer "1"

* jar
2021-06-18 15:43:16 -04:00
Matthew Kennedy e7e9ab0d5c
Antlr 2 (#2823)
* grammar and libs

* gitignore

* parsing

* allow empty line as root statement

* tolerate #if

* config def changes

* s

* ant build

* workaround

* compiled tool

* grammar for unions

* parse unions

* layout logic

* fix union alignment

* union in config

* jar

* comment

* jar

* jar

* no prefix on root struct

* stray space

* normalize some enums
2021-06-18 12:31:23 -04:00
Matthew Kennedy 2c6b8ae3c6
parse with antlr (#2747)
* grammar and libs

* gitignore

* parsing

* allow empty line as root statement

* tolerate #if

* config def changes

* s

* ant build

* workaround

* compiled tool

* console should not build config def tool

* ugh the dependency tree is insane

* this should fix hw ci

* console build

* console jenkins script

* test

* Revert "test"

This reverts commit 73f2da50f990bee9b51a1f919e8fcc6b06327d9a.

* throw on parse failure

* jar

* fix #2821

* comment
2021-06-16 17:07:05 -04:00
Matthew Kennedy 84368cae10
Config generator jar (#2716)
* fix test

* jar

* kick config

* guard stuff

* nmea

* nmea

* nmea

* c++ is type safe, which is good

* c++ is type safe
2021-05-17 12:32:59 +03:00
rusefillc 0c6ec8fb29 gen_config.sh code duplication #2451
David saw dead code
2021-05-11 22:00:36 -04:00
David Holdeman 550517eb6c
Fix config CI (#2638)
* add yaml to inputFiles

* add jar
2021-05-06 23:12:05 -04:00
rusefillc d10115ae5c h64 more better error handling 2021-05-01 15:40:27 -04:00
rusefillc 2181b05013 config definition better error handling 2021-05-01 15:12:39 -04:00
rusefillc 0594a5b305 field type into header comment 2021-04-26 17:51:29 -04:00
rusefillc 122fe16db7 is gen_config invoked too often now? #2387 2021-03-12 22:25:03 -05:00
rusefillc 06e05d821b is gen_config invoked too often now? #2387
unzip is complicated
2021-03-05 21:39:26 -05:00
rusefillc bc7ff44cb2 is gen_config invoked too often now? #2387
how about we do not trust anyone to properly handle EOL CRLF?
2021-03-05 20:35:53 -05:00
rusefillc 479938b57a cAsE of rusEFI 2021-03-02 22:14:06 -05:00
rusefi 40e9c4174f TS does not support zero length arrays? #2366 2021-02-16 17:25:52 -05:00
rusefillc 9fbf16ce08 code generator: better handing of array size 1 2021-02-08 23:47:48 -05:00
rusefillc 02f08808ef spaces into multiplication 2021-02-01 12:11:00 -05:00
Matthew Kennedy 622a47c70b
Remove whitespace (#2246)
* don't tab in fields

* jar
2021-01-27 15:44:52 -05:00
Matthew Kennedy bed6819d8b
normalize configuration grammar (#2240)
* modify grammar

* add missing typedefs

* these typedefs are easier to handle in the parser

* make the existing parser work with the changed format

* grumble grumble jar

* we can deal with this part later

* handle later

* deal with this later
2021-01-26 21:56:47 -05:00
David Holdeman 6ead64e512
New board pin-mapping system (#2231)
* convert mre mapping

* convert mre mapping

* funny stuff for GPIOA_5

* move class next to id

* rough draft

* update scripts

* fix some errors

* fix some errors

* try

* check against null

* try amp

* try

* try

* fix some errors

* update scripts

* fix maybe

* fix maybe 2

* fix maybe

* fix maybe

* fix

* try

* fix

* use .equals

* use StringBuilder

* use instanceof

* use .max

* remove getMaxValue

* Suppress Warning

* major optimization

* fix maybe

* off-by-one error

* move yaml file loop

* add j2 connector

* add pads yaml

* check for null or empty

* add AV pins to pads

* forgot class

* move registerpins out of loop

* fix typo

* rebase

* check if string

* convert frankenso

* convert frankenso

* tyop

* missing class

* copy mre to skel

* remove prometheus yaml

* remove kinetis yaml

* build configDefinition

* replace var with string

* slight refactor
2021-01-22 12:03:14 -05:00
rusefillc f55b3a0cdb Add #if/#else/#endif support to gen_config #1928 2020-11-05 08:04:04 -05:00
David Holdeman 8ebdf6fcdc
fix type mismatch (#1808)
* fix type mismatch

* comment

* change field

* switch to efitimesec16_t

* add typedef

* add type to configdefinition

* build
2020-09-19 17:17:44 -04:00
rusefi 88bedcb978 Tokenisation of multipler expressions #1735 2020-08-30 15:31:22 -04:00
rusefi 22a947d498 https://github.com/rusefi/web_backend/issues/97 2020-08-30 14:58:05 -04:00
rusefi 8bcc3aeb64 https://github.com/rusefi/web_backend/issues/73
toolset progress
2020-08-14 15:56:59 -04:00
rusefi 2b06b4a0fc Console commands are broken #1671 2020-08-05 19:51:43 -04:00
rusefi ce091f2778 progress 2020-08-04 23:18:35 -04:00
rusefi b4a8d25909 progress 2020-08-04 22:51:27 -04:00
rusefi af4dcc10f2 STRING support for java fields 2020-07-18 19:30:49 -04:00
rusefi a3393133a6 STRING support for java fields 2020-07-18 19:12:47 -04:00
rusefi dee2cc0a68 progress 2020-07-14 21:34:59 -04:00
rusefi 15731e29f9 something was broken? 2020-07-06 02:05:34 -04:00
rusefi a2b14cb297 trying to simplify things a bit 2020-07-05 23:09:43 -04:00
rusefi 1a04a54df4 fresh 2020-07-02 14:20:09 -04:00
rusefi f89c68b68a fresh 2020-07-02 12:34:20 -04:00
rusefi 17de156c2b fresh 2020-07-02 08:26:10 -04:00
rusefi c80a230e2b all fields should have TS info 2020-06-30 15:20:30 -04:00
rusefi 7b6da35920 all fields should have TS info 2020-06-30 15:19:11 -04:00
rusefi 1dd173b49e convention for fields without TS info 2020-06-29 21:54:30 -04:00
rusefi 811b616aaa convention for fields without TS info 2020-06-29 21:53:26 -04:00
rusefi c962de4482 progress? 2020-06-28 11:52:14 -04:00
rusefi cb8e28f992 progress 2020-06-28 11:04:20 -04:00
rusefi aaef8a865c helping .ini process 2020-06-28 10:02:16 -04:00
rusefi 938578fb2a fresh config tool jar 2020-06-27 14:26:52 -04:00
rusefi ad3367ea1b Only two .ini files got auto-generated #1519 2020-06-19 00:28:50 -04:00
rusefi 1221de56a4 TS project: hide all invalid entries fix #1505 2020-06-17 20:51:29 -04:00
rusefi cbc7d4a73e TS project: hide all invalid entries #1505 2020-06-17 20:33:17 -04:00
rusefi 127dd67838 restoring ldmp 2020-06-17 19:03:10 -04:00
rusefi 05932f9e75 fixing stuff by reducing the gap between Windows and Linux scripts 2020-06-16 14:12:27 -04:00
rusefi 308f82c4b3 fixing stuff? 2020-06-14 18:06:33 -04:00
rusefi 7bf4c362d0 progress 2020-05-31 14:05:03 -04:00
rusefi 1053f98985 char type java generation 2020-05-25 13:57:34 -04:00
rusefi f4169b0819 progress with _hex and _16_hex 2020-05-22 01:23:38 -04:00
rusefi 75d76f850d progress - firing order logic to be re-evaluated every time we generate 2020-05-04 23:54:28 -04:00
rusefi f2e7e825be screen generator 2020-04-29 22:34:51 -04:00
rusefi ad09177105 code generator progress 2020-04-12 23:44:14 -04:00
rusefi 04a5a39858 documentation 2020-04-11 22:08:04 -04:00
rusEfi d576b8e627 live docs: whitespace support 2020-02-22 15:37:58 -05:00
rusefi 64c83fa4cd he owes me one now 2020-02-14 23:03:26 -05:00
rusefi a62340b8b9 gen_config should fail with misaligned integers fix #1115 2020-02-02 13:24:32 -05:00
rusefi 3f3cddbf01 Config generation handles padding after packed booleans (bits) wrong
fix #1057
2019-12-14 16:11:31 -05:00
rusefi 80b7e0b911 everyone loves cross-platform EOL issues! 2019-11-16 14:55:12 -05:00
rusefi 0a10465c56 better state validation 2019-11-16 14:52:17 -05:00
rusefi 2349ea237a Delayed A/C compressor switch #922 2019-09-11 19:30:36 -04:00
rusefi abf2406621 Live Docs progress: consuming data from multiple structures 2019-09-01 15:24:44 -04:00
rusefi 62164affff fresh code generator binary 2019-08-31 10:57:40 -04:00
rusefi 7eb05c90e4 steps towards ETB live documentation 2019-08-15 20:24:17 -04:00
rusefi e5b953db84 trigger counters to formula, docs & improvements 2019-07-20 14:56:56 -04:00
rusefi 9e461e7c27 Annotations in C++ code to produce formulas in rusEfi console #807 2019-07-13 09:00:03 -04:00
rusefi d9c3eba470 Annotations in C++ code to produce formulas in rusEfi console #807 2019-06-27 06:47:13 -04:00
rusefi 717af8a681 TPS Live Documentation 2019-06-17 21:37:11 -04:00
rusefi af6c342368 Utility class which writes same line both to stdout and file 2019-06-17 20:21:32 -04:00
rusefi 47daf9512e explicit folder for generated java stuff 2019-06-16 22:14:40 -04:00
rusefi 97a976dadd explicit folder for generated java stuff 2019-06-16 22:06:05 -04:00
rusefi 3632f5f787 fixing fresh defect in code generator 2019-06-15 21:44:21 -04:00
rusefi c3cfa41b98 '-initialize_to_zero' mode for code generator 2019-06-15 15:54:58 -04:00
rusefi e07b119a7f bumping configuration version in light of #773 2019-06-14 13:04:04 -04:00
rusefi f327b961f7 Annotations in C++ code to produce formulas in rusEfi console #807
reducing hard-coded constants in generator and etc
2019-06-14 00:47:28 -04:00
rusefi 6b7baaaecc template substitution for tsInfo part of the definition 2019-06-11 21:43:46 -04:00
rusefi 090fa01465 generating without build folder, faster fail in case of failure 2019-06-10 23:13:32 -04:00
rusefi 2b7fde2c5e signed byte type support 2019-06-10 23:08:38 -04:00
rusefi 69a80c73f6 input has sizes hard-coded #836 2019-06-10 13:38:25 -04:00
rusefi 66903595b7 TS flexibility for MRE 2019-06-07 17:38:12 -04:00
rusefi f6800dbd39 board-specific usability #808
fixing enum range
2019-06-04 23:45:41 -04:00
rusefi ab1cf401e6 extracting hw-specific enums 2019-06-04 12:27:34 -04:00
rusefi f268317561 getting ready for enum file split 2019-06-02 16:16:06 -04:00
rusefi 2968cdafbc pins mapping logic fix & pins kind fix 2019-06-02 14:10:21 -04:00
rusefi 5282e29d7c board-specific usability #808
toolset
2019-06-01 18:27:34 -04:00
rusefi c97d735fc0 Usability: TS project rework #811
trying to address encoding nightmare
2019-06-01 17:15:01 -04:00
rusefi 5588e8e323 incremental code generation 2019-06-01 16:51:32 -04:00
rusefi 0334f20fd1 board-specific usability #808 2019-05-30 20:41:54 -04:00
rusefi 2c844b551f board-specific usability #808 2019-05-30 18:19:27 -04:00
rusefi f40e0be614 board-specific usability #808 2019-05-30 00:18:41 -04:00
rusefi 489b115611 generator progress 2019-05-27 20:06:01 -04:00
rusefi e117bff3de learning C & C++ - explicit typedef vs struct 2019-05-27 19:35:30 -04:00
rusefi bf362f46b5 code generator progress 2019-05-27 17:44:10 -04:00
rusefi 54f9d77f46 recovering rom raider generation 2019-05-27 06:55:10 -04:00
rusefi 5db9eb44d9 generator now takes full file name 2019-05-26 20:54:44 -04:00
rusefi 2d0e59cdc5 named parameters & lazy build feature 2019-05-26 18:37:53 -04:00
rusefi 2c758692ef configuration generator refactoring 2019-05-18 17:10:28 -04:00
rusefi f02207735a minor bugfix - enabling 31st bit 2019-05-02 18:19:56 -04:00
rusefi 64c70c3e2d rusEfi settings editor is broken for one byte enums #709 2019-04-08 11:19:07 -04:00
rusefi a48dd78966 gen_config: add rusefi_config_custom.txt to override #defines #727 2019-04-03 19:08:42 -04:00
rusefi b863a673ef gen_config: add rusefi_config_custom.txt to override #defines #727 2019-04-03 19:05:41 -04:00
rusefi 108f0417da refactoring 2018-12-20 01:01:59 -05:00
rusefi 843f759941 refactoring 2018-12-20 00:59:33 -05:00
rusefi 56fbc21b71 refactoring 2018-12-20 00:52:18 -05:00
rusefi c03ed75433 refactoring 2018-12-20 00:49:27 -05:00
rusefi bcd2ba640f refactoring 2018-12-20 00:40:17 -05:00
rusefi 1373125a2a refacotring 2018-12-20 00:29:09 -05:00
rusefi cfc05de986 refactoring 2018-12-20 00:27:49 -05:00
rusefi 26c7c35eed refactoring 2018-12-20 00:13:03 -05:00
rusefi 176aa20908 refactoring 2018-12-19 23:45:00 -05:00
rusefi 03d6876f2a refactoring 2018-12-19 23:35:45 -05:00
rusefi f01a2dd252 reducing confusion with file names 2018-12-19 23:18:03 -05:00
rusefi fe602d17b5 docs 2018-12-19 21:32:26 -05:00
rusefi d632d72ed3 ETB bias curve in TS 2018-12-09 13:50:13 -05:00
rusefi 36047e7f3d ETB bias curve by TPS 2018-12-09 10:19:47 -05:00
rusefi 23b02ec375 nicer message 2018-03-18 11:13:23 -04:00
rusefi 5004545f03 detailed message 2018-03-18 09:03:39 -04:00
rusefi 2cd13f578f fixing build 2017-12-11 11:23:53 -05:00
rusefi c297194fea #495 2017-11-19 14:29:46 -05:00
rusefi 25b5e4943c #382 improvements to generator to support simple string constants 2017-04-03 21:09:04 -04:00
rusefi 4270b11209 EOL for generated files 2017-03-27 22:24:52 -04:00
rusefi 46510f5658 EOL for generated files 2017-03-27 22:15:48 -04:00
rusefi 01865887e0 EOL for generated files 2017-03-27 21:29:38 -04:00
rusefi a7d0dea541 #382 2017-03-26 18:48:12 -04:00
rusefi e06d5a6731 #382 non-numeric defines into C sources 2017-03-26 18:09:37 -04:00
rusefi 653bd69131 better logging & time stamp feature 2017-03-03 20:07:06 -05:00