Skip to content

Commit ace20ea

Browse files
committed
fix: edit wave
1 parent 6dbfb93 commit ace20ea

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

dglabv3/dglab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ async def _listen(self):
101101
await self._handle_message(message)
102102
except websockets.ConnectionClosed:
103103
logger.debug("WebSocket connection closed")
104-
self.close()
105104
except Exception as e:
106105
logger.error(f"WebSocket error: {e}")
107106
raise ConnectionError("WebSocket error")
@@ -162,6 +161,7 @@ async def _heartbeat(self):
162161

163162
except websockets.ConnectionClosed:
164163
logger.info("WebSocket connection closed")
164+
self.close()
165165
except Exception as e:
166166
logger.error(f"Heartbeat error: {e}")
167167

@@ -206,7 +206,7 @@ async def _send_message(self, message: dict, update: bool = True) -> None:
206206
else:
207207
logger.error("WebSocket not connected")
208208
except websockets.ConnectionClosed:
209-
logger.error("WebSocket connection closed")
209+
logger.debug("WebSocket connection closed")
210210
except Exception as e:
211211
logger.error(f"Error on sending message: {e}")
212212

dglabv3/waves.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def random_pulse(self):
7373
[[10, 10, 10, 10], [0, 0, 0, 0]],
7474
[[10, 10, 10, 10], [100, 100, 100, 100]],
7575
[[0, 0, 0, 0], [0, 0, 0, 0]],
76+
[[0, 0, 0, 0], [0, 0, 0, 0]],
7677
],
7778
"按捏增強": [
7879
[[10, 10, 10, 10], [0, 0, 0, 0]],
@@ -140,14 +141,12 @@ def random_pulse(self):
140141
[[20, 20, 20, 20], [0, 0, 0, 0]],
141142
],
142143
"漸變彈跳": [
143-
[[50, 50, 50, 50], [0, 0, 0, 0]],
144-
[[50, 50, 50, 50], [0, 0, 0, 0]],
145-
[[50, 50, 50, 50], [0, 0, 0, 0]],
146-
[[50, 50, 50, 50], [0, 0, 0, 0]],
147-
[[50, 50, 50, 50], [0, 0, 0, 0]],
148-
[[50, 50, 50, 50], [0, 0, 0, 0]],
149-
[[50, 50, 50, 50], [0, 0, 0, 0]],
150-
[[50, 50, 50, 50], [0, 0, 0, 0]],
144+
[[10, 10, 10, 10], [1, 1, 1, 1]],
145+
[[10, 10, 10, 10], [1, 9, 18, 34]],
146+
[[10, 10, 10, 10], [34, 42, 50, 67]],
147+
[[10, 10, 10, 10], [100, 100, 100, 100]],
148+
[[0, 0, 0, 0], [0, 0, 0, 0]],
149+
[[0, 0, 0, 0], [0, 0, 0, 0]],
151150
],
152151
"波浪": [
153152
[[10, 10, 10, 10], [0, 0, 0, 0]],

0 commit comments

Comments
 (0)