...
 
Commits (2)
......@@ -39,6 +39,7 @@ const string AxisCommon::RAZ_COMMAND = "raz";
const string AxisCommon::WRITE_ENCODER_COMMAND = "writeEncoder";
const string AxisCommon::OSCILLATING_MOVE_COMMAND = "oscillatingMove";
const string AxisCommon::MOVE_SINU_COMMAND = "start_sinu";
const string AxisCommon::MOVE_CAM_COMMAND = "start_cam";
const string AxisCommon::HOME_SEARCH_COMMAND = "home_search";
const string AxisCommon::GO_HOME_COMMAND= "go_home";
......
......@@ -85,6 +85,7 @@ public:
static const std::string WRITE_ENCODER_COMMAND; //! Set zero command
static const std::string OSCILLATING_MOVE_COMMAND;
static const std::string MOVE_SINU_COMMAND;
static const std::string MOVE_CAM_COMMAND;
static const std::string HOME_SEARCH_COMMAND; //! Home search command
static const std::string GO_HOME_COMMAND; //! Go Home command
......
......@@ -41,6 +41,7 @@ const int32 AkdDriver::SPEED_MODE = 1;
const int32 AkdDriver::SINU_MODE = 2;
const int32 AkdDriver::POSITION_MODE = 3;
const int32 AkdDriver::SET_POSITION_MODE = 4;
const int32 AkdDriver::CAM_MODE = 5;
AkdDriver::AkdDriver(const string& name) :
......@@ -117,6 +118,9 @@ void AkdDriver::execute(const string& aCommand) {
} else if (aCommand == MOVE_SINU_COMMAND) {
currentState->moveSinu();
}else if (aCommand == MOVE_CAM_COMMAND) {
currentState->moveCam();
} else if (aCommand == SpeedCommon::SPEED_MOVE_COMMAND) {
currentState->speedMove();
......
......@@ -87,6 +87,7 @@ public:
static const int32 SINU_MODE;
static const int32 POSITION_MODE;
static const int32 SET_POSITION_MODE;
static const int32 CAM_MODE;
private:
......
......@@ -67,6 +67,10 @@ public:
* \brief sinusoidal move command implementation
*/
virtual void moveSinu() = 0;
/*!
* \brief sinusoidal move command implementation
*/
virtual void moveCam() = 0;
/*
* Position move command implementation
......
......@@ -54,6 +54,13 @@ void PerfectAkdDriver::moveSinu() {
}
/*
* moveCam
*/
void PerfectAkdDriver::moveCam() {
}
/*
* speedMove
*/
......
......@@ -72,6 +72,12 @@ public:
*/
virtual void moveSinu();
/*!
* \brief Implement sinusoidal move command implementation
*/
virtual void moveCam();
/*
* Position move command implementation
*/
......
......@@ -138,6 +138,9 @@ void RealAkdDriver::start() {
} else if (owner()->execMode() == AkdDriver::SINU_MODE) {
moveSinu();
} else if (owner()->execMode() == AkdDriver::CAM_MODE) {
moveCam();
} else if (owner()->execMode() == AkdDriver::POSITION_MODE) {
positionMove();
......@@ -225,6 +228,9 @@ void RealAkdDriver::moveSinu() {
}
void RealAkdDriver::moveCam(){
writeCAM();
}
/*
* speedMove
*/
......
......@@ -74,6 +74,11 @@ public:
*/
virtual void moveSinu();
/*!
* \brief Implement sinusoidal move command implementation
*/
virtual void moveCam();
/*
* Position move command implementation
*/
......
......@@ -72,6 +72,12 @@ void SimulatedAkdDriver::stop() {
void SimulatedAkdDriver::moveSinu() {
cout << "executing sinu mode " << endl;
}
/*
* moveSinu
*/
void SimulatedAkdDriver::moveCam() {
cout << "executing cam mode " << endl;
}
/*
* speedMove
......
......@@ -69,9 +69,13 @@ public:
/*!
* \brief Implement sinusoidal move command implementation
*/
virtual void moveSinu();
* \brief Implement sinusoidal move command implementation
*/
virtual void moveSinu();
/*!
* \brief Implement sinusoidal move command implementation
*/
virtual void moveCam();
/*
* Position move command implementation
......
......@@ -25,6 +25,8 @@ TcpAkd.modePositionValue=3
TcpAkd.modePositionLabel=Position mode
TcpAkd.modeSetPositionValue=4
TcpAkd.modeSetPositionLabel=Set Feedback
TcpAkd.modeCamValue=5
TcpAkd.modeCamLabel=Cam mode
#Values & Labels of Status
TcpAkd.statusInitValue=0
......
......@@ -6,7 +6,7 @@
<label role="TcpAkd1" property="status_function" prefix="TcpAkd.statusFunctionPrefix" valuesAndLabels="TcpAkd.functionStatusIdle,TcpAkd.functionStatusRun"/>
</group>
<newLine />
<combo role="TcpAkd1" property="exec_mode" valuesAndLabels="TcpAkd.modeSpeed,TcpAkd.modeSinu,TcpAkd.modePosition,TcpAkd.modeSetPosition" />
<combo role="TcpAkd1" property="exec_mode" valuesAndLabels="TcpAkd.modeSpeed,TcpAkd.modeSinu,TcpAkd.modeCam,TcpAkd.modePosition,TcpAkd.modeSetPosition" />
<text role="TcpAkd1" property="ratio" prefix="TcpAkd.ratioPrefix"/>
<text role="TcpAkd1" property="duration" prefix="TcpAkd.durationPrefix"/>
......