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

Changing minor FW version variable to unsigned #108

Merged
merged 1 commit into from
Dec 15, 2023
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
3 changes: 1 addition & 2 deletions mrfCommon/src/mrfCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ std::ostream& operator<<(std::ostream& strm, const MRFVersion& ver)
strm<<std::hex<<ver.firmware()
<<std::hex<<std::setfill('0')<<std::setw(2)<<ver.revision()
<<'.'
<<((ver.subrelease()<0) ? "-" : "")
<<abs(ver.subrelease());
<<ver.subrelease();
return strm;
}

Expand Down
4 changes: 2 additions & 2 deletions mrfCommon/src/mrfCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ struct SB {
class epicsShareClass MRFVersion
{
const epicsUInt16 m_major;
const epicsInt8 m_minor;
const epicsUInt8 m_minor;
public:

explicit MRFVersion(epicsUInt32 regval)
Expand All @@ -271,7 +271,7 @@ class epicsShareClass MRFVersion

inline unsigned firmware() const { return m_major>>8; }
inline unsigned revision() const { return m_major&0xff; }
inline int subrelease() const { return m_minor; }
inline unsigned subrelease() const { return m_minor; }

int compare(const MRFVersion& o) const;
inline bool operator>(const MRFVersion& o) const { return compare(o)==1; }
Expand Down
Loading