Browse Source

Show PDP instead of number of PDOs

Assuming the power supply follows the Power Rules, it's a lot more
informative to show its PDP than the number of PDOs it advertises.  This
is the first step towards implementing the new design for showing the
Source_Capabilities.
Clara Hobbs 6 years ago
parent
commit
fa36360954
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      README.md
  2. 1
    1
      pd-buddy-gtk.py

+ 1
- 1
README.md View File

@@ -10,7 +10,7 @@ but older versions may work.
10 10
 * GTK+ 3.22
11 11
 * Python 3.6
12 12
 * python-gobject 3.22
13
-* pd-buddy-python 0.3.1
13
+* pd-buddy-python 0.4.0
14 14
 
15 15
 ## Usage
16 16
 

+ 1
- 1
pd-buddy-gtk.py View File

@@ -235,7 +235,7 @@ class Handler:
235 235
             # TODO: do this repeatedly
236 236
             with pdbuddy.Sink(self.serial_port) as pdbs:
237 237
                 caps = pdbs.get_source_cap()
238
-            cap_label.set_text('{} PDOs'.format(len(caps)))
238
+            cap_label.set_text('{:g} W'.format(pdbuddy.calculate_pdp(caps)))
239 239
 
240 240
         # Show the Sink page
241 241
         hst = self.builder.get_object("header-stack")

Loading…
Cancel
Save