Commit db8d3b44 authored by Franck Cecillon's avatar Franck Cecillon

tests

parent cf028cd0
......@@ -63,7 +63,7 @@ chopperNCSDriver::chopperNCSDriver(const string& name) :
speedStatus.init(this, SAVE, "speedStatus");
nbChopper.init(this, SAVE, "nbChopper");
currentSpeed.init(this, NOSAVE, "currentSpped");
currentSpeed.init(this, NOSAVE, "currentSpeed");
currentPhase.init(this, NOSAVE, "currentPhase");
chopperStatus.init(this, NOSAVE, "chopperStatus");
status.init(this, NOSAVE, "status");
......
......@@ -39,6 +39,7 @@ void PerfectchopperNCSDriver::init() {
void PerfectchopperNCSDriver::read() {
/*
int32 vals1 = readRegInt16(MB_ACT_VEL1);
owner()->currentSpeed.set(0, vals1);
......@@ -76,6 +77,7 @@ void PerfectchopperNCSDriver::read() {
} else if (owner()->indChopperActive.setpoint() == IND_CH2) {
owner()->phase = valp2;
}
*/
}
......@@ -181,8 +183,7 @@ void PerfectchopperNCSDriver::readStatus() {
}
owner()->currentSpeed.set(0 , 1000.);
owner()->currentSpeed.set(1 , 999.);
}
......@@ -239,31 +240,31 @@ void PerfectchopperNCSDriver::brake() {
float64 PerfectchopperNCSDriver::readRegFloat(int32 addReg){
float32 val32 = owner()->readFloat32HoldingRegister(addReg);
float32 val32 = 12; // owner()->readFloat32HoldingRegister(addReg);
usleep(10000);
return (float64) ( val32 );
}
void PerfectchopperNCSDriver::writeRegFloat(int32 addReg, float64 value){
float32 val32 = (float32) ( value );
owner()->writeMultipleRegister(addReg, val32);
/* float32 val32 = (float32) ( value );
owner()->writeMultipleRegister(addReg, val32);*/
}
void PerfectchopperNCSDriver::writeRegInt(int32 addReg, int32 value){
int32 val32 = (int32) ( value );
owner()->writeMultipleRegister(addReg, val32);
/* int32 val32 = (int32) ( value );
owner()->writeMultipleRegister(addReg, val32);*/
}
int32 PerfectchopperNCSDriver::readRegInt16(int32 addReg){
int16 val16 = owner()->readHoldingRegister(addReg);
int16 val16 = 11; // owner()->readHoldingRegister(addReg);
usleep(10000);
return (int32) ( val16 );
}
int32 PerfectchopperNCSDriver::readRegInt32(int32 addReg){
int32 val32 = owner()->readInt32HoldingRegister(addReg);
int32 val32 = 10; // owner()->readInt32HoldingRegister(addReg);
usleep(10000);
return (int32) ( val32 );
}
......
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