3 Commits
1.1.0 ... 1.1.1

Author SHA1 Message Date
38b4ba9843 Fixed record setup in detectorTower.db
All checks were successful
Test And Build / Lint (push) Successful in 4s
Test And Build / Build (push) Successful in 16s
2025-07-21 17:04:09 +02:00
8eba612524 UDF state is not shown during initialization anymore
All checks were successful
Test And Build / Lint (push) Successful in 4s
Test And Build / Build (push) Successful in 15s
These changes process the AdjustOrigin record during initialization to
make sure its .STAT field does not show "UDF" anymore before the first
processing. The gate record makes sure that no command is send to the
underlying hardware during initial processing.
2025-07-09 11:43:31 +02:00
9565198424 adds gitea action
All checks were successful
Test And Build / Lint (push) Successful in 3s
Test And Build / Build (push) Successful in 14s
2025-07-04 14:40:11 +02:00
3 changed files with 44 additions and 61 deletions

View File

@@ -0,0 +1,30 @@
name: Test And Build
on: [push]
jobs:
Lint:
runs-on: linepics
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: cppcheck
run: cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 src/*.cpp
- name: formatting
run: clang-format --style=file --Werror --dry-run src/*.cpp src/*.h
Build:
runs-on: linepics
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: 'true'
- run: |
pushd turboPmac
sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
echo -e "\nIGNORE_SUBMODULES += sinqmotor" >> Makefile
make install
popd
- run: |
sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
echo -e "\nIGNORE_SUBMODULES += turboPmac" >> Makefile
make install

View File

@@ -1,58 +0,0 @@
default:
image: docker.psi.ch:5000/sinqdev/sinqepics:latest
stages:
- lint
- build
- test
cppcheck:
stage: lint
script:
- cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 src/*.cpp
artifacts:
expire_in: 1 week
tags:
- sinq
formatting:
stage: lint
script:
- clang-format --style=file --Werror --dry-run src/*.cpp
artifacts:
expire_in: 1 week
tags:
- sinq
# clangtidy:
# stage: lint
# script:
# - curl https://docker.psi.ch:5000/v2/_catalog
# # - dnf update -y
# # - dnf install -y clang-tools-extra
# # - clang-tidy sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h -checks=cppcoreguidelines-*,cert-*
# # tags:
# # - sinq
build_module:
stage: build
script:
- export TURBOPMAC_VERSION="$(grep 'turboPmac_VERSION=' Makefile | cut -d= -f2)"
- git clone --depth 1 --branch "${TURBOPMAC_VERSION}" https://gitlab-ci-token:${CI_JOB_TOKEN}@git.psi.ch/sinq-epics-modules/sinqmotor.git
- pushd sinqmotor
- sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
- echo "LIBVERSION=${TURBOPMAC_VERSION}" >> Makefile
- make install
- popd
- sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile
- echo "LIBVERSION=${CI_COMMIT_TAG:-0.0.1}" >> Makefile
- make install
- cp -rT "/ioc/modules/detectorTower/$(ls -U /ioc/modules/detectorTower/ | head -1)" "./detectorTower-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}"
artifacts:
name: "detectorTower-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}"
paths:
- "detectorTower-${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}/*"
expire_in: 1 week
when: always
tags:
- sinq

View File

@@ -58,7 +58,6 @@ record(ai, "$(INSTR)$(M):Origin") {
field(INP, "@asyn($(CONTROLLER),$(AXIS)) MOTOR_ORIGIN")
field(SCAN, "I/O Intr")
field(PINI, "NO")
field(VAL, "0")
}
# Shift the origin of the corresponding axis by the given value. The axis will move to this
@@ -69,16 +68,28 @@ record(ao, "$(INSTR)$(M):AdjustOrigin") {
field(PINI, "NO")
field(FLNK, "$(INSTR)$(M):ResetAO")
field(VAL, "0")
field(UDF, "0")
field(SCAN, "Passive")
}
# Only forward nonzero inputs for the origin adjustment
record(calcout, "$(INSTR)$(M):GateOrigin") {
field(CALC, "A!=0?A:0")
field(INPA, "$(INSTR)$(M):AdjustOrigin")
field(OUT, "$(INSTR)$(M):WriteAO.VAL PP") # Forward the value to the driver
field(PINI, "NO")
field(SCAN, "Passive")
}
# Reset the PV $(INSTR)$(M):AdjustOrigin to zero after it has been written to and
# forward the value to $(INSTR)$(M):WriteAO which does the actual writing.
record(seq, "$(INSTR)$(M):ResetAO") {
field(DESC, "Write value to hardware then reset to 0")
field(DOL1, "$(INSTR)$(M):AdjustOrigin")
field(LNK1, "$(INSTR)$(M):WriteAO.VAL PP") # Perform write to hardware
field(DOL1, "1") # Dummy value which is only here to trigger processing of LNK1
field(LNK1, "$(INSTR)$(M):GateOrigin.PROC PP")
field(DOL2, "0.0")
field(LNK2, "$(INSTR)$(M):AdjustOrigin.VAL PP") # Reset to zero
field(UDF, "0")
}
# This record forwards the adjustment of the origin to the asyn driver.