fan on/off handling code (done with high-side P-channel mosfet switching)