meshcore-cli 1.3.15__py3-none-any.whl → 1.3.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ import re
32
32
  from meshcore import MeshCore, EventType, logger
33
33
 
34
34
  # Version
35
- VERSION = "v1.3.15"
35
+ VERSION = "v1.3.16"
36
36
 
37
37
  # default ble address is stored in a config file
38
38
  MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
@@ -2696,7 +2696,7 @@ async def next_cmd(mc, cmds, json_output=False):
2696
2696
 
2697
2697
  case "contact_timeout" :
2698
2698
  argnum = 2
2699
- contact = await get_contact_from_args(mc, cmds[1])
2699
+ contact = await get_contact_from_arg(mc, cmds[1])
2700
2700
  if contact is None:
2701
2701
  if json_output :
2702
2702
  print(json.dumps({"error" : "unknown contact"}))
@@ -3829,6 +3829,13 @@ async def repeater_loop(port, baudrate):
3829
3829
  print(REPEATER_HELP)
3830
3830
  continue
3831
3831
 
3832
+ if cmd.lower() == "clock sync" or cmd.lower() == "st" or cmd.lower() == "sync_time":
3833
+ cur_time = int(time.time())
3834
+ print(f'{ANSI_GREEN}Syncing clock to'
3835
+ f' {datetime.datetime.fromtimestamp(cur_time).strftime("%Y-%m-%d %H:%M:%S")}'
3836
+ f' ({cur_time}){ANSI_END}')
3837
+ cmd = f"time {cur_time}"
3838
+
3832
3839
  # Send command with CR terminator
3833
3840
  ser.write(f"{cmd}\r".encode())
3834
3841
  await asyncio.sleep(0.3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcore-cli
3
- Version: 1.3.15
3
+ Version: 1.3.16
4
4
  Summary: Command line interface to meshcore companion radios
5
5
  Project-URL: Homepage, https://github.com/fdlamotte/meshcore-cli
6
6
  Project-URL: Issues, https://github.com/fdlamotte/meshcore-cli/issues
@@ -0,0 +1,8 @@
1
+ meshcore_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ meshcore_cli/__main__.py,sha256=PfYgibmu2LEtC-OV7L1UgmvV3swJ5rQ4bbXHlwUFlgE,83
3
+ meshcore_cli/meshcore_cli.py,sha256=AjAqHDZ2LCPAaDqtZV7kWN07feXuu3Il7YMPxhS_vkg,172001
4
+ meshcore_cli-1.3.16.dist-info/METADATA,sha256=kRcTR55u3pSOzEaaAs6KwNqtUIZT5VJuVD2MyzIts64,18194
5
+ meshcore_cli-1.3.16.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ meshcore_cli-1.3.16.dist-info/entry_points.txt,sha256=77V29Pyth11GteDk7tneBN3MMk8JI7bTlS-BGSmxCmI,103
7
+ meshcore_cli-1.3.16.dist-info/licenses/LICENSE,sha256=F9s987VtS0AKxW7LdB2EkLMkrdeERI7ICdLJR60A9M4,1066
8
+ meshcore_cli-1.3.16.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- meshcore_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- meshcore_cli/__main__.py,sha256=PfYgibmu2LEtC-OV7L1UgmvV3swJ5rQ4bbXHlwUFlgE,83
3
- meshcore_cli/meshcore_cli.py,sha256=VgOnJFXkFt8Pt3Inx7mfcqWXM5YvRBlTQialBc_RSBY,171639
4
- meshcore_cli-1.3.15.dist-info/METADATA,sha256=Pvi791fQQ54tLnATv4LfluErw5y6ximHcH71cKZzeqE,18194
5
- meshcore_cli-1.3.15.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
- meshcore_cli-1.3.15.dist-info/entry_points.txt,sha256=77V29Pyth11GteDk7tneBN3MMk8JI7bTlS-BGSmxCmI,103
7
- meshcore_cli-1.3.15.dist-info/licenses/LICENSE,sha256=F9s987VtS0AKxW7LdB2EkLMkrdeERI7ICdLJR60A9M4,1066
8
- meshcore_cli-1.3.15.dist-info/RECORD,,