Commit ecdb271a authored by Cristina Cocho's avatar Cristina Cocho

reset old values of dynamic properties when incrementing size of slot property in SampleSequencer

parent 57f9916a
......@@ -213,6 +213,21 @@ void SampleSequencer::refreshWantedSlotProperty(int32 number) throw (CannotSetVa
totalTime = totalTime() + acquisitionTime.get(i);
}
}
// Reset old values when actual slot number > old slot number
if (number > slot.setpoint()) {
for (int i = slot.setpoint(); i < number; i++) {
//fill new properties with default values
int32 index = i + 1;
ostringstream title;
title << "Sample " << index;
samplePosition.set(i, index);
acquisitionTime.set(i, 10.0);
transmission.set(i, 1.0);
thickness.set(i, 0.1);
acquisitionTitle.set(i, title.str());
}
}
}
void SampleSequencer::updateMaxSlot() {
......
......@@ -439,11 +439,11 @@ void RealAliasDriver::readAnswer() {
answerss << buffer;
std::string answer = answerss.str();
if (answer == ACK) {
if (answer == "\x06") {
std::cout << "answer is ACK" << endl;
} else if (answer == NACK) {
} else if (answer == "\x15") {
std::cout << "answer is NACK" << endl;
} else if (answer == NACK0) {
} else if (answer == "\x18") {
std::cout << "answer is NACK0" << endl;
} else {
// error
......
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