Skip to content

Commit

Permalink
Adjusted telemetry to FPGA changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkubanek committed Sep 6, 2024
1 parent 5168ddd commit 8c19684
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
2 changes: 1 addition & 1 deletion doc/version-history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version History

v1.12.0
-------
* simplified MPU commonication
* simplified MPU communication

v1.11.1
-------
Expand Down
35 changes: 3 additions & 32 deletions include/cRIO/MPUTelemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,11 @@ class MPUTelemetry {
* @param data[45] data as received from FPGA
*/
MPUTelemetry(uint8_t* data);
uint32_t writeBytes; /// Number of bytes written
uint32_t readBytes; /// Number of bytes read
uint16_t readTimedout; /// read timedout counter
uint32_t writeBytes; /// Number of bytes written
uint32_t readBytes; /// Number of bytes read
bool readTimedout; /// read timedout counter

friend std::ostream& operator<<(std::ostream& os, const MPUTelemetry& tel);

/**
* Updates MPU telemetry SAL message structure.
*
* @tparam message class with telemetry filed. Shall be SAL declared class
* @param msg message to check and update
*
* @return true if message shall be send, false if updates are minor and it should not be send
*/
template <class message>
bool sendUpdates(message* msg) {
return false;

/**
if (msg->readBytes != readBytes || msg->writeTimedout != writeTimedout ||
msg->instructionPointerOnError != instructionPointerOnError || msg->errorCode != errorCode) {
send = true;
}
msg->instructionPointer = instructionPointer;
msg->outputCounter = outputCounter;
msg->inputCounter = inputCounter;
msg->outputTimeouts = outputTimeouts;
msg->inputTimeouts = inputTimeouts;
msg->instructionPointerOnError = instructionPointerOnError;
msg->writeTimeout = writeTimeout;
msg->readTimeout = readTimeout;
msg->errorCode = errorCode;
return send; */
}
};

} // namespace cRIO
Expand Down
2 changes: 1 addition & 1 deletion src/LSST/cRIO/MPUTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ MPUTelemetry::MPUTelemetry(uint8_t *data) {
std::ostream &operator<<(std::ostream &os, const MPUTelemetry &tel) {
os << std::setw(20) << "Write bytes: " << tel.writeBytes << std::endl
<< std::setw(20) << "Read bytes: " << tel.readBytes << std::endl
<< std::setw(20) << "Read timedout: " << tel.readTimedout << std::endl;
<< std::setw(20) << "Read timedout: " << (tel.readTimedout ? "yes" : "no") << std::endl;
return os;
}

Expand Down

0 comments on commit 8c19684

Please sign in to comment.