Skip to content

Commit fef6bac

Browse files
committed
Fix clock value mismatch in cli utils
1 parent a9afde2 commit fef6bac

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/CommandLineUtilities/ProgramStatus.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ProgramStatus: public Program
7575

7676
table << lineFat << header << lineThin;
7777

78-
std::string clock = (reportInfo.ttcClock ? "TTC" : "Local");;
78+
std::string clock = (reportInfo.ttcClock == 0 ? "TTC" : "Local");;
7979
std::cout << "------------" << std::endl;
8080
std::cout << clock << " clock" << std::endl;
8181
std::cout << "------------" << std::endl;

src/Cru/CruBar.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ Cru::ReportInfo CruBar::report()
420420
}
421421

422422
Ttc ttc = Ttc(mPdaBar);
423-
uint32_t clock = ttc.getPllClock();
423+
// Mismatch between values returned by getPllClock and value required to set the clock
424+
// getPllClock: 0 for Local clock, 1 for TTC clock
425+
// setClock: 2 for Local clock, 0 for TTC clock
426+
uint32_t clock = (ttc.getPllClock() == 0 ? Clock::Local : Clock::Ttc);
424427
uint32_t downstreamData = ttc.getDownstreamData();
425428

426429
Cru::ReportInfo reportInfo = {

0 commit comments

Comments
 (0)