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
Garmin plotter crashes nmea communication
#11
(2019-08-24, 01:24 AM)seandepagnier Wrote: I do not have && on line servo.py:600.


The code in git should treat GPAPB differently from other **APB messages.

For the crashes, can you stop pypilot from command line:
sudo sv d pypilot

then:
cd ~/pypilot/pypilot
python autopilot.py

Make it crash now, and post the backtrace.  


The lcd code is maybe broken in git at the moment which explains why display is not working.   I was rewriting to support different lcd displays and the line in ugfx.cpp:764 should be uncommented.

Sean

hi Sean, thank you for reply.
Ok for display, now it works.
Line 600 of servo.py on github contains the '&&' and it shows the '&&' in red
I will try to see if it crashes today or tomorrow, I'll report on results.
Francesco
Reply
#12
(2019-08-24, 08:04 AM)webber63 Wrote:
(2019-08-24, 01:24 AM)seandepagnier Wrote: I do not have && on line servo.py:600.


The code in git should treat GPAPB differently from other **APB messages.

For the crashes, can you stop pypilot from command line:
sudo sv d pypilot

then:
cd ~/pypilot/pypilot
python autopilot.py

Make it crash now, and post the backtrace.  


The lcd code is maybe broken in git at the moment which explains why display is not working.   I was rewriting to support different lcd displays and the line in ugfx.cpp:764 should be uncommented.

Sean

hi Sean, thank you for reply.
Ok for display, now it works.
Line 600 of servo.py on github contains the '&&' and it shows the '&&' in red
I will try to see if it crashes today or tomorrow, I'll report on results.
Francesco

Crash issue seems to be solved  with Rob’s code, tomorrow a test on water.
Tack does’nt work in any mode, will have a look as soon as possible.
Bye
Reply
#13
Hi Francesco,

Glad you got the problem solved. I've also seen that Sean made modifications to the nmea.py on Git. T.m.h.o. (and i'm not a python programmer) this modification might still be a problem (from what i've seen as i only just looked into this) It does seem to stop the mode switching to compass and will survive an empty string (no waypoint selected in plotter) as it returns true on "GP" and does't get to the float() but with a waypoint selected it will probably not steer to the waypoint (it returns true before getting to this part). And what i'm mostly missing is a check before doing the float() even with **APB (not GP) when there is an issue with the sentence it might still crash the nmea communication,. I hope Sean can have another look at this part. On the other hand I still haven't been able to do a seatrial with my modification so let me know.

If you are using fysical key's on the GPIO for control then the problem with the tacking might be that it seems to be responding to the LEFT and RIGHT (+/- 10 degrees/bigstep) key and not to the UP and DOWN key (+/- 1 degree/smallstep). With the current version you (at least i do) have only up and down. I would like to add the L/R keys to the GPIO (still some pins left) but I haven't figured out how in lcd.py one of the self.pins gets one of the seven keynames (pini?). Hope Sean or someone who has already done this can give some help. (perhaps L/R are not assigned as they are keynames 6 and 7 and there are only 5 self.pins).

Greetings Rob
Reply
#14
(2019-08-24, 08:42 PM)rmvdmrl Wrote: Hi Francesco,

Glad you got the problem solved. I've also seen that Sean made modifications to the nmea.py on Git. T.m.h.o. (and i'm not a python programmer) this modification might still be a problem (from what i've seen as i only just looked into this)  It does seem to stop the mode switching to compass and will survive an empty string (no waypoint selected in plotter) as it returns true on "GP" and does't get to the float() but with a waypoint selected it will probably not steer to the waypoint (it returns true before getting to this part). And what i'm mostly missing is a check before doing the float() even with **APB (not GP) when there is an issue with the sentence it might still crash the nmea communication,. I hope Sean can have another look at this part. On the other hand I still haven't been able to do a seatrial with my modification so let me know.

I have rearranged the apb parsing again. This way it supports apb from serial ports not just tcp.
Quote:If you are using fysical key's on the GPIO for control then the problem with the tacking might be that it seems to be responding to the LEFT and RIGHT (+/- 10 degrees/bigstep) key and not to the UP and DOWN key (+/- 1
The next version has these keys on gp5 and gp6 (pins 29 and 31)
Quote: degree/smallstep). With the current version you (at least i do) have only up and down. I would like to add the L/R keys to the GPIO (still some pins left) but I haven't figured out how in lcd.py one of the self.pins gets one of the seven keynames (pini?). Hope Sean or someone who has already done this can give some help. (perhaps L/R are not assigned as they are keynames 6 and 7 and there are only 5 self.pins).

Greetings Rob

The IR remote has a different way of reading the keys from gpio.

