Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/monsoon.py

Issue 1013943002: Add SetStartupCurrent to monsoon profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/profiler/monsoon.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/monsoon.py b/tools/telemetry/telemetry/core/platform/profiler/monsoon.py
index 0c144e7ee3cd8186e8e20f44642700afd8ce7835..56bf94fd9ad311dab51be7dabc06ca372b687673 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/monsoon.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/monsoon.py
@@ -156,6 +156,13 @@ class Monsoon(object):
else:
self._SendStruct('BBB', 0x01, 0x01, int((v - 2.0) * 100))
+ def SetStartupCurrent(self, i):
+ """Set the max startup output current."""
tonyg 2015/03/17 13:58:28 It'd be nice if this explain the units of |i| -- m
JungJik 2015/03/18 10:21:28 Done.
+ assert i >= 0 and i <= 8
+
+ val = 1023 - int((i/8)*1023)
tonyg 2015/03/17 13:58:28 I don't think this does what you want.
JungJik 2015/03/18 10:21:28 PTAL again. it looks like confusing |i| as integer
+ self._SendStruct('BBB', 0x01, 0x08, val & 0xff)
+ self._SendStruct('BBB', 0x01, 0x09, val >> 8)
def SetMaxCurrent(self, i):
"""Set the max output current."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698