diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-15 08:21:51 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-15 08:21:51 -0400 |
commit | 9241a81f454f8ad98207b7b88c5c0b9ec8852987 (patch) | |
tree | cd781dfcdf311b3392f4d79424b0450a4c0c12d0 /device-functions.c | |
parent | 68791fff3f9dce335821b87f5404803e488de85d (diff) |
simplified the menu updating scheme
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/device-functions.c b/device-functions.c index dd17ecd..3e8c6cf 100644 --- a/device-functions.c +++ b/device-functions.c @@ -118,7 +118,6 @@ void Main_Rst (void) // establishes min/max values for queries, but reports no errors Error_check(globals.ChannelState); - globals.Changes.update_whole_main_menu=YES; Ctrl_PRF_Limiter(1); @@ -444,10 +443,6 @@ int Set_Pw(int check_possible_only,int word_override,int range_override,int chan set_dac(globals.Flash.monocycle_dac[0],word_out); } - if (set_pw!=globals.ChannelState[channel].pw) { - globals.Changes.update_pw=YES; - } - globals.ChannelState[channel].pw=set_pw; Set_Update_Chans(); @@ -628,10 +623,6 @@ int Set_frequency(int check_possible_only,int word_override,int range_override,i globals.Registers.shift_reg_out[2] = ((long)(globals.Registers.shift_reg_out[2] & 0xfff00)) | ((long)cap_range_control); /* bottom 8 bits of 20 bits */ } - if (set_freq!=globals.ChannelState[channel].frequency) { - globals.Changes.update_freq=YES; - } - g_print_debug("freq range %d, word %d\n",relay_range,word_out); globals.ChannelState[channel].frequency=set_freq; @@ -726,10 +717,6 @@ int Set_Delay(int check_possible_only,int word_override,int range_override,int c control_pcb107(Second_Dly_Port,globals.Flash.delay_dac[channel],word_out,relay_range); } - if (set_delay!=globals.ChannelState[channel].delay) { - globals.Changes.update_delay=YES; - } - globals.ChannelState[channel].delay=set_delay; Set_Update_Chans(); @@ -761,10 +748,6 @@ int Set_Double(int channel,int new_setting) globals.Registers.shift_reg_out[0] |= 0x20; /* turn double-pulse on */ } - if (globals.ChannelState[channel].double_pulse!=new_setting) { - globals.Changes.update_delay=YES; - } - globals.ChannelState[channel].double_pulse=new_setting; Set_Update_Chans(); @@ -849,8 +832,6 @@ int Set_Func(int channel,int mode) globals.Registers.shift_reg_out[2] = ((long) (globals.Registers.shift_reg_out[2] & 0xbffff)) | (long) (((long) (mode & 0x08)) << (globals.Flash.ext_amplify_xtra_rly[channel]+11)); - - globals.Changes.update_func=YES; } @@ -892,10 +873,6 @@ int Set_Pol(int channel,int mode) return error_num; } - if (globals.ChannelState[channel].polarity!=mode) { - globals.Changes.update_inv=YES; - } - globals.ChannelState[channel].polarity=mode; Set_Mux(channel); @@ -912,10 +889,6 @@ int Set_Hold(int channel,int mode) return InvalidChannel; } - if (globals.ChannelState[channel].hold_setting!=mode) { - globals.Changes.update_pw=YES; - } - globals.ChannelState[channel].hold_setting=mode; Set_Update_Chans(); @@ -963,10 +936,6 @@ int Set_Output_State(int channel,int mode) globals.Timers.last_activity_at[channel] = 0L; } - if (globals.ChannelState[channel].output_state!=mode) { - globals.Changes.update_output=YES; - } - globals.ChannelState[channel].output_state=mode; Set_Update_Chans(); @@ -1018,8 +987,6 @@ int Set_Trig_Source(int channel,int mode) Set_frequency(0,0,0,channel,use_freq); Set_Pwmode(channel,use_ab_mode); } - - globals.Changes.update_freq=YES; } globals.ChannelState[channel].trigger_source=mode; @@ -1081,10 +1048,6 @@ int Set_Gate_Sync(int channel,int mode) globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xfe) | 1; } - if (globals.ChannelState[channel].gate_type!=mode) { - globals.Changes.update_gate=YES; - } - globals.ChannelState[channel].gate_type=mode; Set_Update_Chans(); @@ -1105,10 +1068,6 @@ int Set_Gate_Level(int channel,int mode) globals.Registers.shift_reg_out[0] = (globals.Registers.shift_reg_out[0] & 0xfd) | 0; } - if (globals.ChannelState[channel].gate_level!=mode) { - globals.Changes.update_gate=YES; - } - globals.ChannelState[channel].gate_level=mode; Set_Update_Chans(); @@ -1351,10 +1310,6 @@ int Set_Pwmode(int channel,int mode) return AB_Mode_Error; } - if (globals.ChannelState[channel].ab_mode!=mode) { - globals.Changes.update_pw=YES; - } - globals.ChannelState[channel].ab_mode=mode; Set_Mux(0); @@ -1566,11 +1521,6 @@ int Set_Logic_Level(int channel,int mode) } } - - if (globals.ChannelState[channel].logic_level!=mode) { - globals.Changes.update_logic_level=YES; - } - globals.ChannelState[channel].logic_level=mode; Set_Update_Chans(); @@ -1689,7 +1639,6 @@ int Set_Route(int channel, int module, int mode) } if (mode!=globals.ChannelState[channel].route_primary) { - globals.Changes.update_routes=YES; globals.ChannelState[channel].route_primary=mode; } } @@ -1701,7 +1650,6 @@ int Set_Route(int channel, int module, int mode) } if (mode!=globals.ChannelState[channel].route_secondary) { - globals.Changes.update_routes=YES; globals.ChannelState[channel].route_secondary=mode; } } @@ -3366,11 +3314,6 @@ int Set_Burst_Count(int channel,int count,float new_burst_time) return check_valid; } - /* update variables if OK */ - if (count!=globals.ChannelState[channel].burst_count) { - globals.Changes.update_burst_count=YES; - } - globals.ChannelState[channel].burst_count = count; Set_Update_Chans(); @@ -3496,11 +3439,6 @@ int Set_Burst_Time(int check_possible_only,int word_override,int range_override, globals.Registers.last_relay_driver_settings[2] = relay_range; - /* update variables if OK */ - if (new_burst_time!=globals.ChannelState[channel].burst_time) { - globals.Changes.update_burst_time=YES; - } - globals.ChannelState[channel].burst_time = new_burst_time; Set_Update_Chans(); @@ -3631,11 +3569,6 @@ int Set_rise_time(int check_possible_only,int word_override,int range_override,i } } - /* update variables if OK */ - if (new_rise_time!=globals.ChannelState[channel].rise_time) { - globals.Changes.update_rise_time=YES; - } - globals.ChannelState[channel].rise_time = new_rise_time; globals.Registers.last_rise_time_relay_setting = range_control; @@ -3683,11 +3616,6 @@ int Set_current_limit(int check_possible_only,int channel,float new_adj_current_ word_out = (int) ( ((float) dac_max) * (limit/globals.Flash.current_limit_full_scale[channel]) ); set_dac(globals.Flash.current_limit_dac[channel],word_out); - /* update variables if OK */ - if (limit!=globals.ChannelState[channel].soft_current_limit) { - globals.Changes.update_soft_current_limit=YES; - } - globals.ChannelState[channel].soft_current_limit=limit; return OK; @@ -3837,11 +3765,6 @@ int Set_slew(int check_possible_only,int word_override,int range_override,int ch I2C_Write(PCF8574,range_control); - /* update variables if OK */ - if (new_slew!=globals.ChannelState[channel].slew) { - globals.Changes.update_slew=YES; - } - globals.ChannelState[channel].slew = new_slew; Set_Update_Chans(); @@ -4451,7 +4374,6 @@ void Set_Rcl(int setting_num) Menu_Clear_Buttons(); globals.Flags.do_check_settings=YES; /* check for conflicting settings */ - globals.Changes.update_whole_main_menu=YES; Error_check(globals.ChannelState); /* establishes min/max values for queries, but reports no errors */ |