rusefi/firmware/controllers/algo/advance_map.h

30 lines
785 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/*
* @file advance_map.h
*
* @date Mar 27, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
#include "ignition_state_generated.h"
2019-11-14 21:00:13 -08:00
#pragma once
2015-07-10 06:01:56 -07:00
2024-09-24 23:52:14 -07:00
angle_t getWrappedAdvance(float rpm, float engineLoad);
angle_t getCylinderIgnitionTrim(size_t cylinderNumber, float rpm, float ignitionLoad);
2023-01-14 09:49:11 -08:00
/**
* this method is used to build default advance map
*/
2024-09-24 23:52:14 -07:00
float getInitialAdvance(float rpm, float map, float advanceMax);
// public only for unit tests
2024-09-24 23:52:14 -07:00
angle_t getCrankingAdvance(float rpm, float engineLoad);
angle_t getRunningAdvance(float rpm, float engineLoad);
angle_t getAdvanceCorrections(float engineLoad);
2022-04-13 13:39:59 -07:00
2024-09-24 23:52:14 -07:00
size_t getMultiSparkCount(float rpm);
2024-02-03 14:02:30 -08:00
void initIgnitionAdvanceControl();
class IgnitionState : public ignition_state_s {
2022-04-13 13:39:59 -07:00
public:
2024-09-24 23:21:39 -07:00
floatms_t getSparkDwell(float rpm);
};