Added initializers for char buffers
This commit is contained in:
5
Makefile
5
Makefile
@ -12,11 +12,8 @@ REQUIRED+=motorBase
|
||||
# Specify the version of motorBase we want to build against
|
||||
motorBase_VERSION=7.2.2
|
||||
|
||||
# Specify the version of sinqMotor we want to build against
|
||||
sinqMotor_VERSION=0.11.0
|
||||
|
||||
# Specify the version of turboPmac we want to build against
|
||||
turboPmac_VERSION=0.10.0
|
||||
turboPmac_VERSION=mathis_s
|
||||
|
||||
# These headers allow to depend on this library for derived drivers.
|
||||
HEADERS += src/seleneGuideController.h
|
||||
|
@ -191,7 +191,7 @@ asynStatus seleneLiftAxis::normalizePositions() {
|
||||
double lift = 0.0;
|
||||
double angle = 0.0;
|
||||
asynStatus status = asynSuccess;
|
||||
char response[pC_->MAXBUF_];
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
double encoderPositions[6] = {0.0};
|
||||
double absolutePositions[6] = {0.0};
|
||||
int nvals = 0;
|
||||
@ -268,7 +268,8 @@ asynStatus seleneLiftAxis::doPoll(bool *moving) {
|
||||
// Status of parameter library operations
|
||||
asynStatus pl_status = asynSuccess;
|
||||
|
||||
char response[pC_->MAXBUF_], userMessage[pC_->MAXBUF_] = {0};
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
char userMessage[pC_->MAXBUF_] = {0};
|
||||
|
||||
int nvals = 0;
|
||||
int axStatus = 0;
|
||||
@ -475,7 +476,8 @@ asynStatus seleneLiftAxis::targetPosition(double *targetPosition) {
|
||||
|
||||
asynStatus seleneLiftAxis::startCombinedMove() {
|
||||
|
||||
char command[pC_->MAXBUF_], response[pC_->MAXBUF_];
|
||||
char command[pC_->MAXBUF_] = {0};
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
double liftTargetPosition = 0.0;
|
||||
double angleTargetPosition = 0.0;
|
||||
asynStatus status = asynSuccess;
|
||||
@ -527,7 +529,7 @@ asynStatus seleneLiftAxis::stop(double acceleration) {
|
||||
// Status of parameter library operations
|
||||
asynStatus pl_status = asynSuccess;
|
||||
|
||||
char response[pC_->MAXBUF_];
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
|
||||
// =========================================================================
|
||||
|
||||
@ -586,7 +588,7 @@ asynStatus seleneLiftAxis::readEncoderType() {
|
||||
asynStatus seleneLiftAxis::doHome(double minVelocity, double maxVelocity,
|
||||
double acceleration, int forwards) {
|
||||
|
||||
char response[pC_->MAXBUF_];
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
|
||||
// No answer expected
|
||||
return pC_->writeRead(axisNo_,
|
||||
|
@ -156,8 +156,9 @@ asynStatus seleneOffsetAxis::doPoll(bool *moving) {
|
||||
int error = 0;
|
||||
int nvals = 0;
|
||||
|
||||
char command[pC_->MAXBUF_], response[pC_->MAXBUF_],
|
||||
userMessage[pC_->MAXBUF_];
|
||||
char command[pC_->MAXBUF_] = {0};
|
||||
char response[pC_->MAXBUF_] = {0};
|
||||
char userMessage[pC_->MAXBUF_] = {0};
|
||||
|
||||
// =========================================================================
|
||||
|
||||
@ -207,8 +208,8 @@ asynStatus seleneOffsetAxis::doPoll(bool *moving) {
|
||||
}
|
||||
|
||||
// TODO: To be removed, once the real limits are derived
|
||||
//highLimit = 10.0;
|
||||
//lowLimit = -10.0;
|
||||
// highLimit = 10.0;
|
||||
// lowLimit = -10.0;
|
||||
|
||||
// Convert into lift coordinate system
|
||||
absoluteHighLimitLiftCS_ = highLimit - zOffset_;
|
||||
@ -368,7 +369,6 @@ asynStatus seleneOffsetAxisCreateAxis(const char *portName, int axisNo,
|
||||
portName, __PRETTY_FUNCTION__, __LINE__);
|
||||
return asynError;
|
||||
}
|
||||
// Unsafe cast of the pointer to an asynPortDriver
|
||||
asynPortDriver *apd = (asynPortDriver *)(ptr);
|
||||
|
||||
// Safe downcast
|
||||
|
Reference in New Issue
Block a user