Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #98 from apollo-lhc/develop
Browse files Browse the repository at this point in the history
Merge develop to master for new tag
  • Loading branch information
dgastler authored Mar 31, 2023
2 parents b271c4c + e2f5c4c commit f800f3e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SOURCE_APOLLO_SM_PYBIND = python/ApolloSM_PyBind.cpp
LIBRARY_APOLLO_SM_PYBIND = lib/ApolloSM$(shell python3-config --extension-suffix)
PYBIND11_PATH=pybind11
# The directory where the Python3 ApolloSM library will be copied to
PYTHON3_INSTALL_PATH=/usr/local/lib64/python3.6/site-packages/
PYTHON3_INSTALL_PATH ?= $(shell python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")

INCLUDE_PATH += \
-Iinclude \
Expand Down Expand Up @@ -170,13 +170,17 @@ ${LIBRARY_APOLLO_SM_PYBIND}: ${LIBRARY_APOLLO_SM}
# install
# -----------------------
install: all
install -m 775 -d ${INSTALL_PATH}/lib
install -b -m 775 ./lib/* ${INSTALL_PATH}/lib
install -m 775 -d ${INSTALL_PATH}/bin
install -b -m 775 ./bin/* ${INSTALL_PATH}/bin
install -m 775 -d ${INSTALL_PATH}/include
cp -r include/* ${INSTALL_PATH}/include
cp lib/ApolloSM*.so ${PYTHON3_INSTALL_PATH}
install -m 775 -d ${INSTALL_PATH}/lib
@echo "Installing lib/* to ${INSTALL_PATH}/lib"
install -b -m 775 ./lib/* ${INSTALL_PATH}/lib
install -m 775 -d ${INSTALL_PATH}/bin
@echo "Installing bin/* to ${INSTALL_PATH}/bin"
install -b -m 775 ./bin/* ${INSTALL_PATH}/bin
install -m 775 -d ${INSTALL_PATH}/include
@echo "Installing include/* to ${INSTALL_PATH}/include"
cp -r include/* ${INSTALL_PATH}/include
@echo "Installing lib/ApolloSM*.so to ${PYTHON3_INSTALL_PATH}"
cp lib/ApolloSM*.so ${PYTHON3_INSTALL_PATH}



Expand Down
2 changes: 1 addition & 1 deletion include/ApolloSM/ApolloSM.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public:

int GetSerialNumber();
int GetRevNumber();
int GetShelfID();
int GetSlot();
std::string GetShelfID();
uint32_t GetZynqIP();
uint32_t GetIPMCIP();

Expand Down
8 changes: 4 additions & 4 deletions src/ApolloSM/ApolloSM_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ int ApolloSM::GetRevNumber(){
}
return ret;
};
int ApolloSM::GetShelfID(){
int ret = -1; //default value
std::string ApolloSM::GetShelfID(){
std::string ret = ""; //default value
try{
ret = ReadRegister("SLAVE_I2C.S1.SM.INFO.SLOT");
ret = ReadString("SLAVE_I2C.S6.SHELF_ID");
}catch(BUException::BAD_REG_NAME & e2){
//eat this exception and just return -1;
//eat this exception and just return an empty string
}
return ret;
};
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/SM_boot.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define DEFAULT_CONFIG_FILE "/etc/SM_boot"
#define DEFAULT_POLLTIME_IN_SECONDS 10
#define DEFAULT_CONN_FILE "/fw/SM/address_table/connections.xml"
#define DEFAULT_RUN_DIR "/opt/address_table/"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_FILE "/var/run/sm_boot.pid"
#define DEFAULT_POWERUP_TIME 5
#define DEFAULT_SENSORS_THROUGH_ZYNQ false // This means: by default, read the sensors through the zynq
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/heartbeat.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define DEFAULT_CONFIG_FILE "/etc/heartbeat"

#define DEFAULT_POLLTIME_IN_SECONDS 10
#define DEFAULT_RUN_DIR "/opt/address_table/"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_FILE "/var/run/heartbeat.pid"
#define DEFAULT_CONN_FILE "/fw/SM/address_table/connections.xml"

Expand Down
2 changes: 1 addition & 1 deletion src/standalone/i2c_write_monitor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define DEFAULT_POLLTIME_IN_SECONDS 1
#define DEFAULT_TIMEOUT_IN_SECONDS 60
#define DEFAULT_CONN_FILE "/fw/SM/address_table/connections.xml"
#define DEFAULT_RUN_DIR "/opt/address_table/"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_FILE "/var/run/i2c_write_monitor.pid"

// Register name to read for the I2C write check
Expand Down
2 changes: 1 addition & 1 deletion src/standalone/ps_monitor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define DEFAULT_CONFIG_FILE "/etc/ps_monitor"

#define DEFAULT_POLLTIME_IN_SECONDS 10
#define DEFAULT_RUN_DIR "/opt/address_table"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_FILE "/var/run/ps_monitor.pid"
#define DEFAULT_CONN_FILE "/fw/SM/address_table/connections.xml"

Expand Down
2 changes: 1 addition & 1 deletion src/standalone/pwr_monitor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void UpdateINA3221Sensor(ApolloSM * sm,
#define DEFAULT_CONFIG_FILE "/etc/pwr_monitor"

#define DEFAULT_POLLTIME_IN_SECONDS 10
#define DEFAULT_RUN_DIR "/opt/address_table"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_FILE "/var/run/pwr_monitor.pid"
#define DEFAULT_CONN_FILE "/fw/SM/address_table/connections.xml"

Expand Down
2 changes: 1 addition & 1 deletion src/standalone/xvc_server.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// ================================================================================
// Setup for boost program_options
#define DEFAULT_CONFIG_FILE "/etc/xvc_server"
#define DEFAULT_RUN_DIR "/opt/address_table/"
#define DEFAULT_RUN_DIR "/fw/SM/address_table"
#define DEFAULT_PID_DIR "/var/run/"
#define DEFAULT_XVCPREFIX " "
#define DEFAULT_XVCPORT -1
Expand Down

0 comments on commit f800f3e

Please sign in to comment.