Added compiler flags for the C++ code and formatted README

This commit is contained in:
2025-12-23 13:27:14 +01:00
parent 0e2b5f5e93
commit 01a0239dfb
4 changed files with 62 additions and 25 deletions

View File

@@ -787,6 +787,10 @@ asynStatus turboPmacAxis::doMove(double position, int relative,
// =========================================================================
// Suppress unused variables warning
(void)minVelocity;
(void)acceleration;
getAxisParamChecked(this, motorEnableRBV, &enabled);
getAxisParamChecked(this, motorRecResolution, &motorRecResolution);
@@ -875,6 +879,9 @@ asynStatus turboPmacAxis::stop(double acceleration) {
// =========================================================================
// Suppress unused variables warning
(void)acceleration;
snprintf(command, sizeof(command), "M%2.2d=8", axisNo_);
status = pC_->writeRead(axisNo_, command, response, 0);
@@ -939,7 +946,7 @@ asynStatus turboPmacAxis::doReset() {
/*
Home the axis. On absolute encoder systems, this is a no-op
*/
asynStatus turboPmacAxis::doHome(double min_velocity, double max_velocity,
asynStatus turboPmacAxis::doHome(double minVelocity, double maxVelocity,
double acceleration, int forwards) {
// Status of read-write-operations of ASCII commands to the controller
@@ -950,6 +957,12 @@ asynStatus turboPmacAxis::doHome(double min_velocity, double max_velocity,
// =========================================================================
// Suppress unused variables warning
(void)minVelocity;
(void)maxVelocity;
(void)acceleration;
(void)forwards;
getAxisParamChecked(this, encoderType, &response);
// Only send the home command if the axis has an incremental encoder