Skip to content

Commit 0638714

Browse files
committed
profile: ensure 'AP' parameter is written and applied when a profile is applied
If only the 'AP' parameter is restored after a profile update, its value was not written nor applied. This commit ensures this does not happen. Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent fa0542e commit 0638714

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

digi/xbee/profile.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,14 +1395,7 @@ def restore_after_update(self, net_changed, protocol_changed_by_settings, port_s
13951395
and (ap_val[0] in (OperatingMode.API_MODE.code,
13961396
OperatingMode.ESCAPED_API_MODE.code)))
13971397
if restore_ap:
1398-
cmd = ATStringCommand.AP
1399-
try:
1400-
self._configurer.exec_at_cmd(
1401-
XBeeDevice.set_parameter, self._xbee, cmd, value=ap_val,
1402-
retries=_PARAM_WRITE_RETRIES, apply=False)
1403-
except XBeeException as exc:
1404-
_log.info("'%s' - %s: Unable to restore operating mode (%s)",
1405-
self._xbee, self._configurer.TASK_RESTORE, str(exc))
1398+
self._configurer.cmd_dict.get(self._xbee, {}).update({ATStringCommand.AP: ap_val})
14061399

14071400
self._configurer.progress_cb(self._configurer.TASK_RESTORE)
14081401

0 commit comments

Comments
 (0)