Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077

Open
rusefillc opened this issue Dec 14, 2020 · 11 comments

Comments

@rusefillc
Copy link
Contributor

At the moment most of trigger parameters are defined in C code and exported into triggers.txt for TriggerImage java code to render, but some stuff is hard coded in java

  1. human-readable trigger name
  2. isFirstCrankBased
  3. isSecondCamBased

all data about trigger should be defined in one place and at the moment that one place is C trigger definition structure

We should remove all hard-coded stuff from java and hard-code anything missing in C

@rusefillc rusefillc changed the title export more of trigger attributes into triggers.txt file Refactoring, technical debt: export more of trigger attributes into triggers.txt file Dec 14, 2020
@rusefillc
Copy link
Contributor Author

; todo: code generator to hard-code all triggers not requiring VVT?	    
	    field = "CAM/VVT mode shaft #1",				vvtMode, {trigger_type != TT_TT_MAZDA_MIATA_NA}

that's another reason to flip trigger workflow

instead of C generating triggers.txt we shall have triggers.yaml generating C and java and .ini

@rusefillc
Copy link
Contributor Author

@chuckwagoncomputing how can I trick you into this issue?

@chuckwagoncomputing
Copy link
Member

instead of C generating triggers.txt we shall have triggers.yaml generating C and java and .ini

Which .ini?

@chuckwagoncomputing
Copy link
Member

So the trigger info should be taken out of those files, and the yaml should be passed to ConfigDefinition.
Do I understand?

@rusefillc
Copy link
Contributor Author

@rusefillc
Copy link
Contributor Author

by the way firing order tool is somewhat similar just much simpler

@rusefillc
Copy link
Contributor Author

Depends on #2607

rusefillc pushed a commit that referenced this issue Apr 30, 2021
…riggers.txt file #2077

only extracting methods without any changes to the logic
rusefillc pushed a commit that referenced this issue Apr 30, 2021
…riggers.txt file #2077

some pretty dead code and moving methods
rusefillc pushed a commit that referenced this issue Apr 30, 2021
rusefillc pushed a commit that referenced this issue May 6, 2021
rusefillc pushed a commit that referenced this issue Apr 2, 2022
rusefillc pushed a commit that referenced this issue Apr 2, 2022
@rusefillc
Copy link
Contributor Author

rusefillc commented Apr 3, 2022

Wow a minor sad discovery #4032

@chuckwagoncomputing
Copy link
Member

What is the current state of this?

@rusefillc
Copy link
Contributor Author

a lot of progress was done!

at least nice names are still in java and should be moved into firmware as EFI_UNIT_TEST field? Actually human-readable name could be the last thing to move out of java

    private static String getTriggerName(TriggerWheelInfo triggerName) {
        switch (findByOrdinal(triggerName.getId())) {
            case TT_FORD_ASPIRE:
                return "Ford Aspire";
            case TT_VVT_BOSCH_QUICK_START:
                return "Bosch Quick Start";
            case TT_MAZDA_MIATA_NA:
                return "Miata NA";
            case TT_MAZDA_MIATA_NB1:
                return "Miata NB";
            case TT_SUBARU_SVX:
                return "Subaru SVX";
            case TT_HONDA_K_CRANK_12_1:
                return "Honda K 1/12";
            case TT_SUBARU_7_6:
                return "Subaru 7/6";
            case TT_GM_24x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants