Closed BrentSeidel closed 8 years ago
The simplest solution may be to create a subdirectory /links to store symbolic links to the actual PWM devices. Then the set-protections.sh script can figure out which device is where and create the appropriate symbolic links. The Ada software can then use /link/pwm0 .. /link/pwm7. This is not an ideal solution as it creates a dependency on set-protections.sh, but it might work.
Updates to set-protections.sh were made to create the proper symbolic links. It seems to work. This is not an ideologically pure solution, but is pragmatic. Other updates were made as needed to use the new path names for the PWM devices.
It appears that Linux reorders the control files for the PWM units each time it boots. The PWM interface was written under the assumption that each PWM controller would always be found in the same place. Since this assumption is not valid, things will need to change to make this work consistently.