(self, c, t=0)
| 179 | return np.array(image) |
| 180 | |
| 181 | def press(self, c, t=0): |
| 182 | if c not in "3r": |
| 183 | log.debug(f"按下按钮 {c},等待 {t} 秒后释放") |
| 184 | if c=='e' and self.allow_e==0: |
| 185 | return |
| 186 | if self.slow and c=='shift': |
| 187 | return |
| 188 | if self._stop == 0: |
| 189 | keyops.keyDown(c) |
| 190 | else: |
| 191 | raise ValueError("正在退出") |
| 192 | time.sleep(t) |
| 193 | keyops.keyUp(c) |
| 194 | |
| 195 | def sprint(self): |
| 196 | if config.long_press_sprint: |
no test coverage detected