firmware+controller: Add game start and over states

This commit is contained in:
2024-12-15 15:36:52 +00:00
parent d9c063cba7
commit 1caf43c6de
6 changed files with 121 additions and 3 deletions

View File

@@ -23,6 +23,9 @@ def main():
h.match_found(RiotPlayerInfo.dummy(valorant=ValorantPlayerInfo()))
h.pregame(RiotPlayerInfo.dummy(valorant=ValorantPlayerInfo()))
h.game_generic(RiotPlayerInfo.dummy(valorant=ValorantPlayerInfo(queue_type='ggteam')))
h.game_start(None)
h.game_over(None, False)
h.game_over(None, True)
h.service()
finally:

View File

@@ -337,6 +337,12 @@ class HIDValconomyHandler(ValconomyHandler):
self._enq(6, gm, fmt='B')
def game_start(self, info: RiotPlayerInfo):
self._enq(7)
def game_over(self, info: RiotPlayerInfo, won: bool):
self._enq(8, 1 if won else 0, fmt='B')
class GameState(Enum):
NONE = 0
MENU = 1