As I've just been tweaking my v2.7 config to add the MDI/Manual switcheroo functionality back in, I thought I'd update the thread for anyone else that wants to do the same.
Firstly, in 2.7 axis seems to nicely follow the MDI/Manual modes so my patch mentioned previously in this thread isn't needed, all you have to do is configure some hal stuff. Secondly I made use of the named thingies (toggle_mode.in instead of toggle.3.in) which makes it all more readable.
In your custom.hal file add
Code:
loadrt toggle names=toggle_mode
addf toggle_mode servo-thread
loadrt toggle2nist names=toggle2nist_mode
addf toggle2nist_mode servo-thread
Then in custom_postgui.hal add:
Code:
net tog_mode xhc-hb04.button-mode => toggle_mode.in
net tog_mode_out toggle_mode.out => toggle2nist_mode.in
net is_mode_mdi halui.mode.is-mdi => toggle2nist_mode.is-on
net flip_to_mdi toggle2nist_mode.on => halui.mode.mdi
net flip_to_manual toggle2nist_mode.off => halui.mode.manual
Now pressing the MPG/Mode button on the HB04 pendant toggles between MDI(F5) and Manual(F3) in axis.