diff options
-rw-r--r-- | error_utils.c | 5 | ||||
-rw-r--r-- | flash.c | 1 | ||||
-rw-r--r-- | globals.h | 5 | ||||
-rw-r--r-- | menus.c | 4 |
4 files changed, 14 insertions, 1 deletions
diff --git a/error_utils.c b/error_utils.c index 297f6fa..265ae75 100644 --- a/error_utils.c +++ b/error_utils.c @@ -53,6 +53,7 @@ void set_gpib_error_flags (int error_num) case Overload_Detected: case Overtemp_Detected: case Overvolt_Detected: + case Jig_Open_Detected: case Device_Specific_Aux_Error_Detected: case queue_overflow: case CalibrationPercentError: @@ -454,6 +455,10 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-300,"Power supply overload detected. Output disabled."); break; + case Jig_Open_Detected: + format_error_text(response,-300,globals.Flash.jig_error_message); + break; + case Overtemp_Detected: format_error_text(response,-300,globals.Flash.ot_error_message); break; @@ -897,6 +897,7 @@ static void initFlashValues(FlashStruct *mem) strcpy(mem->aux_error_message,"PRF too high! Output disabled."); strcpy(mem->ot_error_message,"Over-heating problem. Output off."); strcpy(mem->ov_error_message,"Over-voltage/over-current. Output off."); + strcpy(mem->jig_error_message,"Jig lid is open. Output off."); /* default PW DACs */ mem->pw_dac[0]=2; /* channel 1: ONLY used for EXTERNAL voltage-controlled PW */ @@ -114,6 +114,7 @@ #define Between_0_and_10_Volts 96 #define pw_rc_limit 97 #define HVPS_Current_Too_High 98 +#define Jig_Open_Detected 99 #define YES 1 #define NO 0 @@ -832,7 +833,9 @@ typedef struct { float max_mon_steps_before_reset_average[max_channels]; // size 8, addr 37412 - 5 steps for AVO-8E3, maybe more for 156A? - char flash_end; // addr 37420 + char jig_error_message[40]; // addr 37420 + + char flash_end; // addr 37460 } FlashStruct; #pragma pack(pop) @@ -2803,6 +2803,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower #define Over_Temp 0x10 /* over-temperature */ #define Over_Volt 0x20 /* over-voltage */ #define Over_Other 0x40 /* over-other */ +#define Jig_Input 0x08 /* jig open */ int new_button_state; @@ -2844,6 +2845,7 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower /* 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) ) { @@ -2866,6 +2868,8 @@ static void Read_Keypad(int *button_port_val, int *upper_encoder_val, int *lower queue_and_broadcast_sensor_alarm(Overtemp_Detected); } else if (!(*upper_encoder_val & Over_Volt)) { queue_and_broadcast_sensor_alarm(Overvolt_Detected); + } else if (!(*upper_encoder_val & Jig_Input)) { + queue_and_broadcast_sensor_alarm(Jig_Open_Detected); } else if (!(*upper_encoder_val & Over_Other)) { queue_and_broadcast_sensor_alarm(Device_Specific_Aux_Error_Detected); } else if (!(*button_port_val & Overload_Input)) { |