Skip to content

Commit

Permalink
little fixes from dq3xx branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bri3d committed Jun 24, 2022
1 parent 64a1632 commit 2cd9a2a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/connections/ble_isotp_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def setup(self):
await self.set_device_value(0x1, stmin)

if self.dq3xx_hack:
await self.set_device_value(0x9, self.dq3xx_hack)
await self.set_device_value(0x9, int(self.dq3xx_hack).to_bytes(2, "little"))

with self.connection_open_lock:
self.connection_open_lock.notifyAll()
Expand Down
4 changes: 2 additions & 2 deletions lib/connections/connection_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def connection_setup(
txid=txid,
interface_name=interface_name,
device_address=device_address,
tx_stmin=st_min / 1000,
tx_stmin=int(st_min / 1000),
dq3xx_hack=dq3xx_hack,
)
elif interface.startswith("USBISOTP"):
Expand All @@ -86,7 +86,7 @@ def connection_setup(
interface_name=device_address,
rxid=rxid,
txid=txid,
tx_stmin=st_min / 1000,
tx_stmin=int(st_min / 1000),
dq3xx_hack=dq3xx_hack,
)
else:
Expand Down
2 changes: 1 addition & 1 deletion lib/connections/usb_isotp_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def setup(self):
stmin = self.tx_stmin.to_bytes(2, "little")
self.set_device_value(0x1, stmin)
if self.dq3xx_hack:
self.set_device_value(0x9, self.dq3xx_hack)
self.set_device_value(0x9, int(self.dq3xx_hack).to_bytes(2, "little"))

def disconnect(self):
self.logger.info("Exit requested from USB-ISOTP")
Expand Down
2 changes: 1 addition & 1 deletion lib/dq381_flash_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,6 @@ def flash_bin(
interface=interface,
interface_path=interface_path,
workshop_code=workshop_code.as_bytes(),
stmin_override=300000,
stmin_override=900000,
dq3xx_hack=True,
)
2 changes: 2 additions & 0 deletions lib/flash_uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ def send_obd(data):
rxid=flash_info.control_module_identifier.rxid,
txid=flash_info.control_module_identifier.txid,
interface_path=interface_path,
st_min=stmin_override,
dq3xx_hack=dq3xx_hack,
)

with Client(
Expand Down

0 comments on commit 2cd9a2a

Please sign in to comment.