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
enabling pypilot HAT service
#14
I have tried everything I can think of (including reloading pypilot from github and from OpenCPN) but cannot get pypilot_hat to run either directly or as a service. I tried with no hat.conf and tried with a hat.conf file I copied from the forum:

{"host":"localhost","actions":{"auto":[],"menu":[],"port1":[],"starboard1":[],"select":[],"port10":[],"starboard10":[],"tack":[],"dodge_port":[],"dodge_starboard":[],"engage":[],"disengage":[],"1":[],"-1":[],"2":[],"-2":[],"5":[],"-5":[],"10":[],"-10":[],"compassmode":[],"gpsmode":[],"windmode":[],"truewindmode":[],"center":[],"tackport":[],"tackstarboard":[],"none":[],"pilot_absolute":[],"pilot_basic":[]},"pi.ir":true,"arduino.ir":false,"arduino.nmea.in":false,"arduino.nmea.out":false,"arduino.nmea.baud":4800,"lcd":{},"hat":{"lcd":{"driver":"default","port":"\/dev\/spidev0.0"},"lirc":"gpio4"}}

But I just get:

pi@openplotter:~/.pypilot $ sudo pypilot_hat
hat start 9252.581509633
have gpio for raspberry pi
hat import done 9252.631372467
loading config file: /root/.pypilot/hat.conf
config failed: [Errno 2] No such file or directory: '/root/.pypilot/hat.conf'
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
assuming original 26 pin tinypilot with nokia5110 display
Traceback (most recent call last):
File "/usr/local/bin/pypilot_hat", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.42', 'console_scripts', 'pypilot_hat')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 687, in main
hat = Hat()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 348, in __init__
self.write_config()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 502, in write_config
if self.client and not 'modes' in self.config:
AttributeError: 'Hat' object has no attribute 'client'

Any help would be much appreciated!

I also ran pypilot_hat without the sudo and got:

pi@openplotter:~/.pypilot $ pypilot_hat
hat start 9607.944609552
have gpio for raspberry pi
hat import done 9607.997461213
loading config file: /home/pi/.pypilot/hat.conf
config failed: Expected object or value
failed to load /proc/device-tree/hat/custom_0 : [Errno 2] No such file or directory: '/proc/device-tree/hat/custom_0'
assuming original 26 pin tinypilot with nokia5110 display
Traceback (most recent call last):
File "/usr/local/bin/pypilot_hat", line 33, in <module>
sys.exit(load_entry_point('pypilot==0.42', 'console_scripts', 'pypilot_hat')())
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 687, in main
hat = Hat()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 348, in __init__
self.write_config()
File "/usr/local/lib/python3.9/dist-packages/pypilot/hat/hat.py", line 502, in write_config
if self.client and not 'modes' in self.config:
AttributeError: 'Hat' object has no attribute 'client'
Reply


Messages In This Thread
RE: enabling pypilot HAT service - by theavi - 2023-10-03, 11:14 AM
RE: enabling pypilot HAT service - by Sailoog - 2023-10-05, 10:12 AM
RE: enabling pypilot HAT service - by ironman - 2023-10-05, 12:29 PM
RE: enabling pypilot HAT service - by Sailoog - 2023-10-08, 10:20 AM
RE: enabling pypilot HAT service - by ironman - 2023-10-08, 06:21 PM
RE: enabling pypilot HAT service - by zyszek - 2023-10-08, 11:14 PM
RE: enabling pypilot HAT service - by Sailoog - 2023-10-11, 10:32 AM
RE: enabling pypilot HAT service - by drbarritt - 2023-12-11, 11:20 PM
RE: enabling pypilot HAT service - by drbarritt - 2023-12-15, 08:49 PM
RE: enabling pypilot HAT service - by drbarritt - 2023-12-15, 10:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)