From 9acbea28077030a7fb71187201f6fabb97631725 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 14:17:08 +0100 Subject: [PATCH 1/7] Changed to correct input variable. --- docs/user-guides/sbs_connect_log_param.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index a708744bc..da997cf32 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -198,7 +198,7 @@ Here you will add the logs variables you would like to read out. If you are unsu Use the same connect_log_param.py script, and add the following function above `simple_connect()` and underneath URI: ```python -def simple_log(scf, logconf): +def simple_log(scf, lg_stab): ``` Notice that now you will need to include the SyncCrazyflie instance (`scf`) and the logging configuration. From 817ce90a6202adedc4f29c12acf15c603b1e8358 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 14:59:38 +0100 Subject: [PATCH 2/7] Updated input variables --- docs/user-guides/sbs_connect_log_param.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index da997cf32..a6b09e462 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -198,14 +198,14 @@ Here you will add the logs variables you would like to read out. If you are unsu Use the same connect_log_param.py script, and add the following function above `simple_connect()` and underneath URI: ```python -def simple_log(scf, lg_stab): +def simple_log(scf, logconf): ``` Notice that now you will need to include the SyncCrazyflie instance (`scf`) and the logging configuration. Now the logging instances will be inserted by adding the following after you configured the lg_stab: ```python - with SyncLogger(scf, lg_stab) as logger: + with SyncLogger(scf, logconf) as logger: for log_entry in logger: From 44f58ef2284ba54e2d3dac7493b99f25bd0712e5 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 15:20:59 +0100 Subject: [PATCH 3/7] Fixed typo --- docs/user-guides/sbs_connect_log_param.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index a6b09e462..a438f97c2 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -221,7 +221,7 @@ Now the logging instances will be inserted by adding the following after you con ### Test the script: -First change the `simple_connect()` in _main_ in `simple_log(scf, lg_stab)`. Now run the script (`python3 connect_log_param.py`) like before. +First change the `simple_connect()` in _main_ to `simple_log(scf, lg_stab)`. Now run the script (`python3 connect_log_param.py`) like before. If everything is fine it should continuously print the logging variables, like this: From d76171c298760d9bfe5e7b369f9d1cb88cea2ce7 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 15:32:52 +0100 Subject: [PATCH 4/7] Fixed typo --- docs/user-guides/sbs_connect_log_param.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index a438f97c2..940853b58 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -296,7 +296,7 @@ def simple_log_async(scf, logconf): cf.log.add_config(logconf) ``` -Here you add the logging configuration to to the logging framework of the Crazyflie. It will check if the log configuration is part of the TOC, which is a list of all the logging variables defined in the Crazyflie. You can test this out by changing one of the `lg_stab` variables to a completely bogus name like `'not.real'`. In this case you would receive the following message: +Here you add the logging configuration to the logging framework of the Crazyflie. It will check if the log configuration is part of the TOC, which is a list of all the logging variables defined in the Crazyflie. You can test this out by changing one of the `lg_stab` variables to a completely bogus name like `'not.real'`. In this case you would receive the following message: `KeyError: 'Variable not.real not in TOC'` From 6e364504ca1e4317e93fd4c7e9d7538beec74d71 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 15:34:37 +0100 Subject: [PATCH 5/7] Fixed typo --- docs/user-guides/sbs_connect_log_param.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index 940853b58..bd17f3657 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -308,7 +308,7 @@ def log_stab_callback(timestamp, data, logconf): print('[%d][%s]: %s' % (timestamp, logconf.name, data)) ``` -This callback will be called once the log variables have received it and prints the contents. The callback function added to the logging framework by adding it to the log config in `simple_log_async(..)`: +This callback will be called once the log variables have received it and prints the contents. The callback function is added to the logging framework by adding it to the log config in `simple_log_async(..)`: ```python logconf.data_received_cb.add_callback(log_stab_callback) From f2dd11301c9828d6c689a84ee2116daca3941489 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Mon, 19 Jan 2026 15:44:46 +0100 Subject: [PATCH 6/7] Updated asynchronous example to be more clear --- docs/user-guides/sbs_connect_log_param.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/user-guides/sbs_connect_log_param.md b/docs/user-guides/sbs_connect_log_param.md index bd17f3657..71869feb2 100644 --- a/docs/user-guides/sbs_connect_log_param.md +++ b/docs/user-guides/sbs_connect_log_param.md @@ -317,11 +317,13 @@ This callback will be called once the log variables have received it and prints Then the log configuration would need to be started manually, and then stopped after a few seconds: ```python - logconf.start() + lg_stab.start() time.sleep(5) - logconf.stop() + lg_stab.stop() ``` +Instead of ```time.sleep(5)```, you have the possibility to interact with the Crazyflie in other ways, meaning you now have an asynchronous logging setup. + ## Run the script Make sure to replace the `simple_log(...)` to `simple_log_async(...)` in the `__main__` function. Run the script with `python3 connect_log_param.py` in a terminal and you should see several messages of the following: @@ -354,9 +356,6 @@ def simple_log_async(scf, logconf): cf = scf.cf cf.log.add_config(logconf) logconf.data_received_cb.add_callback(log_stab_callback) - logconf.start() - time.sleep(5) - logconf.stop() (...) @@ -372,6 +371,10 @@ if __name__ == '__main__': with SyncCrazyflie(uri, cf=Crazyflie(rw_cache='./cache')) as scf: simple_log_async(scf, lg_stab) + + lg_stab.start() + time.sleep(5) # Your possibility to interact with the Crazyflie + lg_stab.stop() ``` ## Step 3. Parameters From f117ab50308d3b9a9aea524cf42d148c77026403 Mon Sep 17 00:00:00 2001 From: Stefan Thorstenson Date: Wed, 21 Jan 2026 10:41:50 +0100 Subject: [PATCH 7/7] Typos --- docs/user-guides/sbs_motion_commander.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guides/sbs_motion_commander.md b/docs/user-guides/sbs_motion_commander.md index 303f49536..3486854ad 100644 --- a/docs/user-guides/sbs_motion_commander.md +++ b/docs/user-guides/sbs_motion_commander.md @@ -15,7 +15,7 @@ We will assume that you already know this before you start with the tutorial: ## Get the script started -Since you should have installed cflib in the previous step by step tutorial, you are all ready to got now. Open up an new python script called `motion_flying.py`. First you will start by adding the following import to the script: +Since you should have installed cflib in the previous step by step tutorial, you are all ready to go now. Open up an new python script called `motion_flying.py`. First you will start by adding the following import to the script: ```python import logging @@ -46,7 +46,7 @@ This probably all looks pretty familiar, except for one thing line, namely: `from cflib.positioning.motion_commander import MotionCommander` -This imports the motion commander, which is pretty much a wrapper around the position setpoint frame work of the crazyflie. You probably have unknowingly experienced this a when trying out the assist modes in this [tutorial with the flow deck in the cfclient](https://www.bitcraze.io/documentation/tutorials/getting-started-with-flow-deck/) +This imports the motion commander, which is pretty much a wrapper around the position setpoint frame work of the crazyflie. You probably have unknowingly experienced this when trying out the assist modes in this [tutorial with the flow deck in the cfclient](https://www.bitcraze.io/documentation/tutorials/getting-started-with-flow-deck/) ## Step 1: Security before flying