Skip to content

Commit db06d37

Browse files
committed
a few mods & fixes
1 parent d333b36 commit db06d37

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

scripts/camViewer

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ do
194194
;;
195195
-H|--hutch)
196196
hutch=$2
197-
echo "HUTCH: $hutch" >&2
197+
#echo "HUTCH: $hutch" >&2
198198
shift 2
199199
;;
200200
-m|--main)
@@ -316,8 +316,7 @@ if [ $MAINSCREEN -gt 0 ]; then
316316
echo "Camera name not found in hutch. To see which cameras you can access from your current machine use the '-l/--list' option."
317317
exit 1
318318
elif [[ "$c" =~ $CAMNAME ]] && [ "$hutch" != "$(get_info --gethutch)" ] ; then
319-
echo "To use camera controls, you must be on the same hutch network as your camera."
320-
echo "Opening read-only main screen..."
319+
echo "Note that your use of camera controls depend on the gateway setup"
321320
fi
322321
echo 'try to get the main screen for: ' "$CAMNAME"
323322
echo 'start the main screen for camera base PV: ' "$CAMPVFULL"
@@ -351,8 +350,19 @@ if [ $DISABLE -gt 0 ]; then
351350
fi
352351

353352
if [ $ACQUIRE -gt 0 ]; then
354-
echo "Starting acquisition for ${CAMNAME}"
355-
caput -n "$CAMPVFULL":Acquire 1
353+
if [ "$CAMNAME" == 'XTCAV' ]; then
354+
echo "Acquire PV for XTCAV not writeable from photon side"
355+
exit
356+
fi
357+
IS_ACQUIRING=$(caget -t -n "$CAMPVFULL":Acquire_RBV)
358+
if isNum "$IS_ACQUIRING"; then
359+
if [ "$IS_ACQUIRING" -eq 0 ]; then
360+
echo "Starting acquisition for ${CAMNAME}"
361+
caput -n "$CAMPVFULL":Acquire 1
362+
else
363+
echo "Acquisition for ${CAMNAME} running"
364+
fi
365+
fi
356366
exit
357367
fi
358368

@@ -372,7 +382,8 @@ fi
372382

373383
# we do not have write permissions for the XTCAV camera _and_
374384
# the Acquire_RBV is 0 even when the camera is runnig
375-
if [ $CAMNAME != 'XTCAV' ]; then
385+
if [[ "$CAMNAME" != 'XTCAV' &&
386+
-z "$IS_REMOTE_SSH" ]]; then
376387
IS_ACQUIRING=$(caget -t -n "$CAMPVFULL":Acquire_RBV)
377388
if isNum "$IS_ACQUIRING"; then
378389
if [ "$IS_ACQUIRING" -eq 0 ]; then

scripts/camViewer_K

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ if [[ "$current_host" != "kfe-console" &&
101101
-z "$IS_REMOTE_SSH" &&
102102
"$NEED_SSH" -eq 1 ]]; then
103103
echo "Not in SSH, connecting to lfe-console..." >&2
104-
ssh -t kfe-console "IS_REMOTE_SSH=1 $DIR/camViewer $@ ; bash"
104+
ssh kfe-console "IS_REMOTE_SSH=1 $DIR/camViewer $* ; bash "
105105
exit_status=$?
106106
echo "SSH exit status: $exit_status" >&2
107107
exit $exit_status
108108
else
109-
$DIR/camViewer -H kfe "$@"
109+
"$DIR"/camViewer -H kfe $*
110110
fi
111-

scripts/camViewer_L

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ if [[ "$current_host" != "lfe-console" &&
100100
"$current_host" != "xbdo-control" &&
101101
-z "$IS_REMOTE_SSH" &&
102102
"$NEED_SSH" -eq 1 ]]; then
103+
103104
echo "Not in SSH, connecting to lfe-console..." >&2
104-
ssh -t lfe-console "IS_REMOTE_SSH=1 $DIR/camViewer $@ ; bash"
105+
ssh -t lfe-console "IS_REMOTE_SSH=1 $DIR/camViewer $* ; bash "
105106
#ssh -t lfe-console "IS_REMOTE_SSH=1 nohup $DIR/camViewer $@ 1>&2 | tee nohup.out &"
106107
#ssh -t lfe-console "IS_REMOTE_SSH=1 nohup $DIR/camViewer $@ "
107108
exit_status=$?
108109
echo "SSH exit status: $exit_status" >&2
109110
exit $exit_status
110111
else
111-
$DIR/camViewer -H lfe "$@"
112+
"$DIR"/camViewer -H lfe $*
112113
fi
113114

0 commit comments

Comments
 (0)