Index: fuelcalc.c =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/fuelcalc.c,v retrieving revision 1.142 diff -r1.142 fuelcalc.c 636,637c636,637 < // emil asked that config.als_rev_limit can raise rev_limit not just decrease it < active_rev_limit = is_als_active() ? config.als_rev_limit : config.rev_limit ; --- > // emil asked that config.launch_rpm can raise rev_limit not just decrease it > active_rev_limit = is_launch_active() ? config.launch_rpm : config.rev_limit ; 651c651 < if (als_deactivated && tps_overrun()) return 0; // we don't want to cut fuel when ALS switch is ON! --- > if (!is_als_active() && tps_overrun()) return 0; // we don't want to cut fuel when ALS switch is ON! 900c900 < uint8_t my_status, rpm, tps, als_sw_off; --- > uint8_t my_status, rpm, tps, als_sw_off, launch_sw_off; 905a906 > launch_sw_off=launch_deactivated; 909,910c910 < rpm <= config.als_lowrpm || < tps > config.als_maxtps) --- > ((rpm <= config.als_lowrpm || tps > config.als_maxtps) && (!is_launch_active()))) 923a924,934 > > if (launch_sw_off) { > cli(); > engine.status_ext &= ~_BV(launch_active); > sei(); > } else { > cli(); > engine.status_ext |= _BV(launch_active); > sei(); > } > Index: fuelcalc.h =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/fuelcalc.h,v retrieving revision 1.24 diff -r1.24 fuelcalc.h 51a52 > #define launch_deactivated (ALS_SWITCH_IN & _BV(LAUNCH_PIN)) Index: global.h =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/global.h,v retrieving revision 1.226 diff -r1.226 global.h 147a148 > #define launch_active 6 // launch control 149a151 > #define is_launch_active() (engine.status_ext & _BV( launch_active )) 478c480 < uint8_t als_rev_limit; // Rev limit when ALS active [100 rpm] --- > uint8_t launch_rpm; // Launch control rpm (no matter als_lowrpm) [100 rpm] 522c524,525 < --- > > uint8_t rpm_channel; // RPM signal channel Index: hwdef_v3.h =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/hwdef_v3.h,v retrieving revision 1.11 diff -r1.11 hwdef_v3.h 92c92 < //#define SCL 0 --- > #define SCL 0 // default launch control on/off pin 138a139 > #define LAUNCH_PIN SCL Index: iac.c =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/iac.c,v retrieving revision 1.68 diff -r1.68 iac.c 183c183 < if ((config.iac_conf & _BV(advance_control)) && (engine.status & _BV(idle))) { --- > if ((config.iac_conf & _BV(advance_control)) && (engine.status & _BV(idle)) && (!is_als_active())) { 273c273 < if (engine.tps <= config.iac_tps_thres) { --- > if ((engine.tps <= config.iac_tps_thres) && (!is_als_active())) { 424c424 < } else { // not in idle-mode --- > } else if (!is_als_active()) { // not in idle-mode 447c447 < } --- > } else set_iac_pos(config.iac_max_steps); // ALS => full open IAC Index: avr/ioinit.h =================================================================== RCS file: /cvsroot/megasquirtavr/firmware/avr/ioinit.h,v retrieving revision 1.1 diff -r1.1 ioinit.h 89a90,91 > ALS_SWITCH_DDR &= ~_BV(LAUNCH_PIN); > ALS_SWITCH_PORT |= _BV(LAUNCH_PIN);