Speeduino
Loading...
Searching...
No Matches
schedule_calcs.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include "scheduler.h"
5
6extern int ignition1StartAngle;
7extern int ignition1EndAngle;
8extern int channel1IgnDegrees;
10extern int ignition2StartAngle;
11extern int ignition2EndAngle;
12extern int channel2IgnDegrees;
14extern int ignition3StartAngle;
15extern int ignition3EndAngle;
16extern int channel3IgnDegrees;
18extern int ignition4StartAngle;
19extern int ignition4EndAngle;
20extern int channel4IgnDegrees;
22#if (IGN_CHANNELS >= 5)
23extern int ignition5StartAngle;
24extern int ignition5EndAngle;
25extern int channel5IgnDegrees;
26#endif
27#if (IGN_CHANNELS >= 6)
28extern int ignition6StartAngle;
29extern int ignition6EndAngle;
30extern int channel6IgnDegrees;
31#endif
32#if (IGN_CHANNELS >= 7)
33extern int ignition7StartAngle;
34extern int ignition7EndAngle;
35extern int channel7IgnDegrees;
36#endif
37#if (IGN_CHANNELS >= 8)
38extern int ignition8StartAngle;
39extern int ignition8EndAngle;
40extern int channel8IgnDegrees;
41#endif
42
43extern int channel1InjDegrees;
44extern int channel2InjDegrees;
45extern int channel3InjDegrees;
46extern int channel4InjDegrees;
47#if (INJ_CHANNELS >= 5)
48extern int channel5InjDegrees;
49#endif
50#if (INJ_CHANNELS >= 6)
51extern int channel6InjDegrees;
52#endif
53#if (INJ_CHANNELS >= 7)
54extern int channel7InjDegrees;
55#endif
56#if (INJ_CHANNELS >= 8)
57extern int channel8InjDegrees;
58#endif
59
61
63
65
66// Ignition for rotary.
68
70
71#include "schedule_calcs.hpp"
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349
page_iterator_t advance(const page_iterator_t &it)
Definition pages.cpp:450
int channel4IgnDegrees
Definition schedule_calcs.cpp:17
int ignition2StartAngle
Definition schedule_calcs.cpp:7
int ignition1EndAngle
Definition schedule_calcs.cpp:4
int ignition4EndAngle
Definition schedule_calcs.cpp:16
int ignition4StartAngle
Definition schedule_calcs.cpp:15
static uint16_t calculateInjectorStartAngle(uint16_t PWdivTimerPerDegree, int16_t injChannelDegrees, uint16_t injAngle)
static void calculateIgnitionAngle(const uint16_t dwellAngle, const uint16_t channelIgnDegrees, int8_t advance, int *pEndAngle, int *pStartAngle)
int channel2InjDegrees
Definition schedule_calcs.cpp:41
static void calculateIgnitionTrailingRotary(uint16_t dwellAngle, int rotarySplitDegrees, int leadIgnitionAngle, int *pEndAngle, int *pStartAngle)
int ignition1StartAngle
Definition schedule_calcs.cpp:3
static uint32_t calculateIgnitionTimeout(const IgnitionSchedule &schedule, int startAngle, int channelIgnDegrees, int crankAngle)
int channel2IgnDegrees
Definition schedule_calcs.cpp:9
int channel4InjDegrees
Definition schedule_calcs.cpp:43
int channel1InjDegrees
Definition schedule_calcs.cpp:40
int ignition3EndAngle
Definition schedule_calcs.cpp:12
int channel3InjDegrees
Definition schedule_calcs.cpp:42
int channel1IgnDegrees
Definition schedule_calcs.cpp:5
int ignition3StartAngle
Definition schedule_calcs.cpp:11
static uint32_t calculateInjectorTimeout(const FuelSchedule &schedule, int channelInjDegrees, int injectorStartAngle, int crankAngle)
int ignition2EndAngle
Definition schedule_calcs.cpp:8
int channel3IgnDegrees
Definition schedule_calcs.cpp:13
Definition scheduler.h:167
Definition scheduler.h:114