#include "scheduler.h"
#include "crankMaths.h"
#include "maths.h"
#include "timers.h"
Go to the source code of this file.
|
| static uint16_t | _calculateOpenAngle (FuelSchedule &schedule, uint16_t pwDegrees, uint16_t injAngle) |
| | Compute the injector open angle for an injection channel.
|
| |
| static uint16_t | updatePwAngleCache (uint16_t pw, injectorAngleCalcCache *pCache) |
| |
| static FORCE_INLINE uint32_t | _calculateAngularTime (const Schedule &schedule, uint16_t eventAngle, uint16_t crankAngle, uint16_t maxAngle) |
| |
| static FORCE_INLINE uint16_t | _adjustToTDC (int16_t angle, uint16_t angleOffset, uint16_t maxAngle) |
| |
| static FORCE_INLINE uint32_t | _calculateAngularTime (const Schedule &schedule, uint16_t angleOffset, uint16_t eventAngle, uint16_t crankAngle, uint16_t maxAngle) |
| |
| static uint32_t | calculateInjectorTimeout (const FuelSchedule &schedule, int16_t crankAngle, uint16_t openAngle) |
| | Calculate the time in uS from now to when the injector should be opened.
|
| |
| static int16_t | _calculateSparkAngle (const IgnitionSchedule &schedule, int8_t advance) |
| |
| static int16_t | _calculateCoilChargeAngle (uint16_t dwellAngle, int16_t dischargeAngle) |
| |
| static void | calculateIgnitionAngles (IgnitionSchedule &schedule, uint16_t dwellAngle, int8_t advance) |
| |
| static void | calculateIgnitionTrailingRotary (IgnitionSchedule &leading, uint16_t dwellAngle, int16_t rotarySplitDegrees, IgnitionSchedule &trailing) |
| |
| static uint32_t | _calculateIgnitionTimeout (const IgnitionSchedule &schedule, int16_t crankAngle) |
| |
| static void | adjustCrankAngle (IgnitionSchedule &schedule, int16_t crankAngle) |
| | Adjust the crank angle used to originally set the schedule.
|
| |
◆ _adjustToTDC()
◆ _calculateAngularTime() [1/2]
◆ _calculateAngularTime() [2/2]
◆ _calculateCoilChargeAngle()
◆ _calculateIgnitionTimeout()
◆ _calculateOpenAngle()
Compute the injector open angle for an injection channel.
- Parameters
-
| pwDegrees | How many crank degrees the calculated PW will take at the current speed |
| tdcOffset | The number of crank degrees until cylinder is at TDC (at rest) |
| injAngle | The requested injection angle |
- Returns
- uint16_t
◆ _calculateSparkAngle()
◆ adjustCrankAngle()
Adjust the crank angle used to originally set the schedule.
The assumption here is that we have a more accurate crank angle than was originally passed to calculateIgnitionTimeout. So we can increase the spark accuracy
- Parameters
-
| schedule | The schedule to modify |
| crankAngle | The new crank angle in degrees |
◆ calculateIgnitionAngles()
◆ calculateIgnitionTrailingRotary()
◆ calculateInjectorTimeout()
Calculate the time in uS from now to when the injector should be opened.
- Parameters
-
| schedule | The ignition channel |
| openAngle | The angle at which to open the injector |
| crankAngle | The current crank angle |
- Returns
- uint32_t
◆ updatePwAngleCache()