Skip to content
Snippets Groups Projects
Commit 191503a6 authored by Gabriel Fedel's avatar Gabriel Fedel :speech_balloon:
Browse files

Remove leading characters and check size from description on configChannels

When size > 41, warn and truncate description
parent 72b3c444
No related branches found
No related tags found
1 merge request!17Change the way to set alias and description
......@@ -3,7 +3,7 @@ Refer,Reference
PreAmpFwd,PreAmp Fwd
PwrAmpFwd,PowerAmp Fwd
PwrAmpRefl,PowerAmp Refl
CvtFwd, Cavity Forward
CvtRfl, Cavity Refl
VM, Vector Modulator
VMOut, Vector Modulator Out
CvtFwd,Cavity Forward
CvtRfl,Cavity Refl
VM,Vector Modulator
VMOut,Vector Modulator Out
......@@ -31,7 +31,11 @@ i=0
cat $confFile | while read line
do
pv_name=$(echo $line | cut -f 1 -d ,)
desc=$(echo $line | cut -f 2 -d ,)
desc=$(echo $line | cut -f 2 -d , | sed -e 's/^[ \t]*//')
if [ ${#desc} -gt 41 ]; then
echo "Warning: Description truncated to char[41] - ${desc:0:40}"
desc=${desc:0:40}
fi
# set aliases
echo "$template0$i, A=$LLRF_IOC_NAME$iNum:$pv_name\")" >> $fPath
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment