Commit 6d783595 authored by Hélène Ortiz's avatar Hélène Ortiz

fix bug around sample sequencer

parent f2186330
......@@ -51,6 +51,7 @@ SampleSequencer::SampleSequencer(const std::string& name) :
mode.init(this, NOSAVE, "mode");
timeType.init(this, NOSAVE, "time_type");
totalTime.init(this, NOSAVE, "total_time");
currentAcquisitionTime.init(this, NOSAVE, "current_acquisition_time");
dataparamsThickness.init(this, SAVE, "dataparam_thickness");
dataparamsTransmission.init(this, SAVE, "dataparam_transmission");
......@@ -64,6 +65,7 @@ SampleSequencer::SampleSequencer(const std::string& name) :
sampleChanger.init(this, "sample_changer");
count.init(this, "count");
//dataParams not migrated
registerConfiguration("DataParameters", DATA_PARAMS_EXPERIMENT_CONTROLLER, (AbstractController**) &dataParams);
......@@ -117,6 +119,7 @@ SampleSequencer::SampleSequencer(const SampleSequencer& controller) :
mode.copy(this, controller.mode);
timeType.copy(this, controller.timeType);
totalTime.copy(this, controller.totalTime);
currentAcquisitionTime.copy(this, controller.currentAcquisitionTime);
dataparamsThickness.copy(this, controller.dataparamsThickness);
dataparamsTransmission.copy(this, controller.dataparamsTransmission);
......@@ -130,6 +133,7 @@ SampleSequencer::SampleSequencer(const SampleSequencer& controller) :
sampleChanger.copy(controller.sampleChanger);
count.copy(controller.count);
dataParams = controller.dataParams;
m_CountStarted = false;
......@@ -298,6 +302,7 @@ void SampleSequencer::start() {
slot.update(i);
try {
if (apply_acquisitionTime[i] != 0.0) {
currentAcquisitionTime = apply_acquisitionTime[i];
sampleChanger->slot.setpoint = apply_samplePosition[i];
sampleChanger->changer = changer();
......
......@@ -38,28 +38,33 @@ public:
Property<int32> maxPos;
Property<int32> minPos;
Property<int32> changerNum;
//================= Properties stored in settings file =====================
Property<std::string> timeType;
Property<int32> changer;
Property<int32, SETPOINT> slot;
DynamicProperty<int32> samplePosition;
DynamicProperty<float64> acquisitionTime;
DynamicProperty<std::string> acquisitionTitle;
DynamicProperty<float64> transmission;
DynamicProperty<float64> thickness;
//==========================================================================
Property<int32> changerNum;
DynamicProperty<int32> changerValues;
DynamicProperty<std::string> changerLabels;
Property<int32> maxSlot;
Property<std::string> nickname;
Property<int32, SETPOINT> slot;
Property<std::string> mode;
Property<std::string> timeType;
Property<float64> totalTime;
Property<float64> currentAcquisitionTime;
Property<std::string> dataparamsThickness;
Property<std::string> dataparamsTransmission;
DynamicProperty<int32> samplePosition;
DynamicProperty<float64> acquisitionTime;
DynamicProperty<float64> transmission;
DynamicProperty<float64> thickness;
DynamicProperty<std::string> acquisitionTitle;
ControllerPtr<SampleChangerController> sampleChanger;
ControllerPtr<acquisition::TimeCount> count;
AbstractController* dataParams;
......
<plugin>
<controller type="sample_sequencer" role="sample_sequencer1"/>
<controller type="acquisition" role="acquisition1"/>
<property_switcher role="sample_sequencer1" property="commandStatus" switcher_key="statusSwitcher"/>
<number_of_lines nb_lines="2"/>
<dynamic_property role="sample_sequencer1" property="wanted_acquisition_time" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="acquisition_time" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="thickness" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="wanted_acquisition_title" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="acquisition_title" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="transmission" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="wanted_sample_position" save_value="true"/>
<dynamic_property role="sample_sequencer1" property="sample_position" save_value="true"/>
<label role="sample_sequencer1" prefix="sample_sequencer.changer_numberPrefix" property="nickname" save_value="true"/>
<label role="sample_sequencer1" prefix="sample_sequencer.wanted_slotLabel" property="wanted_numSlot" save_value="true"/>
<label role="sample_sequencer1" prefix="sample_sequencer.totalTimeLabel" property="total_time" save_value="true"/>
<label role="sample_sequencer1" property="time_type" spaceBefore="false" save_value="true"/>
<newLine/>
<switchable_composite switcher_key="statusSwitcher" switch_values="2">
<phase_composite phases="running,paused">
<label role="sample_sequencer1" prefix="sample_sequencer.actual_numSlot" property="actual_numSlot" font_style="BOLD"/>
<label role="acquisition1" prefix="sample_sequencer.durationPrefix" property="wanted_time" font_style="BOLD"/>
<label role="acquisition1" property="time_type" font_style="BOLD" spaceBefore="false"/>
</switchable_composite>
<label role="sample_sequencer1" prefix="sample_sequencer.durationPrefix" property="current_acquisition_time" font_style="BOLD"/>
<label role="sample_sequencer1" property="time_type" font_style="BOLD" spaceBefore="false"/>
</phase_composite>
</plugin>
\ No newline at end of file
......@@ -18,12 +18,6 @@
<decimal_format nb_decimal_places="2"/>
</property>
<property name="actual_changer" type="int32" max_length="2">
</property>
<property name="wanted_changer" type="int32" max_length="2">
</property>
<property name="changer_num" type="int32" max_length="2">
</property>
......@@ -38,6 +32,9 @@
<strictly_positive/>
</property>
<property name="current_acquisition_time" type="float64">
</property>
<dynamic_property name="changer_values" size_property="changer_num" type="int32">
</dynamic_property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment