Skip to content

Commit dcfb51d

Browse files
committed
doc: fix documentation indentation
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent ee8fbde commit dcfb51d

File tree

1 file changed

+39
-37
lines changed

1 file changed

+39
-37
lines changed

doc/user_doc/update_the_xbee.rst

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -796,61 +796,63 @@ For this, define the update tasks to perform. An update task includes:
796796
There are two types of update task:
797797

798798
* A ``FwUpdateTask`` defines a firmware update task for a local or remote node.
799-
.. code:: python
800799

801-
from digi.xbee.firmware import FwUpdateTask
800+
.. code:: python
801+
802+
from digi.xbee.firmware import FwUpdateTask
802803
803-
[...]
804+
[...]
804805
805-
XML_FIRMWARE_FILE = "/home/user/my_firmware.xml"
806-
XBEE_FIRMWARE_FILE = "/home/user/my_firmware.gbl"
807-
BOOTLOADER_FIRMWARE_FILE = "/home/user/my_bootloader.gbl"
806+
XML_FIRMWARE_FILE = "/home/user/my_firmware.xml"
807+
XBEE_FIRMWARE_FILE = "/home/user/my_firmware.gbl"
808+
BOOTLOADER_FIRMWARE_FILE = "/home/user/my_bootloader.gbl"
808809
809-
[...]
810+
[...]
810811
811-
# Instantiate an XBee object.
812-
xbee = XBeeDevice(...)
812+
# Instantiate an XBee object.
813+
xbee = XBeeDevice(...)
813814
814-
[...]
815+
[...]
815816
816-
# Define an update progress callback for the firmware update task
817-
def my_fw_update_cb(task_msg, percentage):
818-
print("%s: %%d" %(task_msg, percentage))
817+
# Define an update progress callback for the firmware update task
818+
def my_fw_update_cb(task_msg, percentage):
819+
print("%s: %%d" %(task_msg, percentage))
819820
820-
# Define a firmware update task for the local node
821-
fw_update_task = FwUpdateTask(xbee, XML_FIRMWARE_FILE,
822-
fw_path=XBEE_FIRMWARE_FILE,
823-
bl_fw_path=BOOTLOADER_FIRMWARE_FILE,
824-
progress_cb=my_fw_update_cb)
821+
# Define a firmware update task for the local node
822+
fw_update_task = FwUpdateTask(xbee, XML_FIRMWARE_FILE,
823+
fw_path=XBEE_FIRMWARE_FILE,
824+
bl_fw_path=BOOTLOADER_FIRMWARE_FILE,
825+
progress_cb=my_fw_update_cb)
825826
826-
[...]
827+
[...]
827828
828829
* A ``ProfileUpdateTask`` defines a profile update task for a local or remote
829830
node.
830-
.. code:: python
831831

832-
from digi.xbee.firmware import ProfileUpdateTask
832+
.. code:: python
833833
834-
[...]
834+
from digi.xbee.firmware import ProfileUpdateTask
835835
836-
PROFILE_PATH = "/home/user/my_profile.xpro"
836+
[...]
837837
838-
[...]
838+
PROFILE_PATH = "/home/user/my_profile.xpro"
839839
840-
# Get the remote node.
841-
remote = ...
840+
[...]
842841
843-
[...]
842+
# Get the remote node.
843+
remote = ...
844+
845+
[...]
844846
845-
# Define an update progress callback for the profile update task
846-
def my_profile_update_cb(task_msg, percentage):
847-
print("%s: %%d" %(task_msg, percentage))
847+
# Define an update progress callback for the profile update task
848+
def my_profile_update_cb(task_msg, percentage):
849+
print("%s: %%d" %(task_msg, percentage))
848850
849-
# Define a firmware update task
850-
profile_update_task = ProfileUpdateTask(remote, PROFILE_PATH,
851-
progress_cb=my_profile_update_cb)
851+
# Define a firmware update task
852+
profile_update_task = ProfileUpdateTask(remote, PROFILE_PATH,
853+
progress_cb=my_profile_update_cb)
852854
853-
[...]
855+
[...]
854856
855857
You can define as many update tasks as you need. Then use the ``update_nodes()``
856858
method of the ``XBeeNetwork`` to perform all of them.
@@ -861,9 +863,9 @@ method of the ``XBeeNetwork`` to perform all of them.
861863
| **update_nodes(List)** | Performs the provided update tasks. It blocks until all tasks finish. |
862864
| | |
863865
| | * **task_list (List)**: List of ``FwUpdateTask`` or ``ProfileUpdateTask`` to perform. |
864-
| | The method returns a dictionary with the 64-bit address of the XBee as key and, as |
865-
| | value, a ``Tuple`` with the XBee (``XBeeDevice`` or ``RemoteXBeeDevice``) and an |
866-
| | ``XBeeException`` if the process failed for that node (``None`` if it successes) |
866+
| | The method returns a dictionary with the 64-bit address of the XBee as key and, as |
867+
| | value, a ``Tuple`` with the XBee (``XBeeDevice`` or ``RemoteXBeeDevice``) and an |
868+
| | ``XBeeException`` if the process failed for that node (``None`` if it successes) |
867869
+-------------------------+---------------------------------------------------------------------------------------+
868870

869871
**Update several nodes**

0 commit comments

Comments
 (0)