diff options
-rw-r--r-- | globals.h | 2 | ||||
-rw-r--r-- | menus.c | 26 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 18 insertions, 12 deletions
@@ -432,7 +432,7 @@ typedef struct { short telnet_session_timeout; /* 56 - timeout in seconds */ - char unusedx; /* 58 */ + char older_keypad_3_alarm_pins; /* 58 */ short spare2; /* 59 */ char ChanKey_route; /* 61 */ char on_off_used; /* 62 */ @@ -2832,6 +2832,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower #define Jig_Input 0x08 /* jig open */ int new_button_state; + bool Overload_Alarm, Over_Temp_Alarm, Over_Volt_Alarm, Over_Other_Alarm, Jig_Alarm; /* read the button data */ new_button_state = I2C_Read(PCF8574A+Button_Press_Port); @@ -2867,13 +2868,18 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower /* reenable encoder */ I2C_Write(PCF8574A+Button_Press_Port,255); + // on all keypads + Overload_Alarm = !(*button_port_val & Overload_Input); + Over_Temp_Alarm = !(*upper_encoder_val & Over_Temp); + Over_Volt_Alarm = !(*upper_encoder_val & Over_Volt); + Over_Other_Alarm = !(*upper_encoder_val & Over_Other); + + // only on newer keypad boards + Jig_Alarm = !(*upper_encoder_val & Jig_Input) && !globals.Flash.older_keypad_3_alarm_pins; + /* alarm condition */ /* valid for both local and remote modes */ - if ( !(*upper_encoder_val & Over_Temp) - || !(*upper_encoder_val & Over_Volt) - || !(*upper_encoder_val & Jig_Input) - || !(*upper_encoder_val & Over_Other) - || !(*button_port_val & Overload_Input) ) { + if (Over_Temp_Alarm || Over_Volt_Alarm || Jig_Alarm || Over_Other_Alarm || Overload_Alarm) { /* disable all outputs immediately */ int outputs_turned_off = 0; @@ -2890,15 +2896,15 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower /* Report the problem if outputs had to be turned off. */ if ((outputs_turned_off > 0) || globals.Flash.warn_even_if_output_off) { /* flag the problem */ - if (!(*upper_encoder_val & Over_Temp)) { + if (Over_Temp_Alarm) { queue_and_broadcast_sensor_alarm(Overtemp_Detected); - } else if (!(*upper_encoder_val & Over_Volt)) { + } else if (Over_Volt_Alarm) { queue_and_broadcast_sensor_alarm(Overvolt_Detected); - } else if (!(*upper_encoder_val & Jig_Input)) { + } else if (Jig_Alarm) { queue_and_broadcast_sensor_alarm(Jig_Open_Detected); - } else if (!(*upper_encoder_val & Over_Other)) { + } else if (Over_Other_Alarm) { queue_and_broadcast_sensor_alarm(Device_Specific_Aux_Error_Detected); - } else if (!(*button_port_val & Overload_Input)) { + } else if (Overload_Alarm) { queue_and_broadcast_sensor_alarm(Overload_Detected); } } @@ -1,2 +1,2 @@ -#define FW_VERSION "6.4.37" +#define FW_VERSION "6.4.38" #define SCPI_version "1996.0" |