Remove static declarations from corrections.ino (Did nothing)
This commit is contained in:
parent
5be1626bca
commit
fd10cb729c
|
@ -22,17 +22,17 @@ byte correctionLaunch(); //Launch control correction
|
||||||
bool correctionDFCO(); //Decelleration fuel cutoff
|
bool correctionDFCO(); //Decelleration fuel cutoff
|
||||||
|
|
||||||
int8_t correctionsIgn(int8_t advance);
|
int8_t correctionsIgn(int8_t advance);
|
||||||
static inline int8_t correctionFixedTiming(int8_t);
|
int8_t correctionFixedTiming(int8_t);
|
||||||
static inline int8_t correctionCrankingFixedTiming(int8_t);
|
int8_t correctionCrankingFixedTiming(int8_t);
|
||||||
static inline int8_t correctionFlexTiming(int8_t);
|
int8_t correctionFlexTiming(int8_t);
|
||||||
static inline int8_t correctionIATretard(int8_t);
|
int8_t correctionIATretard(int8_t);
|
||||||
static inline int8_t correctionCLTadvance(int8_t);
|
int8_t correctionCLTadvance(int8_t);
|
||||||
static inline int8_t correctionIdleAdvance(int8_t);
|
int8_t correctionIdleAdvance(int8_t);
|
||||||
static inline int8_t correctionSoftRevLimit(int8_t);
|
int8_t correctionSoftRevLimit(int8_t);
|
||||||
static inline int8_t correctionNitrous(int8_t);
|
int8_t correctionNitrous(int8_t);
|
||||||
static inline int8_t correctionSoftLaunch(int8_t);
|
int8_t correctionSoftLaunch(int8_t);
|
||||||
static inline int8_t correctionSoftFlatShift(int8_t);
|
int8_t correctionSoftFlatShift(int8_t);
|
||||||
static inline int8_t correctionKnock(int8_t);
|
int8_t correctionKnock(int8_t);
|
||||||
|
|
||||||
uint16_t correctionsDwell(uint16_t dwell);
|
uint16_t correctionsDwell(uint16_t dwell);
|
||||||
|
|
||||||
|
|
|
@ -533,21 +533,21 @@ int8_t correctionsIgn(int8_t base_advance)
|
||||||
return advance;
|
return advance;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionFixedTiming(int8_t advance)
|
int8_t correctionFixedTiming(int8_t advance)
|
||||||
{
|
{
|
||||||
int8_t ignFixValue = advance;
|
int8_t ignFixValue = advance;
|
||||||
if (configPage2.fixAngEnable == 1) { ignFixValue = configPage4.FixAng; } //Check whether the user has set a fixed timing angle
|
if (configPage2.fixAngEnable == 1) { ignFixValue = configPage4.FixAng; } //Check whether the user has set a fixed timing angle
|
||||||
return ignFixValue;
|
return ignFixValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionCrankingFixedTiming(int8_t advance)
|
int8_t correctionCrankingFixedTiming(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignCrankFixValue = advance;
|
byte ignCrankFixValue = advance;
|
||||||
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
|
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
|
||||||
return ignCrankFixValue;
|
return ignCrankFixValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionFlexTiming(int8_t advance)
|
int8_t correctionFlexTiming(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignFlexValue = advance;
|
byte ignFlexValue = advance;
|
||||||
if( configPage2.flexEnabled == 1 ) //Check for flex being enabled
|
if( configPage2.flexEnabled == 1 ) //Check for flex being enabled
|
||||||
|
@ -558,7 +558,7 @@ static inline int8_t correctionFlexTiming(int8_t advance)
|
||||||
return ignFlexValue;
|
return ignFlexValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionIATretard(int8_t advance)
|
int8_t correctionIATretard(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignIATValue = advance;
|
byte ignIATValue = advance;
|
||||||
//Adjust the advance based on IAT. If the adjustment amount is greater than the current advance, just set advance to 0
|
//Adjust the advance based on IAT. If the adjustment amount is greater than the current advance, just set advance to 0
|
||||||
|
@ -570,7 +570,7 @@ static inline int8_t correctionIATretard(int8_t advance)
|
||||||
return ignIATValue;
|
return ignIATValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionCLTadvance(int8_t advance)
|
int8_t correctionCLTadvance(int8_t advance)
|
||||||
{
|
{
|
||||||
int8_t ignCLTValue = advance;
|
int8_t ignCLTValue = advance;
|
||||||
//Adjust the advance based on CLT.
|
//Adjust the advance based on CLT.
|
||||||
|
@ -580,7 +580,7 @@ static inline int8_t correctionCLTadvance(int8_t advance)
|
||||||
return ignCLTValue;
|
return ignCLTValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionIdleAdvance(int8_t advance)
|
int8_t correctionIdleAdvance(int8_t advance)
|
||||||
{
|
{
|
||||||
|
|
||||||
int8_t ignIdleValue = advance;
|
int8_t ignIdleValue = advance;
|
||||||
|
@ -608,7 +608,7 @@ static inline int8_t correctionIdleAdvance(int8_t advance)
|
||||||
return ignIdleValue;
|
return ignIdleValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionSoftRevLimit(int8_t advance)
|
int8_t correctionSoftRevLimit(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignSoftRevValue = advance;
|
byte ignSoftRevValue = advance;
|
||||||
BIT_CLEAR(currentStatus.spark, BIT_SPARK_SFTLIM);
|
BIT_CLEAR(currentStatus.spark, BIT_SPARK_SFTLIM);
|
||||||
|
@ -617,7 +617,7 @@ static inline int8_t correctionSoftRevLimit(int8_t advance)
|
||||||
return ignSoftRevValue;
|
return ignSoftRevValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionNitrous(int8_t advance)
|
int8_t correctionNitrous(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignNitrous = advance;
|
byte ignNitrous = advance;
|
||||||
//Check if nitrous is currently active
|
//Check if nitrous is currently active
|
||||||
|
@ -637,7 +637,7 @@ static inline int8_t correctionNitrous(int8_t advance)
|
||||||
return ignNitrous;
|
return ignNitrous;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionSoftLaunch(int8_t advance)
|
int8_t correctionSoftLaunch(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignSoftLaunchValue = advance;
|
byte ignSoftLaunchValue = advance;
|
||||||
//SoftCut rev limit for 2-step launch control.
|
//SoftCut rev limit for 2-step launch control.
|
||||||
|
@ -656,7 +656,7 @@ static inline int8_t correctionSoftLaunch(int8_t advance)
|
||||||
return ignSoftLaunchValue;
|
return ignSoftLaunchValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionSoftFlatShift(int8_t advance)
|
int8_t correctionSoftFlatShift(int8_t advance)
|
||||||
{
|
{
|
||||||
byte ignSoftFlatValue = advance;
|
byte ignSoftFlatValue = advance;
|
||||||
|
|
||||||
|
@ -670,7 +670,7 @@ static inline int8_t correctionSoftFlatShift(int8_t advance)
|
||||||
return ignSoftFlatValue;
|
return ignSoftFlatValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int8_t correctionKnock(int8_t advance)
|
int8_t correctionKnock(int8_t advance)
|
||||||
{
|
{
|
||||||
byte knockRetard = 0;
|
byte knockRetard = 0;
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,13 @@ void setFuelSchedule(struct Schedule *targetSchedule, unsigned long timeout, uns
|
||||||
//The following must be enclosed in the noInterupts block to avoid contention caused if the relevant interrupt fires before the state is fully set
|
//The following must be enclosed in the noInterupts block to avoid contention caused if the relevant interrupt fires before the state is fully set
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
//targetSchedule->startCompare = *targetSchedule->counter + timeout_timer_compare;
|
//targetSchedule->startCompare = *targetSchedule->counter + timeout_timer_compare;
|
||||||
|
targetSchedule->startCompare = FUEL1_COUNTER + timeout_timer_compare; //Insert correct counter HERE!
|
||||||
targetSchedule->endCompare = targetSchedule->startCompare + uS_TO_TIMER_COMPARE(duration);
|
targetSchedule->endCompare = targetSchedule->startCompare + uS_TO_TIMER_COMPARE(duration);
|
||||||
targetSchedule->Status = PENDING; //Turn this schedule on
|
targetSchedule->Status = PENDING; //Turn this schedule on
|
||||||
targetSchedule->schedulesSet++; //Increment the number of times this schedule has been set
|
targetSchedule->schedulesSet++; //Increment the number of times this schedule has been set
|
||||||
|
|
||||||
//*targetSchedule->compare = targetSchedule->startCompare;
|
//*targetSchedule->compare = targetSchedule->startCompare;
|
||||||
|
FUEL1_COMPARE = targetSchedule->startCompare; //Insert corrector compare HERE!
|
||||||
interrupts();
|
interrupts();
|
||||||
FUEL1_TIMER_ENABLE();
|
FUEL1_TIMER_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue