Speeduino
Loading...
Searching...
No Matches
perToothIgnition.h
Go to the documentation of this file.
1#pragma once
2
3#include "decoder_state.h"
4#include "config_pages.h"
5#include "statuses.h"
6
7namespace decoders {
8namespace shared {
9
10inline uint16_t clampToToothCount(const config4 &page4, int16_t toothNum, uint8_t toothAdder) {
11 int16_t toothRange = (int16_t)page4.triggerTeeth + (int16_t)toothAdder;
12 return (uint16_t)nudge((int16_t)1, (int16_t)(toothRange+1), toothNum);
13}
14
15void checkPerToothTiming(const statuses &current, const state_t &decoderState, const config4 &page4, int16_t crankAngle, uint16_t currentTooth);
16
17}
18}
The tune page structs and related defines.
const config4 & page4
Definition engineProtection.cpp:172
static T nudge(T min, T max, T value)
Make **one* pass at correcting the value into the range [ min, max)
Definition maths.h:351
void checkPerToothTiming(const statuses &current, const state_t &decoderState, const config4 &page4, int16_t crankAngle, uint16_t currentTooth)
Definition perToothIgnition.cpp:10
uint16_t clampToToothCount(const config4 &page4, int16_t toothNum, uint8_t toothAdder)
Definition perToothIgnition.h:10
Definition basicDistributor.cpp:8
const config2 const config4 const config6 const config10 statuses & current
Definition scheduler_fuel_controller.cpp:913
const config4 uint16_t crankAngle
Definition scheduler_ignition_controller.cpp:724
The statuses struct and related defines.
Definition config_pages.h:357
byte triggerTeeth
The full count of teeth on the trigger wheel if there were no gaps.
Definition config_pages.h:393
The status struct with current values for all 'live' variables.
Definition statuses.h:131