Skip to content

Commit a89828b

Browse files
committed
Merge remote-tracking branch 'origin/next' into protobufStreamFix
2 parents 079c580 + 533d8a2 commit a89828b

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

openxc/controllers/usb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def _send_complex_request(self, request):
3333
"""Send a request via the USB control request endpoint, rather than as a
3434
bulk transfer.
3535
"""
36+
# LOG.warn("DEBUG STUFF ________________ " + str(self.streamer.serialize_for_stream(request)))
3637
self.device.ctrl_transfer(0x40, self.COMPLEX_CONTROL_COMMAND, 0, 0,
3738
self.streamer.serialize_for_stream(request))
3839

openxc/tools/control.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ def parse_options():
129129
dest="unix_time")
130130
parser.add_argument("--host", action="store", default=None,
131131
dest="host")
132+
parser.add_argument("--network-host", action="store", default=None,
133+
dest="network_host")
132134
parser.add_argument("--port", action="store", default=80,
133135
dest="port")
134136
parser.set_defaults(format="json")
@@ -143,8 +145,8 @@ def handle_set_command(arguments, interface):
143145
set_payload_format(interface, arguments.new_payload_format)
144146
if arguments.unix_time is not None:
145147
set_rtc_time(interface, int(arguments.unix_time))
146-
if arguments.host is not None:
147-
modem_configuration(interface, arguments.host, arguments.port)
148+
if arguments.network_host is not None:
149+
modem_configuration(interface, arguments.network_host, arguments.port)
148150

149151
def handle_write_command(arguments, interface):
150152
if arguments.write_name:

openxc/tools/dump.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
from openxc.formats.json import JsonFormatter
1414
from .common import device_options, configure_logging, select_device
1515

16+
import functools
17+
print = functools.partial(print, flush=True)
18+
1619
def receive(message, **kwargs):
1720
message['timestamp'] = time.time()
1821
print((JsonFormatter.serialize(message)))

openxc/tools/obd2scanner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
from .common import device_options, configure_logging, select_device
1313
import json
1414

15+
import functools
16+
print = functools.partial(print, flush=True)
17+
1518
def scan(controller, bus=None):
1619

1720
# TODO could read the response from the "PIDs supported" requests to see
@@ -28,7 +31,6 @@ def scan(controller, bus=None):
2831

2932
if (no_response == True):
3033
print("PID 0x%x did not respond" % pid)
31-
sys.stdout.flush()
3234

3335
def parse_options():
3436
parser = argparse.ArgumentParser(description="Send requests for all "

openxc/tools/scanner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
from .common import device_options, configure_logging, select_device
1414

15+
import functools
16+
print = functools.partial(print, flush=True)
17+
1518
TESTER_PRESENT_MODE = 0x3e
1619
TESTER_PRESENT_PAYLOAD = bytearray([0])
1720

0 commit comments

Comments
 (0)