diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index 50a202fed..e005a087f 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -11223,7 +11223,7 @@ int spi_write(int file_des) { #ifdef VIRTUAL // For the virtual detector copy the data from local_tx to local_rx - for (int i=0; i < n_bytes+1; i++){ + for (int i = 0; i < n_bytes + 1; i++) { local_rx[i] = local_tx[i]; } #else @@ -11250,7 +11250,7 @@ int spi_write(int file_des) { ret = OK; LOG(logDEBUG1, ("SPI Write Complete\n")); Server_SendResult(file_des, INT32, NULL, 0); - sendData(file_des, local_rx+1, n_bytes, OTHER); + sendData(file_des, local_rx + 1, n_bytes, OTHER); free(data); free(local_tx); diff --git a/slsDetectorSoftware/include/sls/Detector.h b/slsDetectorSoftware/include/sls/Detector.h index f78b2fd74..c4d5b670f 100644 --- a/slsDetectorSoftware/include/sls/Detector.h +++ b/slsDetectorSoftware/include/sls/Detector.h @@ -2251,7 +2251,8 @@ class Detector { int n_bytes, Positions pos = {}) const; Result> writeSpi(int chip_id, int register_id, - const std::vector &data, Positions pos = {}); + const std::vector &data, + Positions pos = {}); private: std::vector getValidPortNumbers(uint16_t start_port); diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 619619e09..39706ec56 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -2961,12 +2961,10 @@ Result> Detector::readSpi(int chip_id, int register_id, n_bytes); } -Result> Detector::writeSpi(int chip_id, int register_id, - const std::vector &data, Positions pos){ +Result> +Detector::writeSpi(int chip_id, int register_id, + const std::vector &data, Positions pos) { return pimpl->Parallel(&Module::writeSpi, pos, chip_id, register_id, data); - } - - - +} } // namespace sls diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 4d6b72234..8a97afb89 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -4097,7 +4097,7 @@ std::vector Module::readSpi(int chip_id, int register_id, } std::vector Module::writeSpi(int chip_id, int register_id, - const std::vector &data){ + const std::vector &data) { auto client = DetectorSocket(shm()->hostname, shm()->controlPort); client.Send(F_SPI_WRITE); client.setFnum(F_SPI_WRITE); @@ -4113,7 +4113,8 @@ std::vector Module::writeSpi(int chip_id, int register_id, throw DetectorError(os.str()); } - // Read the output from the SPI write. This contains the data before the write. + // Read the output from the SPI write. This contains the data before the + // write. std::vector ret(data.size()); client.Receive(ret); return ret; diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index ce2a1fd16..9f75f1765 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -610,7 +610,8 @@ class Module : public virtual slsDetectorDefs { std::vector readSpi(int chip_id, int register_id, int n_bytes) const; - std::vector writeSpi(int chip_id, int register_id, const std::vector &data); + std::vector writeSpi(int chip_id, int register_id, + const std::vector &data); private: std::string getReceiverLongVersion() const;