firmware+controller: Queue start state

This commit is contained in:
2024-12-14 16:26:34 +00:00
parent 4d1074e60c
commit 18831c3e0e
6 changed files with 107 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
import logging
import valconomy
from valconomy import ValorantPlayerInfo, RiotPlayerInfo
def main():
logging.basicConfig(
@@ -11,8 +12,12 @@ def main():
try:
h.menu(None, False)
h.none()
h.queue_start(RiotPlayerInfo.dummy(
valorant=ValorantPlayerInfo()))
h.menu(None, True)
h.idle(None)
h.queue_start(RiotPlayerInfo.dummy(
valorant=ValorantPlayerInfo(queue_type='unrated', is_party_owner=True)))
h.service()
finally:

View File

@@ -48,6 +48,10 @@ class RiotPlayerInfo:
valorant: ValorantPlayerInfo = None
@classmethod
def dummy(cls, **kwargs):
return cls('00000000-0000-0000-0000-000000000000', 'Player', 'gamer', 'dnd', **kwargs)
def full_name(self) -> str:
return f'{self.name}#{self.tag}'
@@ -305,6 +309,10 @@ class HIDValconomyHandler(ValconomyHandler):
def idle(self, info: RiotPlayerInfo):
self._enq(2)
def queue_start(self, info: RiotPlayerInfo):
ms_not_comp = info.valorant.is_party_owner and info.valorant.queue_type == 'unrated'
self._enq(3, 1 if ms_not_comp else 0, fmt='B')
class GameState(Enum):
NONE = 0
MENU = 1