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

Ignition schedulers update #578

Closed
wants to merge 33 commits into from
Closed

Commits on May 7, 2021

  1. Initial change to ignition timing

    Ignition timing changed to be calculated directly from ingnition end angle (previous art was endAngle -> startAngle -> endtime)
    TBAMax committed May 7, 2021
    Configuration menu
    Copy the full SHA
    6dd7cf2 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2021

  1. Ignition channel 1 optimized.

    Other channels left as is at the moment.
    TBAMax committed May 8, 2021
    Configuration menu
    Copy the full SHA
    0dd1603 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2021

  1. Ignition 1 refactored

    Initial work on refactoring ignition schedules
    TBAMax committed May 10, 2021
    Configuration menu
    Copy the full SHA
    cee5a85 View commit details
    Browse the repository at this point in the history
  2. Finished refactoring of ignitionchedulers.

    Reduced code repetition.
    TBAMax committed May 10, 2021
    Configuration menu
    Copy the full SHA
    4591644 View commit details
    Browse the repository at this point in the history
  3. Also updated and refactored the ignition interrupt functions

    Updated interrupt functions on all channels to be compatible with the previous changes to the interrupt schedulers.
    Reduced code repetition in ignition interrupt functions.
    TBAMax committed May 10, 2021
    Configuration menu
    Copy the full SHA
    99117bc View commit details
    Browse the repository at this point in the history

Commits on May 18, 2021

  1. Tweaks to the overdwell protection

    Only allow the overdwell protection in the timers.ino to run when it is enabled and with the new ignition mode(to increase performance).
    For old ignition mode incorporate the overdwell protection to the schedulers.
    Plus some comments tweaked in scheduler.ino
    TBAMax committed May 18, 2021
    Configuration menu
    Copy the full SHA
    7f54fc1 View commit details
    Browse the repository at this point in the history
  2. Performance tweaks to the scheduler

    Rearranged the angleToTime in the setIgnitionShedule() only calculated when it is really needed. Now it is not calculated when corresponding schedule is already running, this saves some time and may help on atmega platvorm since those calculations include division.
    TBAMax committed May 18, 2021
    Configuration menu
    Copy the full SHA
    013abba View commit details
    Browse the repository at this point in the history

