From e4b43097118cbc4c8b9f79a7192be2079f11e0d5 Mon Sep 17 00:00:00 2001 From: astromech Date: Mon, 6 Feb 2017 22:05:00 +0100 Subject: [PATCH] Fixed accidentally removed else test, ADC was never setted --- .../Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp b/drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp index 202ea43..842272a 100644 --- a/drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp +++ b/drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.cpp @@ -142,7 +142,7 @@ if (name == NULL) { FreeLibrary(spectrum_driver_dll); \ /* print lines with useful information: */ fprintf(stderr, "Spectrum MI40xx series board with %d byte memory\n", memory_size); fprintf(stderr, - " impedance set to %g Ohm\n expecting trigger on id=%d ttls=0x%lx\n external clock frequency set to %g Hz\n", + " impedance set to %g Ohm\n expecting trigger on id=%d ttl=0x%lx\n external clock frequency is %f Hz\n", impedance, t_line.id, t_line.ttls.to_ulong(), @@ -178,12 +178,13 @@ void SpectrumMI40xxSeries::collect_config_recursive(state_sequent& exp, Spectrum settings.data_structure=where_to_append; collect_config_recursive(*a_sequence, settings); settings.data_structure=tmp_structure; - //} /* end working on sequence */ - //else { + } /* end working on sequence */ + else { // found a state, not a sequence settings.timeout+=a_state->length; + #if SPC_DEBUG - fprintf(stderr,"SETTINGS %e %e\n",settings.timeout,a_state->length); + fprintf(stderr,"SETTINGS %e %e\n",settings.timeout, a_state->length); #endif // collect analogin sections in state std::list inputs; @@ -533,6 +534,7 @@ void SpectrumMI40xxSeries::set_daq(state & exp) { /* nothing to do! */ if (sampleno==0) { + fprintf(stderr, "oops, no sample number\n"); delete conf; effective_settings=NULL; return;