Commit 2009af6e authored by ladi's avatar ladi

ladi changes

parent 73fdd859
......@@ -99,7 +99,7 @@ public:
Property<float64> adcTimeFormCNVPulseToMSB;
Property<float64> clkLengthHigh;
Property<float64> nbClkPulse;
Property<int32> dacLaserSetpoint;
Property<float64> dacLaserSetpoint;
Property<float64> timerAdcPhotodiode;
Property<float64> timerAdcTemperature;
Property<float64> nbEncoderStepsBetweenADCSamples;
......
......@@ -101,7 +101,7 @@ void RealLadiControlDriver::writeParam() {
lvalue = owner()->nbClkPulse();
owner()->write(NUMBER_CLK_PULSES_REG, Vme::LONGWORD_WIDTH, 1, (void*) &lvalue);
lvalue = (int32) ((owner()->dacLaserSetpoint() + 2.5) / 0.0000763);
lvalue = (int32) ((owner()->dacLaserSetpoint() / 90. * 1.2 + 2.5) / 0.0000763);
owner()->write(DAC_LASER_SETPOINT_REG, Vme::LONGWORD_WIDTH, 1, (void*) &lvalue);
lvalue = (int32) (owner()->timerAdcPhotodiode() * 1000.);
......@@ -360,6 +360,7 @@ void RealLadiControlDriver::readStatus() {
val += -65535;
}
val *= 0.0001332;
val *= 90. / 1.2; // convert to mWatt
owner()->adcPhotodiode.update(val);
owner()->read(ADC_TEMPERATURE_VALUE_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
......@@ -369,7 +370,7 @@ void RealLadiControlDriver::readStatus() {
}
val *= 0.0001332;
// HACK Emilio degrees
val = val/0.1393 - 8.7421;
val = (val - 1.2701)/0.1167;
owner()->adcTemperature.update(val);
// Read the status card
......
......@@ -64,7 +64,9 @@
<property name="clkLengthHigh" type="float64">
</property>
<property name="dacLaserSetpoint" type="int32">
<property name="dacLaserSetpoint" type="float64" max_length="4">
<range min_included="0" max_included="90"/>
<decimal_format nb_decimal_places="1"/>
</property>
<property name="timerAdcPhotodiode" type="float64">
......
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