mirror of https://github.com/rusefi/speeduino.git
Remove extra ISR code
This commit is contained in:
parent
573036126e
commit
4bfab2e479
|
@ -540,7 +540,7 @@ void triggerSec_4G63()
|
|||
if(BIT_CHECK(currentStatus.engine, BIT_ENGINE_CRANK) || !currentStatus.hasSync)
|
||||
{
|
||||
triggerFilterTime = 1500; //If this is removed, can have trouble getting sync again after the engine is turned off (but ECU not reset).
|
||||
|
||||
|
||||
//Check the status of the crank trigger
|
||||
bool crank = digitalRead(pinTrigger);
|
||||
if(crank == HIGH)
|
||||
|
|
|
@ -1437,39 +1437,6 @@ void loop()
|
|||
|
||||
}
|
||||
|
||||
//************************************************************************************************
|
||||
//Interrupts
|
||||
|
||||
#if defined(ANALOG_H)
|
||||
//Analog ISR interrupt routine
|
||||
ISR(ADC_vect)
|
||||
{
|
||||
byte nChannel;
|
||||
int result = ADCL | (ADCH << 8);
|
||||
|
||||
ADCSRA = 0x6E; // ADC Auto Trigger disabled by clearing bit 7(ADEN)
|
||||
nChannel = ADMUX & 0x07;
|
||||
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
|
||||
if(ADCSRB & 0x08) { nChannel+=8; } //8 to 15
|
||||
if(nChannel==15)
|
||||
{
|
||||
ADMUX = 0x40; //channel 0
|
||||
ADCSRB = 0x00; //clear MUX5 bit
|
||||
}
|
||||
else if (nChannel==7) //channel 7
|
||||
{
|
||||
ADMUX = 0x40;
|
||||
ADCSRB = 0x08; //Set MUX5 bit
|
||||
}
|
||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
|
||||
if (nChannel==7) { ADMUX = 0x40; }
|
||||
#endif
|
||||
else { ADMUX++; }
|
||||
AnChannel[nChannel] = result;
|
||||
|
||||
ADCSRA = 0xEE; // ADC Interrupt Flag enabled
|
||||
}
|
||||
#endif
|
||||
|
||||
//These functions simply trigger the injector/coil driver off or on.
|
||||
//NOTE: squirt status is changed as per http://www.msextra.com/doc/ms1extra/COM_RS232.htm#Acmd
|
||||
|
|
Loading…
Reference in New Issue