Skip to content

Commit

Permalink
Removed TableLoader and Boost dependency, adjust paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubanek committed Oct 24, 2023
1 parent 27ca580 commit a616d9e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 158 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lsstts/develop-env:c0028.004
FROM lsstts/develop-env:develop

USER root
RUN chmod a+rwX -R /home/saluser/
Expand All @@ -7,13 +7,15 @@ USER saluser
WORKDIR /home/saluser

RUN source ~/.setup.sh \
&& mamba install -y readline yaml-cpp boost-cpp catch2 spdlog \
&& mamba install -y readline yaml-cpp boost-cpp catch2 spdlog fmt \
&& echo > .crio_setup.sh -e \
echo "Configuring cRIO development environment" \\n\
export SHELL=bash \\n\
source /home/saluser/.setup_salobj.sh \\n\
export PATH=\$CONDA_PREFIX/bin:\$PATH \\n\
export LIBS="-L\$CONDA_PREFIX/lib" \\n\
export CPP_FLAGS="-I\$CONDA_PREFIX/include" \\n
export CPP_FLAGS="-I\$CONDA_PREFIX/include" \\n\
export PKG_CONFIG_PATH=$CONDA_PREFIX/share/pkgconfig \\n\
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib \\n

# SHELL ["/bin/bash", "-lc"]
3 changes: 1 addition & 2 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ifndef VERBOSE
silence := --silence-errors
endif

c_opts := -fdata-sections -ffunction-sections -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE
c_opts := -fdata-sections -ffunction-sections -DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE -DSPDLOG_FMT_EXTERNAL

ifdef DEBUG
c_opts += -g
Expand All @@ -29,7 +29,6 @@ PKG_LIBS := $(shell pkg-config yaml-cpp --libs $(silence)) \

LIBS += $(PKG_LIBS) -ldl -lpthread

BOOST_CPPFLAGS := -I/usr/include/boost169
PKG_CPP_FLAGS := $(shell pkg-config yaml-cpp --cflags $(silence)) \
$(shell pkg-config spdlog --cflags $(silence)) \
$(shell pkg-config fmt --cflags $(silence))
Expand Down
19 changes: 19 additions & 0 deletions doc/version-history.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###############
Version History
###############

v1.9.0
======

* MPU changed to SerialMultiplex

v1.8.0
======

* LVDT ElectroMechanical readout

v1.7.0
======

* offsets,.. ILC commands
* improved re-heater gain management
82 changes: 0 additions & 82 deletions include/cRIO/TableLoader.h

This file was deleted.

62 changes: 0 additions & 62 deletions src/LSST/cRIO/TableLoader.cpp

This file was deleted.

4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ clean:
# file targets
%.cpp.o: %.cpp.d
@echo '[CPP] $(patsubst %.d,%,$<)'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) -c -fmessage-length=0 -o $@ $(patsubst %.d,%,$<)
${co}$(CPP) $(CPP_FLAGS) -c -fmessage-length=0 -o $@ $(patsubst %.d,%,$<)

%.cpp.d: %.cpp
@echo '[DPP] $<'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
${co}$(CPP) $(CPP_FLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
13 changes: 8 additions & 5 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ endif

TEST_CPPFLAGS := -I. \
-I"../include" \
$(shell pkg-config --cflags catch2-with-main)
$(shell pkg-config --cflags catch2-with-main $(silence)) \
$(shell pkg-config --cflags yaml-cpp $(silence))

CPP_FLAGS += $(shell pkg-config --libs catch2-with-main)
CPP_FLAGS += \
$(shell pkg-config --libs catch2-with-main $(silence)) \
$(shell pkg-config --libs yaml-cpp $(silence))

compile: libcRIOtest.a $(BINARIES) $(TEST_REQ_READLINE)

Expand All @@ -38,17 +41,17 @@ clean:

%.cpp.o: %.cpp.d
@echo '[CPP] $(patsubst %.d,%,$<)'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) $(TEST_CPPFLAGS) -c -fmessage-length=0 -o $@ -Wl,--gc-sections $(patsubst %.d,%,$<)
${co}$(CPP) $(CPP_FLAGS) $(TEST_CPPFLAGS) -c -fmessage-length=0 -o $@ -Wl,--gc-sections $(patsubst %.d,%,$<)

%.cpp.d: %.cpp
@echo '[DPP] $<'
${co}$(CPP) $(BOOST_CPPFLAGS) $(CPP_FLAGS) $(TEST_CPPFLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'
${co}$(CPP) $(CPP_FLAGS) $(TEST_CPPFLAGS) -M $< -MF $@ -MT '$(patsubst %.cpp,%.o,$<) $@'

$(TEST_REQ_READLINE): %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
@echo '[TPR] $<'
${co}$(CPP) -o $@ $(LIBS_FLAGS) $(LIBS) $^ $(CPP_FLAGS) -lreadline # -lhistory

${BINARIES}: %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
$(BINARIES): %: %.cpp.o ../lib/libcRIOcpp.a libcRIOtest.a
@echo '[TPP] $<'
${co}$(CPP) -o $@ -Wl,--gc-sections $(LIBS_FLAGS) $(LIBS) $^ $(CPP_FLAGS)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_ElectromechanicalPneumaticILC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ TEST_CASE("Test SSA force set", "[ElectromechanicalPneumaticILC]") {
REQUIRE_NOTHROW(ilc.processResponse(response.getBuffer(), response.getLength()));

REQUIRE(ilc.primaryForce == Approx(31.45));
REQUIRE(isnan(ilc.secondaryForce));
REQUIRE(std::isnan(ilc.secondaryForce));
}

TEST_CASE("Test DAA force set", "[ElectromechanicalPneumaticILC]") {
Expand Down Expand Up @@ -197,7 +197,7 @@ TEST_CASE("Test SAA force actuator readout", "[ElectromechanicalPneumaticILC]")
REQUIRE_NOTHROW(ilc.processResponse(response.getBuffer(), response.getLength()));

REQUIRE(ilc.primaryForce == Approx(13.7));
REQUIRE(isnan(ilc.secondaryForce));
REQUIRE(std::isnan(ilc.secondaryForce));
}

TEST_CASE("Test DAA force actuator readout", "[ElectromechanicalPneumaticILC]") {
Expand Down

0 comments on commit a616d9e

Please sign in to comment.