Conversation
And ensure that the gpio c-bindings are present on the image
System config files in the overlay dir get synced to the etc/ dir on the image.
ThirteenFish
left a comment
There was a problem hiding this comment.
Looks good, just a handful of things that could be improved since we're touching these files anyway.
| ExecStart=/usr/bin/python3 -m stationd --config /etc/config/stationd.ini | ||
| ExecStartPost=/usr/bin/sleep 5 | ||
| ExecStartPost=/home/uniclogs/bin/stationc.sh "radio-host power on" "rotator power on" | ||
| ExecStartPost=/usr/bin/sleep 30 |
There was a problem hiding this comment.
We don't need this final sleep 30. We probably also don't need the sleep 5 but this raises an interesting question, how soon after starting stationd can we start talking to it?
There was a problem hiding this comment.
Is that something you'd like tested explicitly when we get this uploaded onto our station hardware?
There was a problem hiding this comment.
Sure. We can probably also do something clever eventually to not have to empirically test this and have it just work by sending the command without waiting (probably something with systemd sockets).
On the other hand I'd be happy for now with even with just a quick check that it works either without a sleep or with a sleep 1, no need to go too overboard yet.
There was a problem hiding this comment.
This script can probably be replaced by iio_readdev from the package libiio-utils but I've not yet tested it. We may want to make a note in some kind of documentation though that the device exists and how to access it. We don't really have an operators manual yet though, but something that lists all the devices and how to interact with them might be nice in the future.
| # Restart HamLib rotctld when the rotator controller is connected | ||
| # Be sure to change the serial number from xxxxxxxx to your serial number! | ||
| # Try `ls /dev/tty_FTDI_*` for a list of potentials | ||
| SUBSYSTEM=="tty",SUBSYSTEMS=="usb",DRIVERS=="usb",ACTION=="add",ATTRS{product}=="FT232R USB UART",ATTRS{serial}=="xxxxxxxx",TAG+="systemd",ENV{SYSTEMD_WANTS}="rotctld.service",RUN+="/usr/bin/systemctl restart rotctld" |
There was a problem hiding this comment.
The RUN+="/usr/bin/systemctl restart rotctld" action here isn't a great way of doing this, instead the rotctld.service [Unit] section should have BindsTo=dev-tty_FTDI_xxxxxxxx.device. That will ensure that rotctld is stopped when the rotator goes away.
There was a problem hiding this comment.
I've removed the RUN+= snippet from this rules file and added the BindsTo directive to systemd.
Changes
bcprogram for theget-temp.shscript