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.""" |