Remove static declarations from corrections.ino (Did nothing)

This commit is contained in:
Josh Stewart 2020-02-03 17:35:29 +11:00
parent 5be1626bca
commit fd10cb729c
3 changed files with 24 additions and 22 deletions

View File

@ -22,17 +22,17 @@ byte correctionLaunch(); //Launch control correction
bool correctionDFCO(); //Decelleration fuel cutoff
int8_t correctionsIgn(int8_t advance);
static inline int8_t correctionFixedTiming(int8_t);
static inline int8_t correctionCrankingFixedTiming(int8_t);
static inline int8_t correctionFlexTiming(int8_t);
static inline int8_t correctionIATretard(int8_t);
static inline int8_t correctionCLTadvance(int8_t);
static inline int8_t correctionIdleAdvance(int8_t);
static inline int8_t correctionSoftRevLimit(int8_t);
static inline int8_t correctionNitrous(int8_t);
static inline int8_t correctionSoftLaunch(int8_t);
static inline int8_t correctionSoftFlatShift(int8_t);
static inline int8_t correctionKnock(int8_t);
int8_t correctionFixedTiming(int8_t);
int8_t correctionCrankingFixedTiming(int8_t);
int8_t correctionFlexTiming(int8_t);
int8_t correctionIATretard(int8_t);
int8_t correctionCLTadvance(int8_t);
int8_t correctionIdleAdvance(int8_t);
int8_t correctionSoftRevLimit(int8_t);
int8_t correctionNitrous(int8_t);
int8_t correctionSoftLaunch(int8_t);
int8_t correctionSoftFlatShift(int8_t);
int8_t correctionKnock(int8_t);
uint16_t correctionsDwell(uint16_t dwell);

View File

@ -533,21 +533,21 @@ int8_t correctionsIgn(int8_t base_advance)
return advance;
}
static inline int8_t correctionFixedTiming(int8_t advance)
int8_t correctionFixedTiming(int8_t advance)
{
int8_t ignFixValue = advance;
if (configPage2.fixAngEnable == 1) { ignFixValue = configPage4.FixAng; } //Check whether the user has set a fixed timing angle
return ignFixValue;
}
static inline int8_t correctionCrankingFixedTiming(int8_t advance)
int8_t correctionCrankingFixedTiming(int8_t advance)
{
byte ignCrankFixValue = advance;
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) ) { ignCrankFixValue = configPage4.CrankAng; } //Use the fixed cranking ignition angle
return ignCrankFixValue;
}
static inline int8_t correctionFlexTiming(int8_t advance)
int8_t correctionFlexTiming(int8_t advance)
{
byte ignFlexValue = advance;
if( configPage2.flexEnabled == 1 ) //Check for flex being enabled
@ -558,7 +558,7 @@ static inline int8_t correctionFlexTiming(int8_t advance)
return ignFlexValue;
}
static inline int8_t correctionIATretard(int8_t advance)
int8_t correctionIATretard(int8_t 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
@ -570,7 +570,7 @@ static inline int8_t correctionIATretard(int8_t advance)
return ignIATValue;
}
static inline int8_t correctionCLTadvance(int8_t advance)
int8_t correctionCLTadvance(int8_t advance)
{
int8_t ignCLTValue = advance;
//Adjust the advance based on CLT.
@ -580,7 +580,7 @@ static inline int8_t correctionCLTadvance(int8_t advance)
return ignCLTValue;
}
static inline int8_t correctionIdleAdvance(int8_t advance)
int8_t correctionIdleAdvance(int8_t advance)
{
int8_t ignIdleValue = advance;
@ -608,7 +608,7 @@ static inline int8_t correctionIdleAdvance(int8_t advance)
return ignIdleValue;
}
static inline int8_t correctionSoftRevLimit(int8_t advance)
int8_t correctionSoftRevLimit(int8_t advance)
{
byte ignSoftRevValue = advance;
BIT_CLEAR(currentStatus.spark, BIT_SPARK_SFTLIM);
@ -617,7 +617,7 @@ static inline int8_t correctionSoftRevLimit(int8_t advance)
return ignSoftRevValue;
}
static inline int8_t correctionNitrous(int8_t advance)
int8_t correctionNitrous(int8_t advance)
{
byte ignNitrous = advance;
//Check if nitrous is currently active
@ -637,7 +637,7 @@ static inline int8_t correctionNitrous(int8_t advance)
return ignNitrous;
}
static inline int8_t correctionSoftLaunch(int8_t advance)
int8_t correctionSoftLaunch(int8_t advance)
{
byte ignSoftLaunchValue = advance;
//SoftCut rev limit for 2-step launch control.
@ -656,7 +656,7 @@ static inline int8_t correctionSoftLaunch(int8_t advance)
return ignSoftLaunchValue;
}
static inline int8_t correctionSoftFlatShift(int8_t advance)
int8_t correctionSoftFlatShift(int8_t advance)
{
byte ignSoftFlatValue = advance;
@ -670,7 +670,7 @@ static inline int8_t correctionSoftFlatShift(int8_t advance)
return ignSoftFlatValue;
}
static inline int8_t correctionKnock(int8_t advance)
int8_t correctionKnock(int8_t advance)
{
byte knockRetard = 0;

View File

@ -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
noInterrupts();
//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->Status = PENDING; //Turn this schedule on
targetSchedule->schedulesSet++; //Increment the number of times this schedule has been set
//*targetSchedule->compare = targetSchedule->startCompare;
FUEL1_COMPARE = targetSchedule->startCompare; //Insert corrector compare HERE!
interrupts();
FUEL1_TIMER_ENABLE();
}