#include "scheduler.h"
#include "config_pages.h"
#include "statuses.h"
Go to the source code of this file.
|
| void | applyOverDwellProtection (const config4 &page4, const statuses ¤t) |
| | Check that no ignition channel has been charging the coil for too long.
|
| |
| void | calculateIgnitionAngles (const config2 &page2, const config4 &page4, const config13 &page13, statuses ¤t) |
| | Calculate the charge & discharge angles for all ignition channels.
|
| |
| void | setIgnitionChannels (const statuses ¤t, uint16_t crankAngle, uint16_t dwellTime) |
| | Schedule all ignition channels.
|
| |
| void | startIgnitionSchedulers (void) |
| | Start the timers that drive schedulers
|
| |
| void | stopIgnitionSchedulers (void) |
| | Stop the timers that drive schedulers
|
| |
| void | initialiseIgnitionSchedules (statuses ¤t, const config2 &page2, config4 &page4, const config10 &page10, const pinNumbers_t &pins) |
| | Initialise all ignition schedules.
|
| |
| void | stopAllCoilsCharging (void) |
| | Utility function to stop charging all ignition coils.
|
| |
◆ applyOverDwellProtection()
| void applyOverDwellProtection |
( |
const config4 & |
page4, |
|
|
const statuses & |
current |
|
) |
| |
Check that no ignition channel has been charging the coil for too long.
The over dwell protection system runs independently of the standard ignition schedules and monitors the time that each ignition output has been active. If the active time exceeds the tune defined amount, the output will be ended to prevent damage to coils.
- Note
- Must be called once per millisecond by an external timer.
◆ calculateIgnitionAngles()
Calculate the charge & discharge angles for all ignition channels.
- Parameters
-
| page2 | The tune |
| page4 | The tune |
| page13 | The tune |
| current | Current system state |
◆ initialiseIgnitionSchedules()
Initialise all ignition schedules.
◆ setIgnitionChannels()
| void setIgnitionChannels |
( |
const statuses & |
current, |
|
|
uint16_t |
crankAngle, |
|
|
uint16_t |
dwellTime |
|
) |
| |
Schedule all ignition channels.
- Parameters
-
| current | Current system state |
| crankAngle | Crank angle |
| dwellTime | Target dwell time |
◆ startIgnitionSchedulers()
| void startIgnitionSchedulers |
( |
void |
| ) |
|
Start the timers that drive schedulers
◆ stopAllCoilsCharging()
| void stopAllCoilsCharging |
( |
void |
| ) |
|
Utility function to stop charging all ignition coils.
◆ stopIgnitionSchedulers()
| void stopIgnitionSchedulers |
( |
void |
| ) |
|
Stop the timers that drive schedulers
◆ ignitionSchedule1