Thomas Buck 1 年之前
父節點
當前提交
4f5f3a3859
共有 3 個檔案被更改,包括 5 行新增4 行删除
  1. 2
    2
      python-test/lcd.py
  2. 2
    1
      python-test/poll.py
  3. 1
    1
      python-test/state_select.py

+ 2
- 2
python-test/lcd.py 查看文件

@@ -223,7 +223,7 @@ class LCD(framebuf.FrameBuffer):
223 223
     def arc(self, x_off, y_off, w, h, c,
224 224
                    start_angle, end_angle,
225 225
                    filled = True,
226
-                   num_segments = 128):
226
+                   num_segments = 64):
227 227
         start_segment = int(start_angle / 360 * num_segments)
228 228
         end_segment = int(end_angle / 360 * num_segments)
229 229
 
@@ -241,7 +241,7 @@ class LCD(framebuf.FrameBuffer):
241 241
             point_list.append(int(x))
242 242
             point_list.append(int(y))
243 243
 
244
-        self.poly(int(x_off), int(y_off), point_list, c, True)
244
+        self.poly(int(x_off), int(y_off), point_list, c, filled)
245 245
 
246 246
     def pie(self, x0, y0, w, c_border, c_circle, v):
247 247
         if v > 0.0:

+ 2
- 1
python-test/poll.py 查看文件

@@ -149,11 +149,12 @@ async def get_state(device):
149 149
     return (heater, pump)
150 150
 
151 151
 async def set_state(device, state):
152
+    heater, pump = state
153
+
152 154
     attempts = 3
153 155
     while attempts > 0:
154 156
         attempts -= 1
155 157
         try:
156
-            heater, pump = state
157 158
             if heater == True:
158 159
                 await characteristicf.write(int(0).to_bytes(1, "little"))
159 160
             elif heater == False:

+ 1
- 1
python-test/state_select.py 查看文件

@@ -41,7 +41,7 @@ class StateSelect:
41 41
         keys = self.lcd.buttons()
42 42
 
43 43
         if keys.once("y"):
44
-            return 5
44
+            return 0
45 45
         elif keys.once("up"):
46 46
             self.current -= 1
47 47
         elif keys.once("down"):

Loading…
取消
儲存