summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>2000-01-01 00:00:31 +0900
committerroot <root@avtech.domain.avtechpulse.com>2000-01-01 00:00:31 +0900
commitada4ecd1962adb8ee9b3da44553071657d4f4a9a (patch)
treeae2b8049f5e0ef05ab40c8917c0565383d217c55
parent943c6cfb375a781805a5b84a97ae797be7b97b72 (diff)
toggle both polarities of trigger lines on optocoupler boot toggleINSTRUMENT_6_2_15
-rw-r--r--instr-daemon.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index 38ea23e..c6eb8c0 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -268,15 +268,24 @@ int main(int argc, char **argv)
for (i=0; i<max_channels; i++) {
if (globals.Flash.toggle_trig_at_boot[i]) {
- // trigger IL710 twice to initialize it
- Set_Output_State(i,output_on);
- Set_Trig_Source(i,source_immediate);
- Set_Trig_Source(i,source_immediate);
- Set_Trig_Source(i,source_internal);
- Set_Output_State(i,output_off);
+ int j;
+ for (j=0;j<ampl_polarities;j++) {
+
+ // do each polarity
+ Set_Amplitude(0,j,1,0,0,0,i,0.0,0);
+ Set_Trig_Source(i,source_hold);
+
+ // trigger IL710 twice to initialize it
+ Set_Output_State(i,output_on);
+ Set_Trig_Source(i,source_immediate);
+ Set_Trig_Source(i,source_immediate);
+ Set_Output_State(i,output_off);
+ }
}
}
+ Main_Rst();
+
//register stdin channel
stdinChannel = g_io_channel_unix_new(0);
if(stdinChannel == NULL) {