diff options
author | root <root@xena.domain.avtechpulse.com> | 2012-08-23 09:24:20 -0400 |
---|---|---|
committer | root <root@xena.domain.avtechpulse.com> | 2012-08-23 09:24:20 -0400 |
commit | 8c3652a30c35847380e19397077e41362bdefcb6 (patch) | |
tree | b59cacf814ba8d53284530a8107a0fca2320bbb2 /device-functions.c | |
parent | a453d3b91e5d947f4706c2c355948eda7a8f15d2 (diff) |
added most commands to the parser, with supporting global vars
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 99 |
1 files changed, 57 insertions, 42 deletions
diff --git a/device-functions.c b/device-functions.c index 63d1429..26feef9 100644 --- a/device-functions.c +++ b/device-functions.c @@ -1,5 +1,19 @@ #include "device-functions.h" #include "globals.h" +#include "version.h" + + +/*** BeginHeader idn_string */ +void idn_string(gchar** response); +/*** EndHeader */ +/*----------------------------------------------------------------------------------------------------------*/ +void idn_string(gchar** response) +{ + *response = g_strdup_printf ("AVTECH ELECTROSYSTEMS,%s,%s,%s", + globals.Flash.model_num, + globals.Flash.serial_num, + FW_VERSION); +} /*----------------------------------------------------------------------------------------------------------*/ @@ -80,48 +94,49 @@ void Main_Rst (void) globals.ChannelState[i].slew = globals.Flash.min_slew[i]; globals.do_check_settings=NO; /* don't check for conflicting settings */ -/* FIXME - Set_Pw(0,0,0,i,globals.ChannelState[i].pw,0); - - Set_Route(i,ROUTE_PRIMARY,globals.ChannelState[i].route_primary); - Set_Route(i,ROUTE_SECONDARY,globals.ChannelState[i].route_secondary); - - Set_frequency(0,0,0,i,globals.ChannelState[i].frequency); - Set_Delay(0,0,0,i,globals.ChannelState[i].delay); - Set_Double(i,globals.ChannelState[i].double_pulse); - Set_Pwmode(i,globals.ChannelState[i].ab_mode); - Set_Func(i,globals.ChannelState[i].func_mode); - Set_Pol(i,globals.ChannelState[i].polarity); - Set_Gate_Sync(i,globals.ChannelState[i].gate_type); - Set_Gate_Level(i,globals.ChannelState[i].gate_level); - Set_EA(i,globals.ChannelState[i].amp_mode); - Set_EO(i,globals.ChannelState[i].os_mode); - if (globals.Flash.switchable_zout[i]) { - Set_zout(i,globals.ChannelState[i].zout,1); - } - - Set_Load(i,globals.ChannelState[i].load_type); - Set_Logic_Level(i,globals.ChannelState[i].logic_level); - Set_rise_time(0,0,0,i,globals.ChannelState[i].rise_time); - Set_slew(0,0,0,i,globals.ChannelState[i].slew); - Set_current_limit(0,i,globals.ChannelState[i].soft_current_limit); - - if (globals.Flash.max_burst_count[i]>1) { - Set_Burst_Count(i,globals.ChannelState[i].burst_count,globals.ChannelState[i].burst_time); - } - - Set_Trig_Source(i,globals.ChannelState[i].trigger_source); - - Set_Amplitude(0,0,0,0,0,0,i,globals.ChannelState[i].amplitude,0); - Set_Offset(0,0,0,0,i,globals.ChannelState[i].offset); - Set_Output_State(i,globals.ChannelState[i].output_state); - - Set_current_limit(0,i,globals.ChannelState[i].soft_current_limit); - - Set_avrq_ampl(0,0,0,2,globals.ChannelState[i].vcc1); - Set_avrq_ampl(0,0,0,3,globals.ChannelState[i].vcc2); - Set_avrq_ampl(0,0,0,4,globals.ChannelState[i].vlogic); -*/ globals.do_check_settings=YES; /* check for conflicting settings */ + /* FIXME + Set_Pw(0,0,0,i,globals.ChannelState[i].pw,0); + + Set_Route(i,ROUTE_PRIMARY,globals.ChannelState[i].route_primary); + Set_Route(i,ROUTE_SECONDARY,globals.ChannelState[i].route_secondary); + + Set_frequency(0,0,0,i,globals.ChannelState[i].frequency); + Set_Delay(0,0,0,i,globals.ChannelState[i].delay); + Set_Double(i,globals.ChannelState[i].double_pulse); + Set_Pwmode(i,globals.ChannelState[i].ab_mode); + Set_Func(i,globals.ChannelState[i].func_mode); + Set_Pol(i,globals.ChannelState[i].polarity); + Set_Gate_Sync(i,globals.ChannelState[i].gate_type); + Set_Gate_Level(i,globals.ChannelState[i].gate_level); + Set_EA(i,globals.ChannelState[i].amp_mode); + Set_EO(i,globals.ChannelState[i].os_mode); + if (globals.Flash.switchable_zout[i]) { + Set_zout(i,globals.ChannelState[i].zout,1); + } + + Set_Load(i,globals.ChannelState[i].load_type); + Set_Logic_Level(i,globals.ChannelState[i].logic_level); + Set_rise_time(0,0,0,i,globals.ChannelState[i].rise_time); + Set_slew(0,0,0,i,globals.ChannelState[i].slew); + Set_current_limit(0,i,globals.ChannelState[i].soft_current_limit); + + if (globals.Flash.max_burst_count[i]>1) { + Set_Burst_Count(i,globals.ChannelState[i].burst_count,globals.ChannelState[i].burst_time); + } + + Set_Trig_Source(i,globals.ChannelState[i].trigger_source); + + Set_Amplitude(0,0,0,0,0,0,i,globals.ChannelState[i].amplitude,0); + Set_Offset(0,0,0,0,i,globals.ChannelState[i].offset); + Set_Output_State(i,globals.ChannelState[i].output_state); + + Set_current_limit(0,i,globals.ChannelState[i].soft_current_limit); + + Set_avrq_ampl(0,0,0,2,globals.ChannelState[i].vcc1); + Set_avrq_ampl(0,0,0,3,globals.ChannelState[i].vcc2); + Set_avrq_ampl(0,0,0,4,globals.ChannelState[i].vlogic); + */ + globals.do_check_settings=YES; /* check for conflicting settings */ } |