Can't see changes to radiodriver.py

Post here to get support
Post Reply
traffens
Beginner
Posts: 21
Joined: Sun Sep 26, 2021 9:01 pm

Can't see changes to radiodriver.py

Post by traffens »

Good afternoon,

I'm trying to edit the radiodriver.py file with a simple command to prove that my changes i'm making are being applied in cfclient.

I'm running this on the most recent bitcraze VM.

crazyflie-lib-python/cflib/crtp/radiodriver.py

Code: Select all

logger.info('v%s dongle with serial %s found', cradio.version,
                        serial)
I'm changing this to:

Code: Select all

logger.info('v%s dongle with serial %s found WITH CHANGE HERE', cradio.version,
                        serial)
Then, I go to crazyflie-lib-python and

Code: Select all

make venv

afterwards I run

Code: Select all

cfclient
and the output i get is

Code: Select all

INFO:cflib.crtp.radiodriver:v0.53 dongle with serial N/A found

but I never see my change in the console. Why is this?! Where am I going wrong? I've been losing my mind over this.
traffens
Beginner
Posts: 21
Joined: Sun Sep 26, 2021 9:01 pm

Re: Can't see changes to radiodriver.py

Post by traffens »

Turns out, this is not the radiodriver file that my path refers to. the actual file was installed by pip. the location of the file for me was:

Code: Select all

 /home/bitcraze/.local/lib/python3.8/site-packages/cflib/crtp/radiodriver.py
*cries violently*
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Can't see changes to radiodriver.py

Post by jonasdn »

You could use:

Code: Select all

pip3 install -e . 
To install your local copy as "editable install" then your edits will take effect at once.
Post Reply