Adjust screen brightness. direction: +1 or -1.
(self, direction)
| 156 | pass |
| 157 | |
| 158 | def _adjust_brightness(self, direction): |
| 159 | """Adjust screen brightness. direction: +1 or -1.""" |
| 160 | cur = self.gfx.get_brightness() |
| 161 | max_br = self.gfx.get_max_brightness() |
| 162 | new = max(1, min(max_br, cur + direction)) |
| 163 | if new != cur: |
| 164 | self.gfx.set_brightness(new) |
| 165 | |
| 166 | def _wait_button(self): |
| 167 | """Wait for a button press using thread-safe event queue. |
no test coverage detected