Thomas Buck 1 year ago
parent
commit
4f5f3a3859
3 changed files with 5 additions and 4 deletions
  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 View File

223
     def arc(self, x_off, y_off, w, h, c,
223
     def arc(self, x_off, y_off, w, h, c,
224
                    start_angle, end_angle,
224
                    start_angle, end_angle,
225
                    filled = True,
225
                    filled = True,
226
-                   num_segments = 128):
226
+                   num_segments = 64):
227
         start_segment = int(start_angle / 360 * num_segments)
227
         start_segment = int(start_angle / 360 * num_segments)
228
         end_segment = int(end_angle / 360 * num_segments)
228
         end_segment = int(end_angle / 360 * num_segments)
229
 
229
 
241
             point_list.append(int(x))
241
             point_list.append(int(x))
242
             point_list.append(int(y))
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
     def pie(self, x0, y0, w, c_border, c_circle, v):
246
     def pie(self, x0, y0, w, c_border, c_circle, v):
247
         if v > 0.0:
247
         if v > 0.0:

+ 2
- 1
python-test/poll.py View File

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

+ 1
- 1
python-test/state_select.py View File

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

Loading…
Cancel
Save