...
 
Commits (4)
......@@ -37,8 +37,11 @@ const int32 MpdaCommon::LISTMODE_MODE = 1;
*/
MpdaCommon::MpdaCommon(const std::string& name) : RegisterCommon(name) {
// nbGGs use for initGG (all GG in MPDA )
// but nbGGsUseAcqMode use for WriteParam (need to exclude all DMS gg)
nbGGs.init(this, SAVE, "nbGGs");
nbGGsUseAcqMode.init(this, NOSAVE, "nbGGs");
nbGGsUseAcqMode.init(this, NOSAVE, "nbGGsUseAcqMode");
portType.init(this, NOSAVE, "portType");
ggaddress.init(this, NOSAVE | HEX, "ggaddress");
......
......@@ -167,7 +167,8 @@ void MpdaController::init() {
vector<ControllerPtr<GGController>>::iterator iter2 = m_GGs.begin();
iter2 = m_GGs.begin();
while (iter2!= m_GGs.end()) {
if ( (*iter2)->portType() != 0 ){
if ( (*iter2)->cardType() != 23 ){// cardType = lstdpp128::DMS;
localnbGGsUseAcqMode++;
}
++iter2;
......@@ -181,7 +182,7 @@ void MpdaController::init() {
cout << " This is correct if your configuration include a DMS" << endl;
cout << " DMS is not a GG for acquisition " << endl;
cout << " nGGs " << nGGs() << endl;
cout << " nGGs for Acq " << mpdaDriver->nbGGsUseAcqMode() << endl;
cout << " nGGs for Acq " << mpdaDriver->nbGGsUseAcqMode() << endl;
cout << "===================================" << endl;
}
......
......@@ -425,7 +425,7 @@ void PolarizationController::start() {
startPhase (stateValue() , consign1 , consign2 );
commandProgression = 50;
usleep(1000); //wait for 1 msec
usleep(delay()*1000); //wait for 1 msec
consign1 = down1Value.setpoint();
consign2 = down2Value.setpoint();
......
......@@ -4,11 +4,11 @@ polarization.wantedValuePrefix=Wanted polarization
polarization.upValuePrefix=Polarization + state
polarization.downValuePrefix=Polarization - state
polarization.pulsedPrefix=Pulsed
polarization.delayPrefix=Delay
polarization.delayPrefix=Pulse Duration
polarization.voltSuffix=V
polarization.ampsSuffix=A
polarization.delaySuffix=s
polarization.delaySuffix=ms
polarization.pulsedCheckedValue=true
polarization.pulsedUncheckedValue=false
......
......@@ -18,7 +18,7 @@
<newLine/>
<text role="lsswavelength1" property="angle_factor" prefix="lsswavelength.angle_factorPrefix"/>
<newLine/>
<label role="lsswavelength1" property="sel_tt_angle" prefix="lsswavelength.sel_tt_anglePrefix"/>
<text role="lsswavelength1" property="sel_tt_angle" prefix="lsswavelength.sel_tt_anglePrefix"/>
</group>
<newLine/>
<group title="lsswavelength1.resolutionTitle">
......
......@@ -54,7 +54,7 @@ D33ChopperSetting::D33ChopperSetting (const std::string & contName) : acquisitio
registerFunction(TYPE);
setFamily(family::SETTING);
setFamily(family::SETTING);
pickup.init(this, SAVE, "actual_pickup", "wanted_pickup");
mode.init(this, SAVE, "actual_mode", "wanted_mode");
......@@ -127,7 +127,7 @@ D33ChopperSetting::D33ChopperSetting (const std::string & contName) : acquisitio
chopperCommand.init(this, "d33choppercommand");
tofParam.init(this, "tof1");
tofParam2.init(this, "tof2");
// tofParam2.init(this, "tof2");
detecteur1.init(this, "det1");
detecteur2.init(this, "det2");
......@@ -138,13 +138,13 @@ D33ChopperSetting::D33ChopperSetting (const std::string & contName) : acquisitio
chopper4Driver.init(this, "ch4");
m_Att.init(this, "att");
// pickupDriver.init(this, "tofpickup");
// pickupDriver.init(this, "tofpickup");
selectorDriver.init(this, "selector");
pickUpNto1Controller.init(this, "pickup");
axisselector.init(this, "axisselector");
m_Mpda1.init(this, "mpda1");
m_Mpda2.init(this, "mpda2");
// m_Mpda1.init(this, "mpda1");
//m_Mpda2.init(this, "mpda2");
......@@ -192,66 +192,66 @@ void D33ChopperSetting::postConfiguration() {
if( (chopper1Driver.isAssigned()) &&(chopper2Driver.isAssigned())&&(chopper3Driver.isAssigned())&&(chopper4Driver.isAssigned()) ){
//
// registerRefresher(det1.setpoint, &D33ChopperSetting::refreshWantedDet1PositionProperty, this);
// registerRefresher(det2.setpoint, &D33ChopperSetting::refreshWantedDet2PositionProperty, this);
// registerUpdater(det1.setpoint, &D33ChopperSetting::updateWantedDet1PositionProperty, this);
// registerUpdater(det2.setpoint, &D33ChopperSetting::updateWantedDet2PositionProperty, this);
//
// registerUpdater(detecteur1->position, &D33ChopperSetting::updateDet1PositionProperty, this);
// registerUpdater(detecteur2->position, &D33ChopperSetting::updateDet2PositionProperty, this);
// registerUpdater(wlfDriver->state, &D33ChopperSetting::updatewlfProperty, this);
//
// registerUpdater(mode.setpoint, &D33ChopperSetting::updateWantedModeProperty, this);
//
// registerUpdater(wlf.setpoint, &D33ChopperSetting::updateWantedFopProperty, this);
// registerUpdater(nchannels.setpoint, &D33ChopperSetting::updateWantedNbChanelsProperty, this);
//
// registerRefresher(nchannels.setpoint, &D33ChopperSetting::refreshWantedNbChanelsProperty, this);
//
//
//
//
// int32 isMaster = 0;
//
// registerUpdater(chopper1Driver->speed, &D33ChopperSetting::updatechopper1Speed, this);
// registerUpdater(chopper2Driver->speed, &D33ChopperSetting::updatechopper2Speed, this);
// registerUpdater(chopper3Driver->speed, &D33ChopperSetting::updatechopper3Speed, this);
// registerUpdater(chopper4Driver->speed, &D33ChopperSetting::updatechopper4Speed, this);
//
// registerUpdater(chopper1Driver->phase, &D33ChopperSetting::updatechopper1Phase, this);
// registerUpdater(chopper2Driver->phase, &D33ChopperSetting::updatechopper2Phase, this);
// registerUpdater(chopper3Driver->phase, &D33ChopperSetting::updatechopper3Phase, this);
// registerUpdater(chopper4Driver->phase, &D33ChopperSetting::updatechopper4Phase, this);
//
// registerUpdater(chopper1Driver->gear, &D33ChopperSetting::updatechopper1Gear, this);
// registerUpdater(chopper2Driver->gear, &D33ChopperSetting::updatechopper2Gear, this);
// registerUpdater(chopper3Driver->gear, &D33ChopperSetting::updatechopper3Gear, this);
// registerUpdater(chopper4Driver->gear, &D33ChopperSetting::updatechopper4Gear, this);
//
// registerUpdater(chopper1Driver->dir, &D33ChopperSetting::updatechopper1Dir, this);
// registerUpdater(chopper2Driver->dir, &D33ChopperSetting::updatechopper2Dir, this);
// registerUpdater(chopper3Driver->dir, &D33ChopperSetting::updatechopper3Dir, this);
// registerUpdater(chopper4Driver->dir, &D33ChopperSetting::updatechopper4Dir, this);
// registerUpdater(selectorDriver->speed, &D33ChopperSetting::updateSelectorSpeed, this);
//
// registerUpdater(tofParam->wantedDelay, &D33ChopperSetting::updateActualTofDelay, this);
// registerUpdater(tofParam->wantedChannelWidth, &D33ChopperSetting::updateActualTofChannelWidth, this);
//
// updateActualTofDelay();
// updateActualTofChannelWidth();
// updatechopper1Speed();
// updatechopper2Speed();
// updatechopper3Speed();
// updatechopper4Speed();
// calculate();
//
//
// registerRefresher(det1.setpoint, &D33ChopperSetting::refreshWantedDet1PositionProperty, this);
// registerRefresher(det2.setpoint, &D33ChopperSetting::refreshWantedDet2PositionProperty, this);
// registerUpdater(det1.setpoint, &D33ChopperSetting::updateWantedDet1PositionProperty, this);
// registerUpdater(det2.setpoint, &D33ChopperSetting::updateWantedDet2PositionProperty, this);
//
// registerUpdater(detecteur1->position, &D33ChopperSetting::updateDet1PositionProperty, this);
// registerUpdater(detecteur2->position, &D33ChopperSetting::updateDet2PositionProperty, this);
// registerUpdater(wlfDriver->state, &D33ChopperSetting::updatewlfProperty, this);
//
// registerUpdater(mode.setpoint, &D33ChopperSetting::updateWantedModeProperty, this);
//
// registerUpdater(wlf.setpoint, &D33ChopperSetting::updateWantedFopProperty, this);
// registerUpdater(nchannels.setpoint, &D33ChopperSetting::updateWantedNbChanelsProperty, this);
//
// registerRefresher(nchannels.setpoint, &D33ChopperSetting::refreshWantedNbChanelsProperty, this);
//
//
//
//
// int32 isMaster = 0;
//
// registerUpdater(chopper1Driver->speed, &D33ChopperSetting::updatechopper1Speed, this);
// registerUpdater(chopper2Driver->speed, &D33ChopperSetting::updatechopper2Speed, this);
// registerUpdater(chopper3Driver->speed, &D33ChopperSetting::updatechopper3Speed, this);
// registerUpdater(chopper4Driver->speed, &D33ChopperSetting::updatechopper4Speed, this);
//
// registerUpdater(chopper1Driver->phase, &D33ChopperSetting::updatechopper1Phase, this);
// registerUpdater(chopper2Driver->phase, &D33ChopperSetting::updatechopper2Phase, this);
// registerUpdater(chopper3Driver->phase, &D33ChopperSetting::updatechopper3Phase, this);
// registerUpdater(chopper4Driver->phase, &D33ChopperSetting::updatechopper4Phase, this);
//
// registerUpdater(chopper1Driver->gear, &D33ChopperSetting::updatechopper1Gear, this);
// registerUpdater(chopper2Driver->gear, &D33ChopperSetting::updatechopper2Gear, this);
// registerUpdater(chopper3Driver->gear, &D33ChopperSetting::updatechopper3Gear, this);
// registerUpdater(chopper4Driver->gear, &D33ChopperSetting::updatechopper4Gear, this);
//
// registerUpdater(chopper1Driver->dir, &D33ChopperSetting::updatechopper1Dir, this);
// registerUpdater(chopper2Driver->dir, &D33ChopperSetting::updatechopper2Dir, this);
// registerUpdater(chopper3Driver->dir, &D33ChopperSetting::updatechopper3Dir, this);
// registerUpdater(chopper4Driver->dir, &D33ChopperSetting::updatechopper4Dir, this);
// registerUpdater(selectorDriver->speed, &D33ChopperSetting::updateSelectorSpeed, this);
//
// registerUpdater(tofParam->wantedDelay, &D33ChopperSetting::updateActualTofDelay, this);
// registerUpdater(tofParam->wantedChannelWidth, &D33ChopperSetting::updateActualTofChannelWidth, this);
//
// updateActualTofDelay();
// updateActualTofChannelWidth();
// updatechopper1Speed();
// updatechopper2Speed();
// updatechopper3Speed();
// updatechopper4Speed();
// calculate();
//
registerRefresher(det1.setpoint, &D33ChopperSetting::refreshWantedDet1PositionProperty, this);
registerRefresher(det2.setpoint, &D33ChopperSetting::refreshWantedDet2PositionProperty, this);
registerUpdater(det1.setpoint, &D33ChopperSetting::updateWantedDet1PositionProperty, this);
registerUpdater(det2.setpoint, &D33ChopperSetting::updateWantedDet2PositionProperty, this);
registerUpdater(detecteur1->position, &D33ChopperSetting::updateDet1PositionProperty, this);
registerUpdater(detecteur2->position, &D33ChopperSetting::updateDet2PositionProperty, this);
registerUpdater(wlfDriver->state, &D33ChopperSetting::updatewlfProperty, this);
......@@ -292,9 +292,9 @@ void D33ChopperSetting::postConfiguration() {
registerUpdater(tofParam->wantedDelay, &D33ChopperSetting::updateActualTofDelay, this);
registerUpdater(tofParam->wantedChannelWidth, &D33ChopperSetting::updateActualTofChannelWidth, this);
registerUpdater(tofParam2->wantedDelay, &D33ChopperSetting::updateActualTofDelay, this);
registerUpdater(tofParam2->wantedChannelWidth, &D33ChopperSetting::updateActualTofChannelWidth, this);
updateActualTofDelay();
// registerUpdater(tofParam2->wantedDelay, &D33ChopperSetting::updateActualTofDelay, this);
// registerUpdater(tofParam2->wantedChannelWidth, &D33ChopperSetting::updateActualTofChannelWidth, this);
updateActualTofDelay();
updateActualTofChannelWidth();
updatechopper1Speed();
updatechopper2Speed();
......@@ -432,18 +432,18 @@ void D33ChopperSetting::updateActualPickup(){
}
void D33ChopperSetting::updateActualTofNbChannels(){
// nchannels =tofParam->wantedNChannels();
// nchannels =tofParam->wantedNChannels();
}
void D33ChopperSetting::updateActualTofDelay(){
// delay =tofParam->wantedDelays.get(0);
// delay =tofParam->wantedDelays.get(0);
//delay =tofParam->actualDelays.get(0);
}
void D33ChopperSetting::updateActualTofChannelWidth(){
// chwidth =tofParam->actualChannelWidths.get(0);
// chwidth =tofParam->actualChannelWidths.get(0);
}
......@@ -484,7 +484,7 @@ void D33ChopperSetting::updatechopper4Speed(){
speedChopperForMpda.setpoint = chopper4Driver->speed.setpoint() /nfactor.setpoint();
speedChopperForMpda = chopper4Driver->speed() /nfactor.setpoint();
writeMpda( chopper4Driver->speed.setpoint());
}
}
}
......@@ -736,9 +736,9 @@ void D33ChopperSetting::calculate() {
nfactor.setpoint = N;
master_speed.setpoint = (int32 ) (N * f1);
resolution_chopper=resolution;
// pickup.setpoint= PICKUP_MODE[mode.setpoint()];
// pickup.setpoint= PICKUP_MODE[mode.setpoint()];
master.setpoint=m_current_masters.first;
// cout << "PICKUP_MODE 0x" << hex << PICKUP_MODE[m_Wantedmode] << dec << endl;
// cout << "PICKUP_MODE 0x" << hex << PICKUP_MODE[m_Wantedmode] << dec << endl;
// cout << "###################################################################" << endl;
m_MasterPickup = m_current_masters.first ;
......@@ -760,7 +760,7 @@ void D33ChopperSetting::calculate() {
chwidth = m_TimeFrame / nchannels.setpoint(); // equation 7
m_ChannelWidth=m_TimeFrame / nchannels.setpoint(); // equation 7
cout << "*******************************************************************************m_ChannelWidth " << chwidth << endl;
cout << "*******************************************************************************m_ChannelWidth " << chwidth << endl;
//delay = 1;
int32* slavepair =slave_pair();
......@@ -966,19 +966,19 @@ void D33ChopperSetting::calculate() {
for (uint32 i = 0; i < (uint32) size; ++i) {
m_WavelengthDetector1Array[i] = 1e10 * (D33Constant::H * ((i+0.5) * (chwidth() / 1000000.) + (delay() / 1000000.)))
/ (D33Constant::M_N * dist_tof_detecteur1());
/ (D33Constant::M_N * dist_tof_detecteur1());
m_WavelengthDetector2Array[i] = 1e10 *(D33Constant::H * ((i+0.5) * (chwidth() / 1000000) + (delay() / 1000000)))
/ (D33Constant::M_N * dist_tof_detecteur2());
/ (D33Constant::M_N * dist_tof_detecteur2());
m_WavelengthDetector3Array[i] = 1e10*(D33Constant::H * ((i+0.5) * (chwidth() / 1000000) + (delay() / 1000000)))
/ (D33Constant::M_N * dist_tof_detecteur3());
/ (D33Constant::M_N * dist_tof_detecteur3());
m_WavelengthDetector4Array[i] = 1e10 *(D33Constant::H * ((i+0.5) * (chwidth() / 1000000) + (delay() / 1000000)))
/ (D33Constant::M_N * dist_tof_detecteur4());
/ (D33Constant::M_N * dist_tof_detecteur4());
m_WavelengthDetector5Array[i] = 1e10*(D33Constant::H * ((i+0.5) * (chwidth() / 1000000) + (delay() / 1000000)))
/ (D33Constant::M_N * dist_tof_detecteur5());
/ (D33Constant::M_N * dist_tof_detecteur5());
......@@ -1023,6 +1023,7 @@ void D33ChopperSetting::start() {
*/
commandProgression=0;
string actualAtt;
string actualSelState;
commandStatus.setRunning();
Counter timeOut;
//int32 wantedSelTime;
......@@ -1058,14 +1059,18 @@ void D33ChopperSetting::start() {
// m_ActualSelSpeed = any_cast<int32> (selectorDriver->getValue("actual_speed"));
// if (selectorDriver->speed() > 0) {
// // wantedSelTime = 0;
// int32 aspeed = 0;
// selectorDriver->speed.setpoint= aspeed;
// selectorDriver->startCommand(true);
//
// }
actualSelState=axisselector->actualStateValue();
if (axisselector->state()=="1"){
if (selectorDriver->speed() < 10) {
// wantedSelTime = 0;
// wantedSelTime = 0;
axisselector->state.setpoint="0";
cout << "seeting selector in " << endl;
axisselector->startCommand(true);
// cout << "axisselector" << endl;
}
}
commandProgression=10;
if (nchannels.setpoint() != 0)
chwidth =m_ChannelWidth;
......@@ -1090,40 +1095,40 @@ void D33ChopperSetting::start() {
tofParam->startCommand(true);
cout << "tofParam : " << chwidth() << endl;
tofParam2->wantedChannelWidth=chwidth();
tofParam2->wantedNChannels=nchannels.setpoint();
tofParam2->wantedChannelWidths.set(0,chwidth());
tofParam2->wantedChannelWidths.set(1,chwidth());
tofParam2->wantedChannelWidths.set(2,chwidth());
tofParam2->wantedChannelWidths.set(3,chwidth());
tofParam2->wantedChannelWidths.set(4,chwidth());
tofParam2->wantedDelay=delay();
tofParam2->wantedDelays.set(0,delay());
tofParam2->wantedDelays.set(1,delay());
tofParam2->wantedDelays.set(2,delay());
tofParam2->wantedDelays.set(3,delay());
tofParam2->wantedDelays.set(4,delay());
tofParam2->writeParams();
tofParam2->startCommand(true);
cout << "tofParam2 : " << chwidth() << endl;
// tofParam2->wantedChannelWidth=chwidth();
// tofParam2->wantedNChannels=nchannels.setpoint();
// tofParam2->wantedChannelWidths.set(0,chwidth());
// tofParam2->wantedChannelWidths.set(1,chwidth());
// tofParam2->wantedChannelWidths.set(2,chwidth());
// tofParam2->wantedChannelWidths.set(3,chwidth());
// tofParam2->wantedChannelWidths.set(4,chwidth());
// tofParam2->wantedDelay=delay();
// tofParam2->wantedDelays.set(0,delay());
// tofParam2->wantedDelays.set(1,delay());
// tofParam2->wantedDelays.set(2,delay());
// tofParam2->wantedDelays.set(3,delay());
// tofParam2->wantedDelays.set(4,delay());
// tofParam2->writeParams();
// tofParam2->startCommand(true);
// cout << "tofParam2 : " << chwidth() << endl;
if (master() != master.setpoint()) {
// m_ActualSelSpeed = any_cast<int32> (selectorDriver->getValue("actual_speed"));
// if (selectorDriver->speed() > 0) {
// // wantedSelTime = 5;
// int32 aspeed = 0;
//
// selectorDriver->speed.setpoint= aspeed;
// selectorDriver->startCommand(true);
// } else {
// // wantedSelTime = 0;
// axisselector->state.setpoint="0";
// axisselector->startCommand(true);
//
// // cout << "axisselector" << endl;
// }
// if (selectorDriver->speed() > 0) {
// // wantedSelTime = 5;
// int32 aspeed = 0;
//
// selectorDriver->speed.setpoint= aspeed;
// selectorDriver->startCommand(true);
// } else {
// // wantedSelTime = 0;
// axisselector->state.setpoint="0";
// axisselector->startCommand(true);
//
// // cout << "axisselector" << endl;
// }
}
commandProgression=20;
......@@ -1385,10 +1390,10 @@ void D33ChopperSetting::start() {
cout << "seeting pickupDriver" << endl;
commandProgression=50;
// pickupDriver->mode.setpoint =1;
// pickupDriver->master_pickup.setpoint= m_MasterPickup;
// pickupDriver->slave_pickup.setpoint= m_SlavePickup;
// pickupDriver->start();
// pickupDriver->mode.setpoint =1;
// pickupDriver->master_pickup.setpoint= m_MasterPickup;
// pickupDriver->slave_pickup.setpoint= m_SlavePickup;
// pickupDriver->start();
pickUpNto1Controller->delay = 1;
......@@ -1405,13 +1410,15 @@ void D33ChopperSetting::start() {
cout << "seeting m_Att" << endl;
// while (selector_speed() > 0) {
// sleep(2);
// }
//
// while (selector_speed() > 0) {
// sleep(2);
// }
//
cout << "seeting m_Att->state.setpoint :" <<actualAtt<< endl;
// axisselector->state.setpoint ="1";//state::StateController::OUT;
// axisselector->startCommand(true);
axisselector->state.setpoint =actualSelState;//state::StateController::OUT;
cout << "seeting selector " << endl;
axisselector->startCommand(true);
//axisselector-> stopCommand(true);
//sleep(60);
......@@ -1450,21 +1457,22 @@ void D33ChopperSetting::read() {
*/
void D33ChopperSetting::writeMpda(float64 speed) {
pickupTimePeriod = 1e6 * 60. / ( nbpickup() * abs((float64)(speed /nfactor.setpoint())));
cout << "pickupTimePeriod " <<pickupTimePeriod()<< endl;
jitterPickupTimePeriod = pickupTimePeriod() / 5; // 20 pourcent
if (m_Mpda2.isAssigned()) {
m_Mpda2->pickupTimePeriod = pickupTimePeriod();
m_Mpda2->jitterPickupTimePeriod = jitterPickupTimePeriod();
} else {
} if (m_Mpda1.isAssigned()) {
m_Mpda1->pickupTimePeriod = pickupTimePeriod();
m_Mpda1->jitterPickupTimePeriod = jitterPickupTimePeriod();
} else {
}
// pickupTimePeriod = 1e6 * 60. / ( nbpickup() * abs((float64)(speed /nfactor.setpoint())));
// cout << "pickupTimePeriod " <<pickupTimePeriod()<< endl;
//
// jitterPickupTimePeriod = pickupTimePeriod() / 5; // 20 pourcent
// if (m_Mpda2.isAssigned()) {
// m_Mpda2->pickupTimePeriod = pickupTimePeriod();
// m_Mpda2->jitterPickupTimePeriod = jitterPickupTimePeriod();
// } else {
//
// } if (m_Mpda1.isAssigned()) {
// m_Mpda1->pickupTimePeriod = pickupTimePeriod();
// m_Mpda1->jitterPickupTimePeriod = jitterPickupTimePeriod();
// } else {
// cout << "============= m_Mpda2 m_Mpda1 Not " << endl;
//
// }
}
......
......@@ -275,12 +275,12 @@ private:
ControllerPtr<selector::SelectorController> selectorDriver;
ControllerPtr<d33::D33ChopperCommand> chopperCommand;//
ControllerPtr<acquisition::TofAcquisitionController> tofParam;//
ControllerPtr<acquisition::TofAcquisitionController> tofParam2;//
//ControllerPtr<acquisition::TofAcquisitionController> tofParam2;//
ControllerPtr<stateaxis::StateAxisController> m_Att;
//ControllerPtr<acquisition::MpdaController> m_Mpda3; //! Link
DriverPtr<acquisition::MpdaCommon> m_Mpda1;
DriverPtr<acquisition::MpdaCommon> m_Mpda2;
// DriverPtr<acquisition::MpdaCommon> m_Mpda1;
// DriverPtr<acquisition::MpdaCommon> m_Mpda2;
/**
......
......@@ -188,7 +188,7 @@ void RealFugHCPDriver::start() {
} else {
positive();
}
writeCurrent(fabs(owner()->currentLimit()));
// writeCurrent(fabs(owner()->currentLimit()));
writeVoltage(fabs(owner()->voltage.setpoint()));
}
......
......@@ -127,7 +127,7 @@ void RealD33AstriumChopperComputerDriver::setDir(DeviceDriver* aDeviceDriver) {
w_dir = trim(any_cast<std::string>(aDeviceDriver->getValue(D33ASTRIUMCHOPPER_WANTED_DIRECTION_DEVICE_CONTAINER)));
buf_conf <<D33ASTRIUMCHOPPER_DIR_COMMAND<< channel<<": "<<w_dir<<D33ASTRIUMCHOPPER_ENDL;
// cout<< "send setDir "<< D33ASTRIUMCHOPPER_DIR_COMMAND<< channel<<D33ASTRIUMCHOPPER_SEPARATOR<<w_dir<< endl;
cout<< "send setDir "<< D33ASTRIUMCHOPPER_DIR_COMMAND<< channel<<D33ASTRIUMCHOPPER_SEPARATOR<<w_dir<< endl;
m_owner->write(buf_conf.str());
string buf_poubelle;
......@@ -151,12 +151,12 @@ void RealD33AstriumChopperComputerDriver::setGear(DeviceDriver* aDeviceDriver) {
int32 w_gear = any_cast<int32>(aDeviceDriver->getValue(D33ASTRIUMCHOPPER_WANTED_GEAR_DEVICE_CONTAINER));
uint32 channel = aDeviceDriver->getChannel();
buf_conf <<D33ASTRIUMCHOPPER_GEAR_COMMAND<< channel<<": "<<w_gear <<D33ASTRIUMCHOPPER_ENDL;
// cout<< "send setGear "<< D33ASTRIUMCHOPPER_GEAR_COMMAND<< channel<<":"<<w_gear<< endl;
cout<< "send setGear "<< D33ASTRIUMCHOPPER_GEAR_COMMAND<< channel<<":"<<w_gear<< endl;
m_owner->write(buf_conf.str());
string buf_poubelle;
m_owner->read(buf_poubelle, D33ASTRIUMCHOPPER_ENDL); // just for clear the second string
// cout<< "return setGear "<<buf_poubelle<< endl;
cout<< "return setGear "<<buf_poubelle<< endl;
sleep(1);
}
......