Skip to content

Commit e07b9e1

Browse files
committed
[mft-psu] Drop leading 0 from const ints and fix initializations
1 parent 97755ed commit e07b9e1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

include/Alf/ScaMftPsu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ class ScaMftPsu
127127
void waitOnBusyClear();
128128

129129
/// Interface for BAR 2
130-
std::shared_ptr<roc::BarInterface> mBar2;
131130
AlfLink mLink;
131+
std::shared_ptr<roc::BarInterface> mBar2;
132132
std::unique_ptr<LlaSession> mLlaSession;
133133

134134
static constexpr int DEFAULT_SCA_WAIT_TIME_MS = 3;

src/AlfServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class AlfServer
8080
std::map<roc::SerialId, std::map<int, std::vector<std::unique_ptr<StringRpcServer>>>, serialIdComparator> mRpcServers;
8181
std::map<roc::SerialId, std::shared_ptr<lla::Session>, serialIdComparator> mSessions;
8282

83-
const std::unordered_set<int> kMftPsuSerials = { 0000, 0553 };
83+
const std::unordered_set<int> kMftPsuSerials = { 0, 553 };
8484
};
8585

8686
} // namespace alf

src/ScaMftPsu.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ namespace alf
3939
{
4040

4141
ScaMftPsu::ScaMftPsu(AlfLink link, std::shared_ptr<lla::Session> llaSession)
42-
: mLink(link)
42+
: mLink(link), mBar2(mLink.bar)
4343
{
4444
Logger::setFacility("ALF/SCA_MFT_PSU");
4545
mLlaSession = std::make_unique<LlaSession>(llaSession);
46+
mLink.rawLinkId = mLink.serialId.getEndpoint() * kCruNumLinks + mLink.linkId;
4647
}
4748

4849
void ScaMftPsu::scReset()

0 commit comments

Comments
 (0)