This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tinypilot update
Sorry if the question seems obvious for most of the users, but I want to share for beginners like me.

On the website, Sean says that it is possible to make a copy of the pypilot.conf file before an upgrade and to replace the embedded file with the new version to avoid having to enter settings, especially the calibration of the accelerometers.

This is what I did when I upgraded from version 0.24 installed on the equipment I bought from Sean to version 0.32. But I spent hours trying to understand why the modifications of the parameters were not kept when the Tinypilot was stopped. In fact, the file of this new version is different from the old one because of the introduction of new parameters, and the file is not recognized. You should therefore avoid this solution and simply note the parameters to inform the new version.

I suggest a modification of the related information on the site, of course when Sean will get the time to do it, and maybe add a line in the nice Ironman's workbook.

Many thanks again to Sean and others contributors for this wonderful tool.
I have run into the same problem once, not when doing an ungrade, but when saving the config file for reset-to-my-favourite-settings purposes. Not being able to keep setting changes points to the config file not being writable by the pypilot process. This might have been caused by copying the file with root privileges, or by using sudo. How did you copy the file, and did you note the file privileges?

And were your old settings visible in the new 0.32 install?
Hello Ironman. I made the copy of the file using an external SD card reader on the Raspberry Pi3B operating Openplotter, following the instructions given by Sean in the wiki at the address
I had used the graphic interface for the copy but the console to erase the previous file before to paste the saved one. As the there is more lines in the new version I thought it was the reason of the issue but the lines of the previous version are still there and the new lines are added following the old ones, so this is maybe not the cause of the problem.
My knowledge in Linux is very poor, and as you suggest, it is possible that the way I used to replace the file was not the right one. I have no idea of the way to found the file privileges.
On linux, the file rights can be viewed with ls -al; e.g. on openplotter it should say:

pi@openplotter:~/.pypilot $ ls -al pypilot.conf
-rw-r--r--    1 pi       pi            1909 Apr 25 18:02 pypilot.conf

and on tinypilot:

tc@box:~/.pypilot $ ls -al pypilot.conf
-rw-r--r--    1 tc       staff         2424 Mar 14 15:05 pypilot.conf

The way to read this, is that on tinypilot, the user tc has read/write permissions, and the group staff has only read permissions.

I'd recommend to google 'linux file permissions' at this point and you'll be one step further on the long road to linux mastery!
Thanks for your reply Ironman. The road is long for me, and climbing I am afraid!
I roughly understand the idea of the privileges but practically I am unable to manage this question of copy and paste the pypilot.conf file. I will make some trials on a spare SD card to try to improve my knowledge.
be aware that pypilot will overwrite changes if it is running

maybe it could be useful if pypilot detects a user edited the file and it could re-read it?
Hello Sean,
thanks a lot for this information. I just made for trial a small modification on the pypilot.conf file using nano after stopping pypilot with a good result. So it must be the same if I paste the full file text.
if I knew a better expected behavior I could implement it.

For example, editing pypilot.conf while pypilot is running, could trigger a reload of the file. One issue is the actual settings in ram pypilot is using only gets stored to disk (pypilot.conf) every few minute from changes. Another issue would be mangling the file in which case pypilot could reject the changes, and overwrite them with the old settings, but depending on the text editor this could be considered confusing without better warning..

So if you can describe a better behavior than it has currently it would be interesting to make, but I am afraid it could actually create new situations that are more confusing than what is possible now.

Another way to "edit" the config at runtime is with pypilot_client. For example:
pypilot_client servo.max_current=5

you could have several per line, eg:
pypilot_client ap.heading_command=180 ap.enabled=True servo.amp_hours=0

Forum Jump:

Users browsing this thread: 1 Guest(s)