mcu: Avoid using "async" for variables as it conflicts with Python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
ca2e84abba
commit
f5cdfad333
|
@ -78,7 +78,7 @@ class MCU_TMC_uart_bitbang:
|
||||||
self.tmcuart_send_cmd = self.mcu.lookup_query_command(
|
self.tmcuart_send_cmd = self.mcu.lookup_query_command(
|
||||||
"tmcuart_send oid=%c write=%*s read=%c",
|
"tmcuart_send oid=%c write=%*s read=%c",
|
||||||
"tmcuart_response oid=%c read=%*s", oid=self.oid,
|
"tmcuart_response oid=%c read=%*s", oid=self.oid,
|
||||||
cq=self.cmd_queue, async=True)
|
cq=self.cmd_queue, is_async=True)
|
||||||
def register_instance(self, rx_pin_params, tx_pin_params,
|
def register_instance(self, rx_pin_params, tx_pin_params,
|
||||||
select_pins_desc, addr):
|
select_pins_desc, addr):
|
||||||
if (rx_pin_params['pin'] != self.rx_pin
|
if (rx_pin_params['pin'] != self.rx_pin
|
||||||
|
|
|
@ -337,14 +337,14 @@ class RetryAsyncCommand:
|
||||||
# Wrapper around query commands
|
# Wrapper around query commands
|
||||||
class CommandQueryWrapper:
|
class CommandQueryWrapper:
|
||||||
def __init__(self, serial, msgformat, respformat, oid=None,
|
def __init__(self, serial, msgformat, respformat, oid=None,
|
||||||
cmd_queue=None, async=False):
|
cmd_queue=None, is_async=False):
|
||||||
self._serial = serial
|
self._serial = serial
|
||||||
self._cmd = serial.get_msgparser().lookup_command(msgformat)
|
self._cmd = serial.get_msgparser().lookup_command(msgformat)
|
||||||
serial.get_msgparser().lookup_command(respformat)
|
serial.get_msgparser().lookup_command(respformat)
|
||||||
self._response = respformat.split()[0]
|
self._response = respformat.split()[0]
|
||||||
self._oid = oid
|
self._oid = oid
|
||||||
self._xmit_helper = serialhdl.SerialRetryCommand
|
self._xmit_helper = serialhdl.SerialRetryCommand
|
||||||
if async:
|
if is_async:
|
||||||
self._xmit_helper = RetryAsyncCommand
|
self._xmit_helper = RetryAsyncCommand
|
||||||
if cmd_queue is None:
|
if cmd_queue is None:
|
||||||
cmd_queue = serial.get_default_command_queue()
|
cmd_queue = serial.get_default_command_queue()
|
||||||
|
@ -650,9 +650,9 @@ class MCU:
|
||||||
def lookup_command(self, msgformat, cq=None):
|
def lookup_command(self, msgformat, cq=None):
|
||||||
return CommandWrapper(self._serial, msgformat, cq)
|
return CommandWrapper(self._serial, msgformat, cq)
|
||||||
def lookup_query_command(self, msgformat, respformat, oid=None,
|
def lookup_query_command(self, msgformat, respformat, oid=None,
|
||||||
cq=None, async=False):
|
cq=None, is_async=False):
|
||||||
return CommandQueryWrapper(self._serial, msgformat, respformat, oid,
|
return CommandQueryWrapper(self._serial, msgformat, respformat, oid,
|
||||||
cq, async)
|
cq, is_async)
|
||||||
def try_lookup_command(self, msgformat):
|
def try_lookup_command(self, msgformat):
|
||||||
try:
|
try:
|
||||||
return self.lookup_command(msgformat)
|
return self.lookup_command(msgformat)
|
||||||
|
|
Loading…
Reference in New Issue