2323from meshcore import MeshCore , EventType , logger
2424
2525# Version
26- VERSION = "v1.1.39 "
26+ VERSION = "v1.1.40 "
2727
2828# default ble address is stored in a config file
2929MCCLI_CONFIG_DIR = str (Path .home ()) + "/.config/meshcore/"
@@ -398,6 +398,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
398398 "telemetry_mode_env" : {"always" : None , "device" :None , "never" :None },
399399 "advert_loc_policy" : {"none" : None , "share" : None },
400400 "auto_update_contacts" : {"on" :None , "off" :None },
401+ "multi_acks" : {"on" : None , "off" :None },
401402 "max_attempts" : None ,
402403 "max_flood_attempts" : None ,
403404 "flood_after" : None ,
@@ -424,6 +425,7 @@ def make_completion_dict(contacts, pending={}, to=None, channels=None):
424425 "telemetry_mode_env" :None ,
425426 "advert_loc_policy" :None ,
426427 "auto_update_contacts" :None ,
428+ "multi_acks" :None ,
427429 "max_attempts" :None ,
428430 "max_flood_attempts" :None ,
429431 "flood_after" :None ,
@@ -1389,6 +1391,13 @@ async def next_cmd(mc, cmds, json_output=False):
13891391 print (f"Error : { res } " )
13901392 else :
13911393 print (f"manual add contact: { mac } " )
1394+ case "multi_acks" :
1395+ ma = (cmds [2 ] == "on" ) or (cmds [2 ] == "true" ) or (cmds [2 ] == "yes" ) or (cmds [2 ] == "1" )
1396+ res = await mc .commands .set_multi_acks (ma )
1397+ if res .type == EventType .ERROR :
1398+ print (f"Error : { res } " )
1399+ else :
1400+ print (f"multi_acks: { ma } " )
13921401 case "auto_update_contacts" :
13931402 auc = (cmds [2 ] == "on" ) or (cmds [2 ] == "true" ) or (cmds [2 ] == "yes" ) or (cmds [2 ] == "1" )
13941403 mc .auto_update_contacts = auc
@@ -1579,6 +1588,12 @@ async def next_cmd(mc, cmds, json_output=False):
15791588 print (json .dumps (res .payload , indent = 4 ))
15801589 else :
15811590 print (f"Using { res .payload ['used_kb' ]} kB of { res .payload ['total_kb' ]} kB" )
1591+ case "multi_acks" :
1592+ await mc .commands .send_appstart ()
1593+ if json_output :
1594+ print (json .dumps ({"multi_acks" : mc .self_info ["multi_acks" ]}))
1595+ else :
1596+ print (f"multi_acks: { mc .self_info ['multi_acks' ]} " )
15821597 case "manual_add_contacts" :
15831598 await mc .commands .send_appstart ()
15841599 if json_output :
0 commit comments