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
Getting wind data into Pypilot
#37
I reported a few issues with 0.35. In the meantime, you might have a look at this. It's not entirely a positive flow yet, but it might give you some hints as how to move on. Your build issues I cannot replicate; I suggest downloading a clean image and take it from there, somewhere along these lines.

Code:
pi@openplotter:~ $ wget https://pypilot.org/download.php?Down=images/tinypilot_2021_11_16.img.xz -O tinypilot_2021_11_16.img.xz
pi@openplotter:~ $ xzcat tinypilot_2021_11_16.img.xz | sudo dd of=/dev/sda bs=4M

Started up, went to configuration -> wifi, switched to client mode, ssid=openplotter, fixed ip address 10.10.10.3

tc@10.10.10.3's password:
tinypilot is a Sailboat Autopilot Distribution for raspberry pi

  ( '>')
 /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\)           www.tinycorelinux.net

tc@pypilot:~$ which pypilot
/usr/local/bin/pypilot

tc@pypilot:~$ cat /usr/local/bin/pypilot
__requires__ = 'pypilot==0.32'

#lets upgrade pypilot. Openplotter on raspberry 3b+ is connected to internet through ethernet cable; by default it forwards IP traffic. Only thing to do is add gateway to tinypilot client:

tc@pypilot:~$ sudo route add default gw 10.10.10.1

tc@pypilot:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=116 time=16.810 ms

tc@pypilot:~$ nslookup github.com
Server:    8.8.8.8
Address 1: 8.8.8.8 dns.google

Name:      github.com
Address 1: 140.82.121.3 lb-140-82-121-3-fra.github.com

# Alas, this did not work. When I did a git clone from the tinypilot, it gave a timeout. Too bad. Other scenario is to clone from openplotter:

pi@openplotter:~ $ mkdir x
pi@openplotter:~ $ cd x

pi@openplotter:~/x $ git clone https://github.com/pypilot/pypilot
Cloning into 'pypilot'...
remote: Enumerating objects: 11621, done.
remote: Counting objects: 100% (819/819), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 11621 (delta 750), reused 762 (delta 721), pack-reused 10802
Receiving objects: 100% (11621/11621), 3.32 MiB | 2.18 MiB/s, done.
Resolving deltas: 100% (8042/8042), done.

pi@openplotter:~/x $ git clone --depth 1 https://github.com/pypilot/pypilot_data
Cloning into 'pypilot_data'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 16 (delta 0), reused 13 (delta 0), pack-reused 0
Receiving objects: 100% (16/16), 479.01 KiB | 2.43 MiB/s, done.

