Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed for new cRIO ILCBusList etc #35

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ properties(
node {
def SALUSER_HOME = "/home/saluser"
def BRANCH = (env.CHANGE_BRANCH != null) ? env.CHANGE_BRANCH : env.BRANCH_NAME
def SAME_CRIO_BRANCH = ["main", "tickets/DM-41336", "tickets/DM-42503"]
def SAME_CRIO_BRANCH = ["main", "tickets/DM-42503"]
def CRIO_BRANCH=(BRANCH in SAME_CRIO_BRANCH) ? BRANCH : "develop"

stage('Cloning sources')
{
dir("ts_cRIOcpp") {
git branch: (BRANCH in SAME_CRIO_BRANCH) ? BRANCH : "develop", url: 'https://github.com/lsst-ts/ts_cRIOcpp'
git branch: CRIO_BRANCH, url: 'https://github.com/lsst-ts/ts_cRIOcpp'
}
dir("ts_m1m3thermal") {
checkout scm
Expand All @@ -35,7 +36,7 @@ node {

stage('Building dev container')
{
M1M3sim = docker.build("lsstts/mtm1m3_sim:" + env.BRANCH_NAME.replace("/", "_"), "--target crio-develop --build-arg XML_BRANCH=$BRANCH " + (params.noCache ? "--no-cache " : " ") + "$WORKSPACE/ts_m1m3thermal")
M1M3sim = docker.build("lsstts/mtm1m3_sim:" + env.BRANCH_NAME.replace("/", "_"), "--target crio-develop --build-arg XML_BRANCH=$BRANCH --build-arg cRIO_CPP=$CRIO_BRANCH" + (params.noCache ? " --no-cache " : " ") + "$WORKSPACE/ts_m1m3thermal")
}

stage("Running tests")
Expand Down
2 changes: 1 addition & 1 deletion doc/version-history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Version History
v0.2.0
------

# Report thermal status strings
* Report thermal status strings
* Reports meaning of ILC status bites
* Improved makefile

Expand Down
10 changes: 5 additions & 5 deletions src/LSST/M1M3/TS/Commands/SAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void SAL_start::execute() {
SPDLOG_INFO("Glycol pump turned on.");
}

changeAllILCsMode(ILC::ILCMode::Disabled);
changeAllILCsMode(ILC::Mode::Disabled);

TSApplication::ilc()->clear();
TSApplication::instance().callFunctionOnIlcs(
Expand All @@ -85,7 +85,7 @@ void SAL_start::execute() {
}

void SAL_enable::execute() {
changeAllILCsMode(ILC::ILCMode::Enabled);
changeAllILCsMode(ILC::Mode::Enabled);
IFPGA::get().setFCUPower(true);

Events::SummaryState::setState(MTM1M3TS_shared_SummaryStates_EnabledState);
Expand All @@ -94,7 +94,7 @@ void SAL_enable::execute() {
}

void SAL_disable::execute() {
changeAllILCsMode(ILC::ILCMode::Disabled);
changeAllILCsMode(ILC::Mode::Disabled);
IFPGA::get().setFCUPower(false);
IFPGA::get().setCoolantPumpPower(false);

Expand All @@ -103,8 +103,8 @@ void SAL_disable::execute() {
}

void SAL_standby::execute() {
changeAllILCsMode(ILC::ILCMode::ClearFaults);
changeAllILCsMode(ILC::ILCMode::Standby);
changeAllILCsMode(ILC::Mode::ClearFaults);
changeAllILCsMode(ILC::Mode::Standby);
Events::SummaryState::setState(MTM1M3TS_shared_SummaryStates_StandbyState);
ackComplete();
SPDLOG_INFO("Standby");
Expand Down
17 changes: 5 additions & 12 deletions src/LSST/M1M3/TS/SALThermalILC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,20 @@
#include <Settings/Thermal.h>
#include <Telemetry/ThermalData.h>

namespace LSST {
namespace M1M3 {
namespace TS {
using namespace LSST::M1M3::TS;

SALThermalILC::SALThermalILC(std::shared_ptr<SAL_MTM1M3TS> m1m3tsSAL) : _m1m3tsSAL(m1m3tsSAL) {}
SALThermalILC::SALThermalILC(std::shared_ptr<SAL_MTM1M3TS> m1m3tsSAL)
: ILC::ILCBusList(1), cRIO::ThermalILC(1), _m1m3tsSAL(m1m3tsSAL) {}

#if 0
void SALThermalILC::handleMissingReply(uint8_t address, uint8_t func) {
if (Settings::Thermal::instance().autoDisable) {
Events::EnabledILC::instance().communicationProblem(_address2ILCIndex(address));
} else {
cRIO::ThermalILC::handleMissingReply(address, func);
}
}

void SALThermalILC::preProcess() {}

void SALThermalILC::postProcess() {}
#endif

void SALThermalILC::processServerID(uint8_t address, uint64_t uniqueID, uint8_t ilcAppType,
uint8_t networkNodeType, uint8_t ilcSelectedOptions,
Expand Down Expand Up @@ -78,7 +75,3 @@ void SALThermalILC::processReHeaterGains(uint8_t address, float proportionalGain
}

uint8_t SALThermalILC::_address2ILCIndex(uint8_t address) { return address - 1; }

} // namespace TS
} // namespace M1M3
} // namespace LSST
5 changes: 0 additions & 5 deletions src/LSST/M1M3/TS/SALThermalILC.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ class SALThermalILC : public cRIO::ThermalILC {
SALThermalILC(std::shared_ptr<SAL_MTM1M3TS> m1m3tsSAL);

protected:
void handleMissingReply(uint8_t address, uint8_t func) override;

void preProcess() override;
void postProcess() override;

void processServerID(uint8_t address, uint64_t uniqueID, uint8_t ilcAppType, uint8_t networkNodeType,
uint8_t ilcSelectedOptions, uint8_t networkNodeOptions, uint8_t majorRev,
uint8_t minorRev, std::string firmwareName) override;
Expand Down
4 changes: 2 additions & 2 deletions src/LSST/M1M3/TS/SimulatedFPGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
using namespace LSST::cRIO;
using namespace LSST::M1M3::TS;

SimulatedFPGA::SimulatedFPGA() : IFPGA(), _U16ResponseStatus(IDLE) {
SimulatedFPGA::SimulatedFPGA() : ILC::ILCBusList(1), IFPGA(), ThermalILC(1), _U16ResponseStatus(IDLE) {
_broadcastCounter = 0;
srandom(time(NULL));
for (int i = 0; i < NUM_TS_ILC; i++) {
_mode[i] = ILC::ILCMode::Standby;
_mode[i] = ILC::Mode::Standby;
_heaterPWM[i] = 0;
_fanRPM[i] = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/m1m3tscli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class M1M3TScli : public FPGACliApp {

class PrintThermalILC : public ThermalILC, public PrintILC {
public:
PrintThermalILC(uint8_t bus) : ILC(bus), ThermalILC(bus), PrintILC(bus) {}
PrintThermalILC(uint8_t bus) : ILCBusList(bus), ThermalILC(bus), PrintILC(bus) {}

protected:
void processThermalStatus(uint8_t address, uint8_t status, float differentialTemperature, uint8_t fanRPM,
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ junit: compile
@$(foreach b,$(BINARIES),echo '[JUT] ${b}'; ./${b} -r junit -o ${b}.xml;)

clean:
@$(foreach df,$(BINARIES) $(DEPS) $(JUNIT_FILES),echo '[RM ] ${df}'; $(RM) ${df};)
@$(foreach df,$(BINARIES) $(patsubst %,%.cpp.o,$(BINARIES)) $(DEPS) $(JUNIT_FILES),echo '[RM ] ${df}'; $(RM) ${df};)

../src/libM1M3SS.a: FORCE
@$(MAKE) -C ../src libM1M3TS.a SIMULATOR=1
Expand Down
Loading