From 0b8ebdbf96e64faa4c458889deefa61c8dfc0302 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 8 Sep 2019 16:45:02 -0400 Subject: [PATCH] A/C NA6 compressor progress --- firmware/config/engines/mazda_miata_1_6.cpp | 4 ++++ firmware/controllers/system/efi_gpio.h | 1 + firmware/controllers/system_fsio.h | 6 +++--- firmware/controllers/system_fsio.txt | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index 0edab844ac..bcb1ae8582 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -276,6 +276,10 @@ void setMiataNA6_MAP_Frankenso(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // green wire from 1Q/W17 to bottom of W46 engineConfiguration->acSwitchAdc = EFI_ADC_6; // PA6 + // W57 PE3 A/C compressor relay out + boardConfiguration->acRelayPin = GPIOE_3; + // W58 PE4 A/C fan relay out + miataNAcommon(PASS_CONFIG_PARAMETER_SIGNATURE); } diff --git a/firmware/controllers/system/efi_gpio.h b/firmware/controllers/system/efi_gpio.h index 583bd5460b..6027013163 100644 --- a/firmware/controllers/system/efi_gpio.h +++ b/firmware/controllers/system/efi_gpio.h @@ -123,6 +123,7 @@ public: void stopIgnitionPins(); OutputPin mainRelay; OutputPin fanRelay; + // see acRelayPin OutputPin acRelay; OutputPin fuelPumpRelay; OutputPin o2heater; diff --git a/firmware/controllers/system_fsio.h b/firmware/controllers/system_fsio.h index b7574963db..4213195e6b 100644 --- a/firmware/controllers/system_fsio.h +++ b/firmware/controllers/system_fsio.h @@ -1,6 +1,6 @@ // this https://en.wikipedia.org/wiki/Reverse_Polish_notation is generated automatically // from controllers/system_fsio.txt -// on 2019-05-31_16_20_04 +// on 2019-09-08_16_41_20_788 // // // in this file we define system FSIO expressions @@ -25,8 +25,8 @@ // Human-readable: coolant > 120 #define TOO_HOT_LOGIC "coolant 120 >" -// Human-readable: ac_on_switch -#define AC_RELAY_LOGIC "ac_on_switch" +// Human-readable: ac_on_switch & rpm > 850 +#define AC_RELAY_LOGIC "ac_on_switch rpm & 850 >" // Combined RPM, CLT and VBATT warning light // Human-readable: (rpm > fsio_setting(2)) | ((coolant > fsio_setting(3)) | (vbatt < fsio_setting(4))) diff --git a/firmware/controllers/system_fsio.txt b/firmware/controllers/system_fsio.txt index 88f59152b7..fc2761e3ff 100644 --- a/firmware/controllers/system_fsio.txt +++ b/firmware/controllers/system_fsio.txt @@ -17,7 +17,7 @@ ALTERNATOR_LOGIC=vbatt < 14.5 TOO_HOT_LOGIC=coolant > 120 -AC_RELAY_LOGIC=ac_on_switch +AC_RELAY_LOGIC=ac_on_switch & rpm > 850 # Combined RPM, CLT and VBATT warning light COMBINED_WARNING_LIGHT=(rpm > fsio_setting(2)) | ((coolant > fsio_setting(3)) | (vbatt < fsio_setting(4)))