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
#31
Thanks for this.

I have updated pypilot, and it should be able to receive from this wind sensor.
Reply
#32
Code:
tc@pypilot:~/pypilot_update$ . pypilot.build
: not foundt.build: line 9:
: not foundt.build: line 13:
: not foundt.build: line 18:
: not foundt.build: line 26:
: not foundt.build: line 30:
: not foundt.build: line 32:
: not foundt.build: line 34:
: not foundt.build: line 36:
: not foundt.build: line 38:
: not foundt.build: line 40:
: not foundt.build: line 44:
: not foundt.build: line 46:
: not foundt.build: line 49:
: not foundt.build: line 51:
: not foundt.build: line 53:
: not foundt.build: line 54:
: not foundt.build: line 56:
-sh: cd: line 57: can't cd to .
: not foundt.build: line 58:
: not foundt.build: line 61:
: not foundt.build: line 63:
: not foundt.build: line 65: python3.6
tar: can't open 'dist/*tar.gz': No such file or directory
: not foundt.build: line 67:
-sh: cd: line 69: can't cd to ..
: not foundt.build: line 71:
: not foundt.build: line 72:
: not foundt.build: line 75:
: not foundt.build: line 77:
: not foundt.build: line 79:
: not foundt.build: line 81:
chmod: /tmp/pypilot: No such file or directory
chmod: /: Operation not permitted
chmod: /tmp/pypilot: No such file or directory
chmod: /usr: Operation not permitted
chmod: /tmp/pypilot: No such file or directory
chmod: /usr/local: Operation not permitted
chmod: /tmp/pypilot: No such file or directory
chmod: /usr/local/lib: Operation not permitted
chmod: /tmp/pypilot: No such file or directory
mode of '/usr/local/lib/python3.6' changed to 0755 (rwxr-xr-x)
chmod: /tmp/pypilot: No such file or directory
mode of '/usr/local/lib/python3.6' changed to 0755 (rwxr-xr-x)
chmod: /site-packages: No such file or directory
: not foundt.build: line 82:
: not foundt.build: line 83:
'trip: unrecognized option '--strip-unneeded
Usage: strip <option(s)> in-file(s)
Removes symbols and sections from files
The options are:
 -I --input-target=<bfdname>      Assume input file is in format <bfdname>
 -O --output-target=<bfdname>     Create an output file in format <bfdname>
 -F --target=<bfdname>            Set both input and output format to <bfdname>
 -p --preserve-dates              Copy modified/access timestamps to the output
 -D --enable-deterministic-archives
                                  Produce deterministic output when stripping archives
 -U --disable-deterministic-archives
                                  Disable -D behavior (default)
 -R --remove-section=<name>       Also remove section <name> from the output
    --remove-relocations <name>   Remove relocations from section <name>
 -s --strip-all                   Remove all symbol and relocation information
 -g -S -d --strip-debug           Remove all debugging symbols & sections
    --strip-dwo                   Remove all DWO sections
    --strip-unneeded              Remove all symbols not needed by relocations
    --only-keep-debug             Strip everything but the debug information
 -M  --merge-notes                Remove redundant entries in note sections (default)
     --no-merge-notes             Do not attempt to remove redundant notes
 -N --strip-symbol=<name>         Do not copy symbol <name>
 -K --keep-symbol=<name>          Do not strip symbol <name>
    --keep-file-symbols           Do not strip file symbol(s)
 -w --wildcard                    Permit wildcard in symbol comparison
 -x --discard-all                 Remove all non-global symbols
 -X --discard-locals              Remove any compiler-generated symbols
 -v --verbose                     List all object files modified
 -V --version                     Display this program's version number
 -h --help                        Display this output
    --info                        List object formats & architectures supported
 -o <file>                        Place stripped output into <file>
strip: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
: not foundt.build: line 85:
: not foundt.build: line 86:
: not foundt.build: line 90:
-sh: cd: line 91: can't cd to /tmp/pypilot
-sh: cd: line 92: can't cd to ..
Parallel mksquashfs: Using 1 processor
, block size 131072.tem on pypilot


Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
       compressed data, compressed metadata, compressed fragments, no xattrs
       duplicates are removed
Filesystem size 0.31 Kbytes (0.00 Mbytes)
       64.27% of uncompressed filesystem size (0.49 Kbytes)
Inode table size 83 bytes (0.08 Kbytes)
       42.78% of uncompressed inode table size (194 bytes)
Directory table size 92 bytes (0.09 Kbytes)
       66.19% of uncompressed directory table size (139 bytes)
Number of duplicate files found 0
Number of inodes 6
Number of files 0
Number of fragments 0
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 6
Number of ids (unique uids + gids) 2
Number of uids 1
       tc (1001)
Number of gids 1
       staff (50)
-sh: cd: line 94: can't cd to /tmp/pypilot
find: usr: No such file or directory
.tcz': No such file or directory
: not foundt.build: line 97:
: not foundt.build: line 99:
.tcz': No such file or directory
: not foundt.build: line 101:
.tcz /mnt/mmcblk0p2/tce/optional/pypilot
: No such file or directoryonal/pypilot
: not foundt.build: line 105:
.tcz pypilot
-rw-r--r--    1 tc       staff         4096 Nov  4 11:07 pypilot?.tcz?
: not foundt.build: line 108:
': Path does not exist/mmcblk0p2/tce/optional
': Path does not exist/mmcblk0p2/tce/optional
': Path does not exist/mmcblk0p2/tce/optional
: not foundt.build: line 110:
: not foundt.build: line 112:
: not foundt.build: line 114:
-sh: cd: line 115: can't cd to /home/tc/pypilot_update
tc@pypilot:~/pypilot_update$

Sean. I'm still a bit new to all this git stuff and building the pypilot... Any suggestions?
Reply
#33
(2022-08-27, 02:47 PM)seandepagnier Wrote: I have updated pypilot, and it should be able to receive from this wind sensor.

I can't see a recent commit on github?
Reply
#34
I pushed the changes to git now.

(2022-08-27, 06:32 PM)kniven Wrote: Sean. I'm still a bit new to all this git stuff and building the pypilot... Any suggestions?

I am not sure, but you are in the pypilot_update directory...   What happens from the pypilot directory?

On tinycore often you need to pull the git changes to another machine, then pull from it locally since tinycore does not have ssl working.
Reply
#35
(2022-08-28, 04:00 PM)seandepagnier Wrote: I pushed the changes to git now.

(2022-08-27, 06:32 PM)kniven Wrote: Sean. I'm still a bit new to all this git stuff and building the pypilot... Any suggestions?

I am not sure, but you are in the pypilot_update directory...   What happens from the pypilot directory?

On tinycore often you need to pull the git changes to another machine, then pull from it locally since tinycore does not have ssl working.

I tried various thing. First, I tried to clone from git, directly to the Tinypilot... Failed, github timeout
Code:
tc@pypilot:~/pypilot-update$ ls
tc@pypilot:~/pypilot-update$ git clone git://github.com/pypilot/pypilot
Cloning into 'pypilot'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out
Then, I cloned the git repositories to my PC, and copied it to tinypilot using scp
Code:
leifi@LAPTOP-L8M64A00 MINGW64 ~/pypilot2
$ git clone https://github.com/pypilot/pypilot
git clone --depth 1 https://github.com/pypilot/pypilot_data
Cloning into 'pypilot'...
remote: Enumerating objects: 11617, done.
remote: Counting objects: 100% (802/802), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 11617 (delta 735), reused 744 (delta 704), pack-reused 10815
Receiving objects: 100% (11617/11617), 3.32 MiB | 1.66 MiB/s, done.
Resolving deltas: 100% (8043/8043), done.
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 | 990.00 KiB/s, done.


leifi@LAPTOP-L8M64A00 MINGW64 ~/pypilot2
$ cp -rv pypilot_data/* pypilot
'pypilot_data/README.md' -> 'pypilot/README.md'
'pypilot_data/arduino/weathersensors/font.ttf' -> 'pypilot/arduino/weathersensors/font.ttf'
'pypilot_data/hat/font.ttf' -> 'pypilot/hat/font.ttf'
'pypilot_data/ui/compass.png' -> 'pypilot/ui/compass.png'
'pypilot_data/ui/Vagabond.mtl' -> 'pypilot/ui/Vagabond.mtl'
'pypilot_data/ui/Vagabond.obj' -> 'pypilot/ui/Vagabond.obj'
'pypilot_data/web/static/font/Roboto-Regular.ttf' -> 'pypilot/web/static/font/Roboto-Regular.ttf'

leifi@LAPTOP-L8M64A00 MINGW64 ~/pypilot2
$ ls
pypilot/  pypilot_data/

leifi@LAPTOP-L8M64A00 MINGW64 ~/pypilot2
$

leifi@LAPTOP-L8M64A00 MINGW64 ~/pypilot2
$ scp -r pypilot/ tc@192.168.1.102:~/pypilot_update2/
tc@192.168.1.102's password:
config                                                                                                                                                      100%  297    14.0KB/s   00:00
description                                                                                                                                                 100%   73     1.8KB/s   00:00
FETCH_HEAD                                                                                                                                                  100%  314    21.3KB/s   00:00
HEAD                                                                                                                                                        100%   23     0.4KB/s   00:00
applypatch-msg.sample                                                                                                                                       100%  478     8.3KB/s   00:00
commit-msg.sample                                                                                                                                           100%  896    11.8KB/s   00:00
fsmonitor-watchman.sample                                                                                                                                   100% 4655   170.9KB/s   00:00
post-update.sample                                                                                                                                          100%  189    12.5KB/s   00:00
pre-applypatch.sample                                                                                                                                       100%  424    29.0KB/s   00:00
pre-commit.sample                                                                                                                                           100% 1643    58.5KB/s   00:00
pre-merge-commit.sample                                                                                                                                     100%  416    48.7KB/s   00:00
pre-push.sample                                                                                                                                             100% 1374    46.5KB/s   00:00
pre-rebase.sample                                                                                                                                           100% 4898   200.9KB/s   00:00
pre-receive.sample                                                                                                                                          100%  544    42.1KB/s   00:00
prepare-commit-msg.sample                                                                                                                                   100% 1492    68.5KB/s   00:00
push-to-checkout.sample                                                                                                                                     100% 2783   112.7KB/s   00:00
update.sample                                                                                                                                               100% 3650   141.3KB/s   00:00
index                                                                                                                                                       100%   31KB 286.1KB/s   00:00
exclude                                                                                                                                                     100%  240    13.3KB/s   00:00
HEAD                                                                                                                                                        100%  197     8.5KB/s   00:00
master                                                                                                                                                      100%  197    11.8KB/s   00:00
HEAD                                                                                                                                                        100%  197     3.1KB/s   00:00
pack-cd227d5aa1871d989090a26757c2881f4210aac1.idx                                                                                                           100%  319KB 300.8KB/s   00:01
pack-cd227d5aa1871d989090a26757c2881f4210aac1.pack                                                                                                          100% 3398KB 231.2KB/s   00:14
ORIG_HEAD                                                                                                                                                   100%   41     3.4KB/s   00:00
packed-refs                                                                                                                                                 100%  306    34.3KB/s   00:00
master                                                                                                                                                      100%   41     2.5KB/s   00:00
HEAD                                                                                                                                                        100%   32     3.9KB/s   00:00
.gitignore                                                                                                                                                  100%   92     5.2KB/s   00:00
hat.ino                                                                                                                                                     100%   15KB 383.2KB/s   00:00
IRLibDecodeBase.cpp                                                                                                                                         100% 7106   273.5KB/s   00:00
IRLibDecodeBase.h                                                                                                                                           100% 5404   130.9KB/s   00:00
IRLibGlobals.h                                                                                                                                              100% 8030   105.0KB/s   00:00
IRLibRecvBase.cpp                                                                                                                                           100%   10KB 382.8KB/s   00:00
IRLibRecvBase.h                                                                                                                                             100% 4195   242.8KB/s   00:00
IRLibCombo.h                                                                                                                                                100% 7539   202.5KB/s   00:00
IRLibHardware.cpp                                                                                                                                           100% 1969   117.6KB/s   00:00
IRLibHardware.h                                                                                                                                             100%   16KB 166.6KB/s   00:00
IRLibProtocols.h                                                                                                                                            100% 1304    73.2KB/s   00:00
IRLib_HashRaw.h                                                                                                                                             100% 3633   160.0KB/s   00:00
IRLib_P01_NEC.h                                                                                                                                             100% 3666    86.2KB/s   00:00
IRLib_P02_Sony.h                                                                                                                                            100% 2869   180.0KB/s   00:00
IRLib_P03_RC5.h                                                                                                                                             100% 4386    88.8KB/s   00:00
IRLib_P04_RC6.h                                                                                                                                             100% 6549   189.3KB/s   00:00
IRLib_P05_Panasonic_Old.h                                                                                                                                   100% 2507    60.6KB/s   00:00
IRLib_P07_NECx.h                                                                                                                                            100% 2997    64.3KB/s   00:00
IRLibRecvPCI.cpp                                                                                                                                            100% 5902   187.2KB/s   00:00
IRLibRecvPCI.h                                                                                                                                              100% 1742    97.5KB/s   00:00
Makefile                                                                                                                                                    100% 4305   119.1KB/s   00:00
RCSwitch.cpp                                                                                                                                                100%   21KB 372.7KB/s   00:00
RCSwitch.h                                                                                                                                                  100% 5146   141.6KB/s   00:00
wiring.c                                                                                                                                                    100% 9712   215.6KB/s   00:00
crc.h                                                                                                                                                       100% 2542   122.2KB/s   00:00
Makefile                                                                                                                                                    100% 5644    82.3KB/s   00:00
motor.ino                                                                                                                                                   100%   45KB 500.5KB/s   00:00
README                                                                                                                                                      100% 2373   101.5KB/s   00:00
README                                                                                                                                                      100%  987    48.0KB/s   00:00
Makefile                                                                                                                                                    100% 2282   111.3KB/s   00:00
RCSwitch.cpp                                                                                                                                                100%   22KB 348.3KB/s   00:00
RCSwitch.h                                                                                                                                                  100% 5148   282.3KB/s   00:00
rfremote.ino                                                                                                                                                100% 2703   112.4KB/s   00:00
wiring.c                                                                                                                                                    100% 9895   598.0KB/s   00:00
Makefile                                                                                                                                                    100% 3053    87.0KB/s   00:00
rudder.ino                                                                                                                                                  100% 6603   177.9KB/s   00:00
.gitignore                                                                                                                                                  100%   59     1.9KB/s   00:00
font.ttf                                                                                                                                                    100%  137KB 326.7KB/s   00:00
JLX12864.cpp                                                                                                                                                100% 7089   160.1KB/s   00:00
JLX12864.h                                                                                                                                                  100% 2293    92.7KB/s   00:00
Makefile                                                                                                                                                    100% 4242   167.6KB/s   00:00
make_charset.py                                                                                                                                             100% 2651   103.2KB/s   00:00
PCD8544.cpp                                                                                                                                                 100%   11KB 205.3KB/s   00:00
PCD8544.h                                                                                                                                                   100% 4099   139.2KB/s   00:00
README                                                                                                                                                      100% 1172   109.2KB/s   00:00
twi.c                                                                                                                                                       100%   18KB 256.5KB/s   00:00
twi.h                                                                                                                                                       100% 1669    32.6KB/s   00:00
weathersensors.ino                                                                                                                                          100%   44KB 459.7KB/s   00:00
dependencies.py                                                                                                                                             100% 7738   164.1KB/s   00:00
.gitignore                                                                                                                                                  100%    7     0.4KB/s   00:00
arduino.py                                                                                                                                                  100%   15KB 230.2KB/s   00:00
babel.cfg                                                                                                                                                   100%  132     6.9KB/s   00:00
boot.py                                                                                                                                                     100%  539    27.5KB/s   00:00
config.py                                                                                                                                                   100%   67     3.9KB/s   00:00
config_esp32.py                                                                                                                                             100% 1662    61.7KB/s   00:00
eeprom_settings.txt                                                                                                                                         100% 3137   224.9KB/s   00:00
pypilot_hat.conf                                                                                                                                            100%  245    24.7KB/s   00:00
README                                                                                                                                                      100%  243    14.5KB/s   00:00
script.sh                                                                                                                                                   100%  514    15.2KB/s   00:00
font.py                                                                                                                                                     100% 4634   224.2KB/s   00:00
font.ttf                                                                                                                                                    100%  190KB 494.1KB/s   00:00
gettext_esp32.py                                                                                                                                            100% 1068    35.8KB/s   00:00
glut.py                                                                                                                                                     100% 2860    54.2KB/s   00:00
gpio.py                                                                                                                                                     100% 3975   323.0KB/s   00:00
gpio_esp32.py                                                                                                                                               100% 4802   162.0KB/s   00:00
hat.py                                                                                                                                                      100%   20KB 310.2KB/s   00:00
lcd.py                                                                                                                                                      100%   12KB 278.2KB/s   00:00
lcd_esp32.py                                                                                                                                                100% 3968   341.8KB/s   00:00
lircd.py                                                                                                                                                    100% 4129   119.9KB/s   00:00
apertium-po.py                                                                                                                                              100% 3289   129.9KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4750   196.9KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4710   171.6KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4770   264.7KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 5383   155.6KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4748   149.2KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4702    61.5KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4810    75.5KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4755   167.6KB/s   00:00
Makefile                                                                                                                                                    100%  298     5.4KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4690   172.2KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4675   279.5KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4721   248.9KB/s   00:00
POTFILES.in                                                                                                                                                 100%   24     2.2KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4676   209.9KB/s   00:00
pypilot_hat.pot                                                                                                                                             100% 3925   289.5KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 5359   265.2KB/s   00:00
pypilot_hat.po                                                                                                                                              100% 4813   301.1KB/s   00:00
trans-po.py                                                                                                                                                 100% 3416    84.2KB/s   00:00
translate.sh                                                                                                                                                100%  701    29.6KB/s   00:00
Makefile                                                                                                                                                    100%  735    53.4KB/s   00:00
menu.py                                                                                                                                                     100%   23KB 350.8KB/s   00:00
messages.pot                                                                                                                                                100%  491    21.0KB/s   00:00
page.py                                                                                                                                                     100%   32KB 376.0KB/s   00:00
pypilot_hat_web.pot                                                                                                                                         100% 2146    64.1KB/s   00:00
README                                                                                                                                                      100%  502    50.1KB/s   00:00
.gitignore                                                                                                                                                  100%   34     2.3KB/s   00:00
spireader.cpp                                                                                                                                               100% 1107    48.9KB/s   00:00

..cut some text due to too long message

index.css                                                                                                                                                   100% 3019   130.9KB/s   00:00
jquery.min.js                                                                                                                                               100%   94KB 576.8KB/s   00:00
pypilot_control.js                                                                                                                                          100%   22KB 432.4KB/s   00:00
socket.io.min.js                                                                                                                                            100%   60KB 387.2KB/s   00:00
w3.css                                                                                                                                                      100%   30KB 246.2KB/s   00:00
calibrationplot.html                                                                                                                                        100% 1430    51.8KB/s   00:00
index.html                                                                                                                                                  100% 7522   129.4KB/s   00:00
wifi.html                                                                                                                                                   100% 1897    88.7KB/s   00:00
tinypilot.py                                                                                                                                                100%  748    18.8KB/s   00:00
translate.sh                                                                                                                                                100%  616    50.2KB/s   00:00
messages.po                                                                                                                                                 100% 6142   236.6KB/s   00:00
messages.po                                                                                                                                                 100% 5991    76.0KB/s   00:00
messages.po                                                                                                                                                 100% 6078   106.5KB/s   00:00
messages.po                                                                                                                                                 100% 7099   364.6KB/s   00:00
messages.po                                                                                                                                                 100% 6146   463.5KB/s   00:00
messages.po                                                                                                                                                 100% 5961   403.8KB/s   00:00
messages.po                                                                                                                                                 100% 6079   262.6KB/s   00:00
messages.po                                                                                                                                                 100% 6103   371.5KB/s   00:00
messages.po                                                                                                                                                 100% 5994    94.8KB/s   00:00
messages.po                                                                                                                                                 100% 5978   149.3KB/s   00:00
messages.po                                                                                                                                                 100% 5999   101.7KB/s   00:00
messages.po                                                                                                                                                 100% 5693   312.5KB/s   00:00
messages.po                                                                                                                                                 100% 7131   258.1KB/s   00:00
messages.po                                                                                                                                                 100% 5955   234.7KB/s   00:00
web.py                                                                                                                                                      100% 7244   270.5KB/s   00:00
__init__.py      

On my tinypilot, I now have the expected directory "pypilot_update2"
Code:
tc@pypilot:~$ ls
README           pypilot          pypilot-update/  pypilot_update/  pypilot_update2/

tc@pypilot:~$ cd pypilot_update2/
tc@pypilot:~/pypilot_update2$ ls
README           arduino/         hat/             pypilot.build    setup.cfg        ui/
README.md        dependencies.py  pypilot/         scripts/         setup.py         web/
tc@pypilot:~/pypilot_update2$

I now try to run pypilot, using the python3 autopilot.py, and get this error.
Code:
leifi@LAPTOP-L8M64A00 MINGW64 ~
$ ssh tc@192.168.1.102
tc@192.168.1.102's password:
tinypilot is a Sailboat Autopilot Distribution for raspberry pi

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

tc@pypilot:~$ ls
README           pypilot          pypilot_update2/
tc@pypilot:~$ cd pypilot_update2/
tc@pypilot:~/pypilot_update2$ ls
README           arduino/         hat/             pypilot.build    setup.cfg        ui/
README.md        dependencies.py  pypilot/         scripts/         setup.py         web/
tc@pypilot:~/pypilot_update2$ cd pypilot/
tc@pypilot:~/pypilot_update2/pypilot$ python3 autopilot.py
autopilot start 160.964211
world magnetic model not available
autopilot start 168.28026
imu process 3670
made imu process realtime
Using settings file RTIMULib.ini
Settings file not found. Using defaults and creating settings file
Detected ICM20948 at standard address
Using fusion algorithm Kalman STATE4
IMU Name: ICM-20948
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
warning, failed to make calibration process idle, trying renice
ICM-20948 init complete
Traceback (most recent call last):
 File "autopilot.py", line 477, in <module>
   main()
 File "autopilot.py", line 471, in main
   ap = Autopilot()
 File "autopilot.py", line 107, in __init__
   self.sensors = Sensors(self.client, self.boatimu)
 File "/home/tc/pypilot_update2/pypilot/sensors.py", line 282, in __init__
   from signalk import signalk
 File "/home/tc/pypilot_update2/pypilot/signalk.py", line 367
   data[pypilot_key] = value[signalk_key] / signalk_conversion
      ^
IndentationError: expected an indented block
closing autopilot
tc@pypilot:~/pypilot_update2/pypilot$ sudo sv stop pypilot
ok: down: pypilot: 0s
tc@pypilot:~/pypilot_update2/pypilot$

I also try to build using the . pypilot.build command, but this also fails
Code:
tc@pypilot:~/pypilot_update2$ . pypilot.build
: not foundt.build: line 9:
: not foundt.build: line 13:
: not foundt.build: line 18:
: not foundt.build: line 26:
: not foundt.build: line 30:
: not foundt.build: line 32:
: not foundt.build: line 34:

..cut some text due to too long message



.tcz': No such file or directory
: not foundt.build: line 97:
: not foundt.build: line 99:
.tcz': No such file or directory
: not foundt.build: line 101:
.tcz /mnt/mmcblk0p2/tce/optional/pypilot
: No such file or directoryonal/pypilot
: not foundt.build: line 105:
.tcz pypilot
-rw-r--r--    1 tc       staff         4096 Nov  4 11:06 pypilot?.tcz?
: not foundt.build: line 108:
': Path does not exist/mmcblk0p2/tce/optional
': Path does not exist/mmcblk0p2/tce/optional
': Path does not exist/mmcblk0p2/tce/optional
: not foundt.build: line 110:
: not foundt.build: line 112:
: not foundt.build: line 114:
-sh: cd: line 115: can't cd to /home/tc/pypilot_update2
tc@pypilot:~/pypilot_update2$


I'm trying my best to follow instructions found here https://github.com/pypilot/workbook/wiki...r-the-hood , but there are probably some details missing, or that I have misunderstood...

Best regards, Leif


Attached Files Image(s)
   
Reply
#36
Sorry, there was a typo in signalk.py I fixed now.
Reply
#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
#38
Sean, 
Still some error messages when running 
Code:
python3 autopilot.py

See screenshot


Attached Files Image(s)
   
Reply
#39
It really is simple.. Now I have pypilot able to both send/receive signalk wind again.

The error above is not related, it means you need to rebuild the pypilot package
Reply
#40
Code:
`tc@pypilot:~/pypilot_update2$ . pypilot.build
Code:
: not foundt.build: line 9:
: not foundt.build: line 13:
: not foundt.build: line 18:
: not foundt.build: line 26:
: not foundt.build: line 30:
: not foundt.build: line 32:
: not foundt.build: line 34:

..cut some text due to too long message

You are using stelian's image based on tinycore 13? 

I dont know why but somehow ". pypilot.build" is not working on that image, it is very strange, but many things are still broken on that image I have not had the chance to work on.

Can you do instead:
chmod +x pypilot.build
./pypilot.build
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)