Skip to content

Commit 38e61c5

Browse files
committed
fix spoofed values
1 parent 92396e4 commit 38e61c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

IntelPresentMon/ControlLib/IntelPowerTelemetryAdapter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// SPDX-License-Identifier: MIT
33
#include "IntelPowerTelemetryAdapter.h"
44
#include "Logging.h"
5+
#include "../CommonUtilities/Math.h"
56

67
namespace pwr::intel
78
{
@@ -481,12 +482,14 @@ namespace pwr::intel
481482

482483
// bandwidth telemetry has 2 possible paths for aquisition
483484
if constexpr (std::same_as<T, ctl_power_telemetry2_t>) {
485+
using namespace pmon::util;
484486
// fake spoofing for test purposes
485487
ctl_oc_telemetry_item_t spoofItem{
486488
.bSupported = true,
487489
.units = ctl_units_t::CTL_UNITS_MEM_SPEED_GBPS,
488490
.type = ctl_data_type_t::CTL_DATA_TYPE_DOUBLE,
489-
.value{ .datadouble = 44.777 },
491+
.value{ .datadouble = ConvertMagnitudePrefix(44.777,
492+
MagnitudePrefix::Gibi, MagnitudePrefix::Base) },
490493
};
491494
// end fake spoof
492495

0 commit comments

Comments
 (0)