Commits on May 20, 2021

  1. Fix issues with Atmega2560

    Time window between staging and impulse starting interrupts was too small for the Atmega to keep up. Just add a little extra time.
    Plus make setIgnitionxCompare functions use COMPARE_TYPE, for possible future multi platvorm differences.
    TBAMax committed May 20, 2021
    Configuration menu
    Copy the full SHA
    7f7f4f7 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2021

  1. Configuration menu
    Copy the full SHA
    e427971 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2021

  1. Fix compiler warnings

    Adds extra parentheses around the macro argument.
    TBAMax committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    7dc6723 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. Configuration menu
    Copy the full SHA
    146a78b View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2021

  1. Configuration menu
    Copy the full SHA
    c8d82dc View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2021

  1. Revert changes to platvormio.ini (default envs)

    Put default envs back to the megaatmega2560. Should not have been changed in the first place, would be cleaner PR.
    TBAMax committed Jul 2, 2021
    Configuration menu
    Copy the full SHA
    3f30e2b View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2021

  1. Configuration menu
    Copy the full SHA
    a8dddf2 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2021

  1. Small change: COMPARE_TYPE some variables

    Change some more variables type to COMPARE_TYPE. Currently all timer comparators are used with 16bit. So the COMPARE_TYPE is currently uint16_t. Anyway when possibly changing the COMPARE_TYPE in the future, great care must be taken to evaluate all effects. This just adds a little bit closer to make smooth changing of COMPARE_TYPE possible.
    TBAMax committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    7961e38 View commit details
    Browse the repository at this point in the history
  2. More COMPARE_TYPE usage!

    Organize variables to use COMPARE_TYPE definition in some more places. With intention to make schedulers compatible with different width timers comparators.
    TBAMax committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    45878b4 View commit details
    Browse the repository at this point in the history
  3. Inline small register modification functions

    The inline specifier is only a compiler hint, and the compiler is free to completely ignore it. Compilers that we are using today actually are supposed to do the inlining automatically without this specifier too, but for good measure still add it.
    TBAMax committed Sep 1, 2021
    1 Configuration menu
    Copy the full SHA
    76155fb View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    63c3947 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e3670a View commit details
    Browse the repository at this point in the history
  6. Move channelIgnDegrees to inside ignitionSchedulex struct

    For cleaner and shorter code, remove the multiple global variables and place the same functionality inside the existing struct. The ignitionSchedule struct now has new member.
    Basically done with intention to reduce arguments count of setIgnitionSchedule function after that.
    TBAMax committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    5fd94e2 View commit details
    Browse the repository at this point in the history
  7. Cleaner code, reduce function arguments

    reduce setIgnitionSchedule function arguments count by 1.
      channelIgnDegrees are now taken directly from corresponding ignitionSchedule struct
    TBAMax committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    e2196ba View commit details
    Browse the repository at this point in the history
  8. Even more COMPARE_TYPE usage

    Convert small "getIgnCoutenter()" functions also to the COMPARE_TYPE.
    TBAMax committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    d368a25 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Fixed Cranking Override

    Fix Fixed Cranking Override for all decoders.
    Previously there was excessice dwell and spark produced at trigger edge. Changed that so that now coil charging is started at trigger edge and normal dwell is used. This retards the timing slightly for starting-- should be a good thing. (For most decoders that use fixed timing for starting the trigger edge should be at 5degrees BTDC).
    
    Prevent per tooth ignition from running with fixed cranking ignition override
    
    Add decoderHasFixedCrankingTiming = true; on some decoders that had that missing.
    TBAMax committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    fa76e37 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2021

  1. Fixedcrankingtiming tweaks

    Do not allow per tooth ignition mode to run during the fixedcrankingtiming on all triggers that support both.
    
    Add decoderHasFixedCrankingTiming = true; on some decoders that had that missing.
    TBAMax committed Oct 17, 2021
    Configuration menu
    Copy the full SHA
    67a8111 View commit details
    Browse the repository at this point in the history
  2. Remove unused ignitionStartAngle variables

    Remove unused variables:
    int ignition1StartAngle
    int ignition2StartAngle
    int ignition3StartAngle
    int ignition4StartAngle
    int ignition5StartAngle
    int ignition6StartAngle
    int ignition7StartAngle
    int ignition8StartAngle
    All those angles are not used any more. All things are based on ignitionEndAngles(actual spark angle).
    
    affected files: speeduino.ino; globals.h
    TBAMax committed Oct 17, 2021
    Configuration menu
    Copy the full SHA
    82138ad View commit details
    Browse the repository at this point in the history
  3. Clean dwell angle function arguments

    Cleaner code. Remove dwell angle from calculateIgnitionAngle() function arguments, since this is actually unused. Dwell is based directy on dwell time.
    TBAMax committed Oct 17, 2021
    Configuration menu
    Copy the full SHA
    5425da6 View commit details
    Browse the repository at this point in the history
  4. Remove fixedCrankingOverride variable

    Remove "fixedCrankingOverride" variable because it it not used any more. It was previously used to regulate dwell during fixed cranking timing, but now the dwell is regulated in the schedulers.
    TBAMax committed Oct 17, 2021
    Configuration menu
    Copy the full SHA
    6ac0e9e View commit details
    Browse the repository at this point in the history
  5. update calculateIgnitionAngle function declarations

    Those function declarations were still not updated. Functions themselves were already updated earlier.
    TBAMax committed Oct 17, 2021
    Configuration menu
    Copy the full SHA
    cbb3b1c View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2021

  1. Important change to the per tooth ignition

    Use functions to set the ignition compare values with the perToothTiming. This fixes the some kind of type conversion issue that caused occassional very early spark events previously.
    TBAMax committed Oct 23, 2021
    Configuration menu
    Copy the full SHA
    1a2e874 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2021

  1. Idle compare tweaks

    Add cast to COMPARE_TYPE also for idle. Similar issue of that cast missing was causing issues with the ignition timing. This is needed when 32bit timer is used in the 16bit overflow mode. So apply it here too.
    TBAMax committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    2754615 View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2021

  1. Configuration menu
    Copy the full SHA
    8a7ec0d View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2021

  1. Configuration menu
    Copy the full SHA
    67a2c00 View commit details
    Browse the repository at this point in the history
  2. ignitionStart and End callbacks to ignitionSchedule struct

    Move IgnitionStartFunction and IgnitionEndFunction to be with the ignition schedule struct. Reduced code repetition.
    0.1% RAM saving, 0.1% Flash saving observed on black_F407VE
    TBAMax committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    f4e9728 View commit details
    Browse the repository at this point in the history