Compare commits
6 Commits
e234d05815
...
95bc899114
| Author | SHA1 | Date | |
|---|---|---|---|
| 95bc899114 | |||
| 82f509596d | |||
| 2376e2adfd | |||
| 4e30331c92 | |||
| 2578081814 | |||
| 6f639d7233 |
125
.gitignore
vendored
Normal file
125
.gitignore
vendored
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
# Took these from the https://github.com/github/gitignore project on October 21, 2011
|
||||||
|
|
||||||
|
# **** 'Personal' entries don't belong in here - put them in your .git/info/exclude file ****
|
||||||
|
|
||||||
|
# Ignore text editor (e.g. emacs) autosave files
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Build Artifacts
|
||||||
|
O.*_Common/
|
||||||
|
O.*_RHEL8-x86_64/
|
||||||
|
|
||||||
|
# Compiled Object files
|
||||||
|
*.slo
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.d
|
||||||
|
SICServer*
|
||||||
|
|
||||||
|
# Compiled Dynamic libraries
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Compiled Static libraries
|
||||||
|
*.lai
|
||||||
|
*.la
|
||||||
|
*.a
|
||||||
|
|
||||||
|
# Compiled python files
|
||||||
|
*.py[co]
|
||||||
|
|
||||||
|
# Eclipse-generated files
|
||||||
|
*.pydevproject
|
||||||
|
.project
|
||||||
|
.metadata
|
||||||
|
bin/**
|
||||||
|
tmp/**
|
||||||
|
tmp/**/*
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*~.nib
|
||||||
|
local.properties
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
.loadpath
|
||||||
|
|
||||||
|
# External tool builders
|
||||||
|
.externalToolBuilders/
|
||||||
|
|
||||||
|
# Locally stored "Eclipse launch configurations"
|
||||||
|
*.launch
|
||||||
|
|
||||||
|
# CDT-specific
|
||||||
|
.cproject
|
||||||
|
|
||||||
|
# PDT-specific
|
||||||
|
.buildpath
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
*.sln
|
||||||
|
*.vcproj
|
||||||
|
*.exe
|
||||||
|
*.vcxproj
|
||||||
|
*.filters
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
*.sdf
|
||||||
|
.cvsignore
|
||||||
|
|
||||||
|
#Test results
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.vspscc
|
||||||
|
.builds
|
||||||
|
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Others
|
||||||
|
*.autosave
|
||||||
|
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
|
||||||
|
# Mac OS X Finder
|
||||||
|
.DS_Store
|
||||||
|
._*
|
||||||
@@ -245,6 +245,10 @@ asynStatus sinqAxis::forcedPoll(bool *moving) {
|
|||||||
// Clear the communication
|
// Clear the communication
|
||||||
setAxisParamChecked(this, motorStatusCommsError, false);
|
setAxisParamChecked(this, motorStatusCommsError, false);
|
||||||
|
|
||||||
|
// Assume the motor is initially connected. During the poll, this value will
|
||||||
|
// be set to false if the motor is not connected.
|
||||||
|
setAxisParamChecked(this, motorConnected, true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The poll function is just a wrapper around doPoll and handles mainly the
|
The poll function is just a wrapper around doPoll and handles mainly the
|
||||||
callParamCallbacks() function. This wrapper is used to make sure
|
callParamCallbacks() function. This wrapper is used to make sure
|
||||||
@@ -252,6 +256,11 @@ asynStatus sinqAxis::forcedPoll(bool *moving) {
|
|||||||
*/
|
*/
|
||||||
poll_status = doPoll(moving);
|
poll_status = doPoll(moving);
|
||||||
|
|
||||||
|
// Motor is not connected
|
||||||
|
if (poll_status == asynDisconnected) {
|
||||||
|
setAxisParamChecked(this, motorConnected, false);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If the poll did not succeed OR if an error message is waiting, something
|
If the poll did not succeed OR if an error message is waiting, something
|
||||||
went wrong and the motor has a status problem. Otherwise, delete the error
|
went wrong and the motor has a status problem. Otherwise, delete the error
|
||||||
@@ -484,6 +493,31 @@ asynStatus sinqAxis::setMotorPosition(double motorPos) {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asynStatus sinqAxis::setLimits(double highLimit, double lowLimit) {
|
||||||
|
asynStatus status = asynSuccess;
|
||||||
|
|
||||||
|
if (highLimit < lowLimit) {
|
||||||
|
double motorPos;
|
||||||
|
double motorRecRes;
|
||||||
|
status = motorPosition(&motorPos);
|
||||||
|
if (status != asynSuccess) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
getAxisParamChecked(this, motorRecResolution, &motorRecRes);
|
||||||
|
|
||||||
|
// This is a safe fallback
|
||||||
|
setAxisParamChecked(this, motorHighLimitFromDriver,
|
||||||
|
motorPos + motorRecRes);
|
||||||
|
setAxisParamChecked(this, motorLowLimitFromDriver,
|
||||||
|
motorPos - motorRecRes);
|
||||||
|
} else {
|
||||||
|
setAxisParamChecked(this, motorHighLimitFromDriver, highLimit);
|
||||||
|
setAxisParamChecked(this, motorLowLimitFromDriver, lowLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
asynStatus sinqAxis::assertConnected() {
|
asynStatus sinqAxis::assertConnected() {
|
||||||
int connected = 0;
|
int connected = 0;
|
||||||
getAxisParamChecked(this, motorConnected, &connected);
|
getAxisParamChecked(this, motorConnected, &connected);
|
||||||
|
|||||||
@@ -391,6 +391,20 @@ class HIDDEN sinqAxis : public asynMotorAxis {
|
|||||||
*/
|
*/
|
||||||
asynStatus setMotorPosition(double motorPosition);
|
asynStatus setMotorPosition(double motorPosition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sanity-check the limits and write them into the database
|
||||||
|
*
|
||||||
|
* If the given `highLimit` is smaller than the `lowLimit`, the limits are
|
||||||
|
* set to `highLimit = motorPosition + motorRecResolution`,
|
||||||
|
* `lowLimit = motorPosition - motorRecResolution` and a warning is
|
||||||
|
* displayed in the IOC shell. This is not an error
|
||||||
|
*
|
||||||
|
* @param highLimit
|
||||||
|
* @param lowLimit
|
||||||
|
* @return asynStatus
|
||||||
|
*/
|
||||||
|
asynStatus setLimits(double highLimit, double lowLimit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Check if the axis is not connected and print a corresponding error
|
* @brief Check if the axis is not connected and print a corresponding error
|
||||||
* message
|
* message
|
||||||
|
|||||||
Reference in New Issue
Block a user