Skip to content

Commit e38983a

Browse files
committed
going for v0.2.1
1 parent 704ed8c commit e38983a

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
venv
33
__pycache__
44
/u_dumbdisplay.iml
5-
/_my_secret.py
6-
/le.py
7-
projects/testing/my.ipynb
85
MicroPythonDumbDisplay.iml
9-
test.ipynb
10-
/test.py
6+
7+
/_my_secret.py
8+
/_test.py
9+
/_dd.py
10+
/_test.ipynb

boot.py

Whitespace-only changes.

dumbdisplay/_ddlayer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ def padding(self, left, top, right, bottom):
5656
self.dd._sendCommand(self.layer_id, "padding", str(left), str(top), str(right), str(bottom))
5757
def noPadding(self):
5858
self.dd._sendCommand(self.layer_id, "padding")
59+
def margin(self, left, top, right, bottom):
60+
'''see border() for size unit'''
61+
self.dd._sendCommand(self.layer_id, "margin", str(left), str(top), str(right), str(bottom))
62+
def noMargin(self):
63+
self.dd._sendCommand(self.layer_id, "margin")
5964
def backgroundColor(self, color):
6065
self.dd._sendCommand(self.layer_id, "bgcolor", _DD_COLOR_ARG(color))
6166
def noBackgroundColor(self):

dumbdisplay/_ddlayer_plotter.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ def __init__(self, dd, width, height, pixels_per_second = 10):
1313
'''
1414
layer_id = dd._createLayer(str("plotterview"), str(width), str(height), str(pixels_per_second))
1515
super().__init__(dd, layer_id)
16-
def label(self, **key_label_pairs):
16+
def label(self, no_key_label = None, **key_label_pairs):
1717
'''set labels of keys; if key has no label, the key will be the label'''
18+
if no_key_label != None:
19+
self.dd._sendCommand(self.layer_id, "label", "", str(no_key_label))
1820
for (key, lab) in key_label_pairs.items():
1921
self.dd._sendCommand(self.layer_id, "label", key, str(lab))
20-
def set(self, **key_value_pairs):
22+
def set(self, no_key_value = None, **key_value_pairs):
2123
'''set values with multiple key value pairs; value should be numeric'''
2224
params = []
25+
if no_key_value != None:
26+
params.append("")
27+
params.append(str(no_key_value))
2328
for (k, v) in key_value_pairs.items():
2429
params.append(k)
2530
params.append(str(v))

main.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)