2018-06-22, 03:13 PM
I think "~/.pypilot/serial_ports" was good because the list in openplotter was good to, but now i've removed all.
With gpsd all is working good ! With the cheap gps usb receiver it's ok. With the lowrance, it's not ok because lowrance don't send timestamp in nmea sentences !
So I've gpsd which is ok, and wind which is ok.
For information (if someone else has the same problem), the code on nodered to add checksum is:
Now I only need the motor driver to test (i've not "studied" the question of the motor driver for now, but you have published all the code so I only need the hardware part).
When I try to run the github version, i've an error:
I've some serials ports but connected to kplex / gpsd / node-red, i've not digged in the problem to see where is it.
With gpsd all is working good ! With the cheap gps usb receiver it's ok. With the lowrance, it's not ok because lowrance don't send timestamp in nmea sentences !
So I've gpsd which is ok, and wind which is ok.
For information (if someone else has the same problem), the code on nodered to add checksum is:
Code:
var nmea = msg.payload;
var checksum = 0;
var nmea_stripped = nmea.substring(1, nmea.indexOf('\r\n'));
for(var i = 0; i < nmea_stripped.length; i++)
{
checksum = checksum ^ nmea_stripped.charCodeAt(i);
}
checksum = checksum.toString(16);
padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding;
while (checksum.length < padding) {
checksum = "0" + checksum;
}
msg.payload = '$' + nmea_stripped + '*' + checksum.toUpperCase() + '\r\n';
return msg;
Now I only need the motor driver to test (i've not "studied" the question of the motor driver for now, but you have published all the code so I only need the hardware part).
When I try to run the github version, i've an error:
Quote:min/max compass calibration not in use
Using ellipsoid compass calibration
Accel calibration not in use
LSM9DS0 init complete
Traceback (most recent call last):
File "/usr/local/bin/pypilot", line 11, in <module>
load_entry_point('pypilot==0.1', 'console_scripts', 'pypilot')()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/basic_autopilot.py", line 108, in main
ap.run()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/autopilot.py", line 178, in run
self.iteration()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/autopilot.py", line 317, in iteration
self.servo.poll()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/servo.py", line 427, in poll
device_path = serialprobe.probe('servo', [38400], 1)
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 195, in probe
devices = enumerate_devices()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 105, in enumerate_devices
devices = scan_devices()
File "/usr/local/lib/python2.7/dist-packages/pypilot-0.1-py2.7-linux-armv7l.egg/pypilot/serialprobe.py", line 89, in scan_devices
if os.path.realpath(devices) in allowed_serial_ports:
File "/usr/lib/python2.7/posixpath.py", line 375, in realpath
path, ok = _joinrealpath('', filename, {})
File "/usr/lib/python2.7/posixpath.py", line 381, in _joinrealpath
if isabs(rest):
File "/usr/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
got signal atexit cleaning up
I've some serials ports but connected to kplex / gpsd / node-red, i've not digged in the problem to see where is it.