random cleanup
This commit is contained in:
parent
3016f9a9bd
commit
7be441a1bc
|
@ -34,24 +34,25 @@ void TriggerStimulatorHelper::feedSimulatedEvent(TriggerState *state, TriggerSha
|
|||
efiAssertVoid(CUSTOM_ERR_6593, shape->getSize() > 0, "size not zero");
|
||||
int stateIndex = i % shape->getSize();
|
||||
int size = shape->getSize();
|
||||
int prevIndex = getPreviousIndex(stateIndex, shape->getSize());
|
||||
|
||||
|
||||
int loopIndex = i / shape->getSize();
|
||||
|
||||
int time = (int) (SIMULATION_CYCLE_PERIOD * (loopIndex + shape->wave.getSwitchTime(stateIndex)));
|
||||
|
||||
MultiWave *multiWave = &shape->wave;
|
||||
|
||||
#if EFI_UNIT_TEST
|
||||
int prevIndex = getPreviousIndex(stateIndex, shape->getSize());
|
||||
|
||||
pin_state_t primaryWheelState = multiWave->getChannelState(0, prevIndex);
|
||||
pin_state_t newPrimaryWheelState = multiWave->getChannelState(0, stateIndex);
|
||||
|
||||
pin_state_t secondaryWheelState = multiWave->getChannelState(1, prevIndex);
|
||||
pin_state_t newSecondaryWheelState = multiWave->getChannelState(1, stateIndex);
|
||||
|
||||
pin_state_t thirdWheelState = multiWave->getChannelState(2, prevIndex);
|
||||
pin_state_t new3rdWheelState = multiWave->getChannelState(2, stateIndex);
|
||||
// pin_state_t thirdWheelState = multiWave->getChannelState(2, prevIndex);
|
||||
// pin_state_t new3rdWheelState = multiWave->getChannelState(2, stateIndex);
|
||||
|
||||
#if EFI_UNIT_TEST
|
||||
if (printTriggerDebug) {
|
||||
printf("feedSimulatedEvent: %d>%d primary %d>%d secondary %d>%d\r\n", prevIndex, stateIndex, primaryWheelState, newPrimaryWheelState,
|
||||
secondaryWheelState, newSecondaryWheelState );
|
||||
|
|
|
@ -180,11 +180,13 @@ static THD_FUNCTION(waThread, arg) {
|
|||
#endif /* EFI_ENGINE_SNIFFER */
|
||||
}
|
||||
|
||||
/*
|
||||
static uint32_t getWaveLowWidth(int index) {
|
||||
WaveReader *reader = &readers[index];
|
||||
ensureInitialized(reader);
|
||||
return reader->last_wave_low_widthUs;
|
||||
}
|
||||
*/
|
||||
|
||||
static float getSignalOnTime(int index) {
|
||||
WaveReader *reader = &readers[index];
|
||||
|
|
|
@ -47,7 +47,7 @@ static bool isJitter() {
|
|||
return false;
|
||||
}
|
||||
|
||||
static void extCallback(int channel) {
|
||||
static void extCallback(ioportmask_t channel) {
|
||||
if (isJitter())
|
||||
return;
|
||||
joyTotal++;
|
||||
|
|
|
@ -120,7 +120,6 @@ int getMaxUsedStack(uint8_t *ptr, int size) {
|
|||
* maximum used stack size total stack buffer size minus position of first modified byte
|
||||
*/
|
||||
#if ! EFI_UNIT_TEST
|
||||
int used = 0;
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (ptr[i] != CH_DBG_STACK_FILL_VALUE) {
|
||||
return size - i;
|
||||
|
|
Loading…
Reference in New Issue