Remove extra tooth log buffer definition. Slight RAM free up
This commit is contained in:
parent
06c9ae46c5
commit
30e566068c
|
@ -152,7 +152,7 @@ static inline void addToothLogEntry(unsigned long toothTime, bool whichTooth)
|
||||||
//If there has been a value logged above, update the indexes
|
//If there has been a value logged above, update the indexes
|
||||||
if(valueLogged == true)
|
if(valueLogged == true)
|
||||||
{
|
{
|
||||||
if(toothHistoryIndex < TOOTH_LOG_SIZE) { toothHistoryIndex++; BIT_CLEAR(currentStatus.status1, BIT_STATUS1_TOOTHLOG1READY); }
|
if(toothHistoryIndex < (TOOTH_LOG_SIZE-1)) { toothHistoryIndex++; BIT_CLEAR(currentStatus.status1, BIT_STATUS1_TOOTHLOG1READY); }
|
||||||
else { BIT_SET(currentStatus.status1, BIT_STATUS1_TOOTHLOG1READY); }
|
else { BIT_SET(currentStatus.status1, BIT_STATUS1_TOOTHLOG1READY); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,10 +235,8 @@
|
||||||
|
|
||||||
#ifndef UNIT_TEST
|
#ifndef UNIT_TEST
|
||||||
#define TOOTH_LOG_SIZE 127
|
#define TOOTH_LOG_SIZE 127
|
||||||
#define TOOTH_LOG_BUFFER 128 //256
|
|
||||||
#else
|
#else
|
||||||
#define TOOTH_LOG_SIZE 1
|
#define TOOTH_LOG_SIZE 1
|
||||||
#define TOOTH_LOG_BUFFER 1 //256
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define COMPOSITE_LOG_PRI 0
|
#define COMPOSITE_LOG_PRI 0
|
||||||
|
@ -569,8 +567,8 @@ extern volatile unsigned long ms_counter; //A counter that increments once per m
|
||||||
extern uint16_t fixedCrankingOverride;
|
extern uint16_t fixedCrankingOverride;
|
||||||
extern bool clutchTrigger;
|
extern bool clutchTrigger;
|
||||||
extern bool previousClutchTrigger;
|
extern bool previousClutchTrigger;
|
||||||
extern volatile uint32_t toothHistory[TOOTH_LOG_BUFFER];
|
extern volatile uint32_t toothHistory[TOOTH_LOG_SIZE];
|
||||||
extern volatile uint8_t compositeLogHistory[TOOTH_LOG_BUFFER];
|
extern volatile uint8_t compositeLogHistory[TOOTH_LOG_SIZE];
|
||||||
extern volatile bool fpPrimed; //Tracks whether or not the fuel pump priming has been completed yet
|
extern volatile bool fpPrimed; //Tracks whether or not the fuel pump priming has been completed yet
|
||||||
extern volatile bool injPrimed; //Tracks whether or not the injector priming has been completed yet
|
extern volatile bool injPrimed; //Tracks whether or not the injector priming has been completed yet
|
||||||
extern volatile unsigned int toothHistoryIndex;
|
extern volatile unsigned int toothHistoryIndex;
|
||||||
|
|
|
@ -131,8 +131,8 @@ volatile unsigned long ms_counter = 0; //A counter that increments once per ms
|
||||||
uint16_t fixedCrankingOverride = 0;
|
uint16_t fixedCrankingOverride = 0;
|
||||||
bool clutchTrigger;
|
bool clutchTrigger;
|
||||||
bool previousClutchTrigger;
|
bool previousClutchTrigger;
|
||||||
volatile uint32_t toothHistory[TOOTH_LOG_BUFFER]; ///< Tooth trigger history - delta time (in uS) from last tooth (Indexed by @ref toothHistoryIndex)
|
volatile uint32_t toothHistory[TOOTH_LOG_SIZE]; ///< Tooth trigger history - delta time (in uS) from last tooth (Indexed by @ref toothHistoryIndex)
|
||||||
volatile uint8_t compositeLogHistory[TOOTH_LOG_BUFFER];
|
volatile uint8_t compositeLogHistory[TOOTH_LOG_SIZE];
|
||||||
volatile bool fpPrimed = false; ///< Tracks whether or not the fuel pump priming has been completed yet
|
volatile bool fpPrimed = false; ///< Tracks whether or not the fuel pump priming has been completed yet
|
||||||
volatile bool injPrimed = false; ///< Tracks whether or not the injectors priming has been completed yet
|
volatile bool injPrimed = false; ///< Tracks whether or not the injectors priming has been completed yet
|
||||||
volatile unsigned int toothHistoryIndex = 0; ///< Current index to @ref toothHistory array
|
volatile unsigned int toothHistoryIndex = 0; ///< Current index to @ref toothHistory array
|
||||||
|
|
Loading…
Reference in New Issue