You need a second set of switch contacts so that Dave can monitor the battery switch state. With the associated log file, of course. (and a ROS2_Dave “is the switch on?” node too.)[1]
Seems like this is getting too complicated for its own good. Unless you’re planning to send Dave to Mars. (!!)
=============== Footnotes ===============
If it works, maybe you should back-port this to Carl?
The whole power system is such a kludge, not going to “rearrange the chairs …”. I do not need to turn off the battery, only shutdown -h and press the GoPiGo3 power switch to finish the power off.
Carl’s “juicer” program has a heuristics rule set that is smarter, and Carl only has one power switch - no battery switch on his 8x NiMH system.