Tacking still needs more testing and development to improve it.
Reply
#15
Hi Sean, thanks for the reply, I look foreward to seeing the new version with the L/R buttons then I can test the Tacking. I made a Pull request on Git on the new NMEA.PY and the SENSORS.PY as to my opinion the NMEA crash will be back. Hope you can look into this.

Greeting and thanks Rob
Reply
#16
The next version uses 7 buttons on the keypad instead of only 5 adding the +- 10 degrees (left right) buttons.

As for tacking, it still needs development. How should a tack be initiated? The IR buttons are one at a time, so no possibility of using more than one at a time, but the keypad keys can be held while another button is pressed.

For now i plan that if you press the select key on the main screen, it changes to an alternate control screen where you can tack with left and right buttons as well as select the autopilot mode of compass, gps or wind.
Reply
#17
Hi Sean,

What you are sugesting does seem the most logical solution and keeps the control on the ir the same as on the hw buttons.

On the other hand it does require a lot of buttons (size) and i/o (perhaps integrating a 3x3 membrane keypad?).

Only other thing i can think off is keep using the 5 buttons (use the Up/Down keys as L/R) and with the select button (ap.active) go trough a list of modes (displayed), the first is switching from Up/Down (+/- 1) to L/R (+/- 10) wait a moment for the next press (select) with next press next mode (Tack, Gps,App Wind, True Wind, Compass, Exit (off course not showing if they are not available, perhaps expand the list by tacking 110 degrees or tacking at wind angle)) no key press during that time switches over to the selected mode (displayed). So switching from U/D (+/- 1) to L/R (+/- 10) is just 1 press on select, Tack is 2 times, etc., Setting Tack mode always sets U/D to L/R (or just tack on U/D).

Just some ideas.

Greetings and thanks for the mods on nmea/sensors,

Rob
Reply
#18
(2019-08-24, 08:42 PM)rmvdmrl Wrote: Hi Francesco,

Glad you got the problem solved. I've also seen that Sean made modifications to the nmea.py on Git. T.m.h.o. (and i'm not a python programmer) this modification might still be a problem (from what i've seen as i only just looked into this)  It does seem to stop the mode switching to compass and will survive an empty string (no waypoint selected in plotter) as it returns true on "GP" and does't get to the float() but with a waypoint selected it will probably not steer to the waypoint (it returns true before getting to this part). And what i'm mostly missing is a check before doing the float() even with **APB (not GP) when there is an issue with the sentence it might still crash the nmea communication,. I hope Sean can have another look at this part. On the other hand I still haven't been able to do a seatrial with my modification so let me know.

If you are using fysical key's on the GPIO for control then the problem with the tacking might be that it seems to be responding to the LEFT and RIGHT (+/- 10 degrees/bigstep) key and not to the UP and DOWN key (+/- 1 degree/smallstep). With the current version you (at least i do) have only up and down. I would like to add the L/R keys to the GPIO (still some pins left) but I haven't figured out how in lcd.py one of the self.pins gets one of the seven keynames (pini?). Hope Sean or someone who has already done this can give some help. (perhaps L/R are not assigned as they are keynames 6 and 7 and there are only 5 self.pins).

Greetings Rob


Hi Rob
I apologize for not responding so quickly to your reply.
Last sunday I tried a test but got strange behaviours in GPS and WIND modes, both catching apparently random values.
Now I would recalibrate everything and retry ASAP, as I hadd some guest on board and I preferred to postpone it.
I will report on any result.
Regarding physichal keyboard, as a non-Python programmer,  I am following with interest the evolution from Your post and Sean's replies
Thanks a lot, bye
Francesco
Reply
#19
I am developing RF remotes. The typical remotes have only 4 buttons but you can press 2 or more of them at the same time. There is no screen so not making a menu with states.

Using 1 and 2 key presses there are 10 combinations or actions possible. If holding one while pressing others, depending also on release order many combinations are possible to support a lot of actions.
Reply
#20
Hi Francesco, and Sean,

Yesterday i got the chance to try out the old modifications as they are in this topic and can confirm that that one did work it steers to the waypoint (a bit wobly as it oversteers but that might be inproved by adjusting gains (did not have much time).

At the moment the source code has been totaly changed and Sean added my Pull request but I did forget a ":" after the try so it does not compile. sorry for that. my bad. should have compiled before putting it in a pull request but was to busy finding out how to do a pull request.

Sean, adding L/R to Gpio and RF remote is also great. did not know you can do double key's with the 4 key RF remote.

At my Raymarine +/-1 and +/-10 = tack R or L, seems logical to have the buttons +1,-1,+10,-10. Tacking could be as above, +1 and -1 could be auto and +10 and -10 could be change mode (c,g,w,t) or +10 and -10 = compas, +1 and -10 = gps and -1 and +10 =Wind but I'm sure you already have a plan for that. Looking foreward to this improvements.

Greetings Rob
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)