![]() |
Speeduino
|
#include "scheduler_ignition_controller.h"#include "scheduledIO_ign.h"#include "schedule_calcs.hpp"#include "globals.h"#include "unit_testing.h"Macros | |
| #define | SET_IGNITION_CHANNEL(channelIdx) setIgnitionChannel(ignitionSchedule ##channelIdx, crankAngle, dwellTime, current.schedulerCutState.ignitionChannels, channelIdx); |
| #define SET_IGNITION_CHANNEL | ( | channelIdx | ) | setIgnitionChannel(ignitionSchedule ##channelIdx, crankAngle, dwellTime, current.schedulerCutState.ignitionChannels, channelIdx); |
| BEGIN_LTO_ALWAYS_INLINE | ( | void | ) | const & |
Calculate the Ignition angles for all cylinders (based on config2::nCylinders). both start and end angles are calculated for each channel. Also the mode of ignition firing - wasted spark vs. dedicated spark per cyl. - is considered here.

|
inlinestatic |

|
inlinestatic |


| TESTABLE_STATIC void changeIgnitionToFullSequential | ( | const config2 & | page2, |
| statuses & | current | ||
| ) |


| TESTABLE_STATIC void changeIgnitionToHalfSync | ( | const config2 & | page2, |
| statuses & | current | ||
| ) |


| if | ( | (current.maxIgnOutputs==4U) &&(page4.sparkMode==IGN_MODE_ROTARY) | ) |

| if | ( | page2. | perToothIgn = = true | ) |
Initialise all ignition schedules.


| TESTABLE_INLINE_STATIC bool isAnyIgnScheduleRunning | ( | void | ) |


|
inlinestatic |

|
inlinestatic |



| TESTABLE_INLINE_STATIC void matchIgnitionSchedulersToSyncState | ( | const config2 & | page2, |
| const config4 & | page4, | ||
| statuses & | current | ||
| ) |


| TESTABLE_STATIC void resetIgnitionSchedulers | ( | void | ) |




|
inlinestatic |

| TESTABLE_INLINE_STATIC void setIgnitionScheduleDuration | ( | IgnitionSchedule & | schedule, |
| uint32_t | delay, | ||
| uint16_t | duration | ||
| ) |












|
constexpr |
| uint16_t crankAngle |
| uint16_t dwellAngle = timeToAngleDegPerMicroSec(current.dwell) |
| else |
| IgnitionSchedule ignitionSchedule1(IGN1_COUNTER, IGN1_COMPARE) | ( | IGN1_COUNTER | , |
| IGN1_COMPARE | |||
| ) |
| IgnitionSchedule ignitionSchedule2(IGN2_COUNTER, IGN2_COMPARE) | ( | IGN2_COUNTER | , |
| IGN2_COMPARE | |||
| ) |
| IgnitionSchedule ignitionSchedule3(IGN3_COUNTER, IGN3_COMPARE) | ( | IGN3_COUNTER | , |
| IGN3_COMPARE | |||
| ) |
| IgnitionSchedule ignitionSchedule4(IGN4_COUNTER, IGN4_COMPARE) | ( | IGN4_COUNTER | , |
| IGN4_COMPARE | |||
| ) |
| IgnitionSchedule ignitionSchedule5(IGN5_COUNTER, IGN5_COMPARE) | ( | IGN5_COUNTER | , |
| IGN5_COMPARE | |||
| ) |