2017-05-25, 12:47 AM
(2017-05-24, 07:50 PM)PaddyB Wrote: Trying to break it put it keeps on working....???Thanks for that clue. Interesting I checked the conf file and for some reason the script name in my conf file had a newline character on the end "....../mob.sh\n'" I have no idea what put that there it wasn't me and wasn't showing in the command in the actions panel of OP.
Cleaned out all the other actions and gpio pin definitions.
Here's what I have from openplotter.conf
I short gpio pin 26 to ground and opencpn drops a waypoint at the boat gps position.
[GPIO]
sensors = [[u'test', 'in', u'26', u'up']]
________________
[ACTIONS]
triggers = [[1, u'sensors.test.value', 2, '0', [['ACT2', 'sudo /home/pi/scripts/dropmark.sh', 0.0, 0]]]]
Anyway I manually deleted the \n and everything now works as advertised.
In the attached image I have pushed the red button on the left, top, of my plotter; the MOB marker has appeared and the alarm switch (top right) has illuminated. Pushing the illuminated switch cancels the alarm.
Other actions will be configured to sound alarms too. Ideally AIS CP etc.. but that is another story.
Cheers