Skip to content

Commit

Permalink
Merge pull request #145 from openxc/c5_Cellular_modem_configuration
Browse files Browse the repository at this point in the history
Change arguments to correctly seen command for modem_configuration.
  • Loading branch information
jstoke53 committed Mar 24, 2020
2 parents 4ff2ca4 + d0928b8 commit 533d8a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions openxc/controllers/usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def _send_complex_request(self, request):
"""Send a request via the USB control request endpoint, rather than as a
bulk transfer.
"""
# LOG.warn("DEBUG STUFF ________________ " + str(self.streamer.serialize_for_stream(request)))
self.device.ctrl_transfer(0x40, self.COMPLEX_CONTROL_COMMAND, 0, 0,
self.streamer.serialize_for_stream(request))

Expand Down
6 changes: 4 additions & 2 deletions openxc/tools/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def parse_options():
dest="unix_time")
parser.add_argument("--host", action="store", default=None,
dest="host")
parser.add_argument("--network-host", action="store", default=None,
dest="network_host")
parser.add_argument("--port", action="store", default=80,
dest="port")
parser.set_defaults(format="json")
Expand All @@ -143,8 +145,8 @@ def handle_set_command(arguments, interface):
set_payload_format(interface, arguments.new_payload_format)
if arguments.unix_time is not None:
set_rtc_time(interface, int(arguments.unix_time))
if arguments.host is not None:
modem_configuration(interface, arguments.host, arguments.port)
if arguments.network_host is not None:
modem_configuration(interface, arguments.network_host, arguments.port)

def handle_write_command(arguments, interface):
if arguments.write_name:
Expand Down

0 comments on commit 533d8a2

Please sign in to comment.