pi@openplotter:~/x $ cp -rv pypilot_data/* pypilot
'pypilot_data/arduino/weathersensors/font.ttf' -> 'pypilot/arduino/weathersensors/font.ttf'
'pypilot_data/hat/font.ttf' -> 'pypilot/hat/font.ttf'
'pypilot_data/README.md' -> 'pypilot/README.md'
'pypilot_data/ui/Vagabond.mtl' -> 'pypilot/ui/Vagabond.mtl'
'pypilot_data/ui/Vagabond.obj' -> 'pypilot/ui/Vagabond.obj'
'pypilot_data/ui/compass.png' -> 'pypilot/ui/compass.png'
'pypilot_data/web/static/font/Roboto-Regular.ttf' -> 'pypilot/web/static/font/Roboto-Regular.ttf'

# Mind the wildcard * here: this had to be added.
pi@openplotter:~/x $ scp -r pypilot/* tc@10.10.10.3:~/pypilot-update/
Password: pypilot

# Back to the tinypilot:

tc@pypilot:~/pypilot-update$ . pypilot.build

[Much output, ending in this:]
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on pypilot.tcz, block size 131072.
[============================================================================================================================================================================================================================/] 201/201 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
       compressed data, compressed metadata, compressed fragments, no xattrs
       duplicates are removed
Filesystem size 821.66 Kbytes (0.80 Mbytes)
       30.52% of uncompressed filesystem size (2692.28 Kbytes)
Inode table size 2189 bytes (2.14 Kbytes)
       29.12% of uncompressed inode table size (7518 bytes)
Directory table size 2353 bytes (2.30 Kbytes)
       39.47% of uncompressed directory table size (5961 bytes)
Number of duplicate files found 11
Number of inodes 234
Number of files 204
Number of fragments 15
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 30
Number of ids (unique uids + gids) 2
Number of uids 1
       tc (1001)
Number of gids 1
       staff (50)
old: /mnt/mmcblk0p2/tce/optional/pypilot.tcz
-rw-rw-r--    1 tc       staff       704512 Nov  4  2021 /mnt/mmcblk0p2/tce/optional/pypilot.tcz
new: pypilot.tcz
-rw-r--r--    1 tc       staff       843776 Nov  4 11:38 pypilot.tcz

tc@pypilot:~/pypilot-update$ sudo reboot

Using username "tc".
tc@10.10.10.3's password:
tinypilot is a Sailboat Autopilot Distribution for raspberry pi

  ( '>')
 /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\)           www.tinycorelinux.net

tc@pypilot:~$ cat /usr/local/bin/pypilot
__requires__ = 'pypilot==0.35'

# Yeay we're on 0.35. Lets open the bonnet before going for a drive:

tc@pypilot:~$ sudo sv stop pypilot
ok: down: pypilot: 1s

tc@pypilot:~$ pypilot
autopilot start 233.073544
falling back to python nonblocking socket, will consume more cpu cannot import name 'linebuffer'
pypilot failed to import required modules.  Did you forget to run sudo python3 setup.py install?

# Hmm. The next lines took a few hours to figure out. I copy some files from 0.32 to 0.35:

cd
cp pypilot/pypilot/linebuffer/linebuffer.py pypilot-update/pypilot/linebuffer/
cp pypilot/pypilot/linebuffer/linebuffer_wrap.cpp  pypilot-update/pypilot/linebuffer/
cp pypilot/pypilot/arduino_servo/arduino_servo.py pypilot-update/pypilot/arduino_servo/
cp pypilot/pypilot/arduino_servo/arduino_servo_wrap.cpp pypilot-update/pypilot/arduino_servo/
cd pypilot-update
. pypilot.build
sudo reboot

However, still some errors...
Reply


Messages In This Thread
Getting wind data into Pypilot - by kniven - 2022-08-12, 07:53 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-15, 02:52 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-13, 10:40 AM
RE: Getting wind data into Pypilot - by ironman - 2022-08-15, 04:38 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-15, 07:42 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-15, 11:44 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-16, 08:49 AM
RE: Getting wind data into Pypilot - by ironman - 2022-08-16, 09:45 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-16, 05:39 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-16, 06:21 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-16, 11:38 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-19, 06:32 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-17, 07:29 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-19, 08:10 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-20, 06:52 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-22, 07:56 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-22, 09:47 AM
RE: Getting wind data into Pypilot - by ironman - 2022-08-22, 12:57 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-22, 01:53 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-22, 03:31 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-23, 07:47 AM
RE: Getting wind data into Pypilot - by ironman - 2022-08-23, 10:44 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-27, 11:15 AM
RE: Getting wind data into Pypilot - by ironman - 2022-08-28, 01:29 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-27, 06:32 PM
RE: Getting wind data into Pypilot - by kniven - 2022-08-28, 05:42 PM
RE: Getting wind data into Pypilot - by ironman - 2022-08-29, 12:32 AM
RE: Getting wind data into Pypilot - by kniven - 2022-08-29, 06:30 PM
RE: Getting wind data into Pypilot - by stelian - 2022-09-04, 05:32 PM
RE: Getting wind data into Pypilot - by stelian - 2022-09-04, 06:08 PM
RE: Getting wind data into Pypilot - by stelian - 2022-09-04, 07:55 PM
RE: Getting wind data into Pypilot - by stelian - 2022-09-04, 09:09 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)