Are you using a Robotics IDE (ROBOTC, EasyC, etc.), or are you using a regular C editor? I've found EasyC to be just that, easy. If you are this early on in the programming, you can still switch over to EasyC (or another), and have that much already taken care of for the programming, so you can focus on other things like figuring out the best way to pull off Hybrid Mode.
In EasyC, you could do it in about 6 lines of code.
EDIT: By the way, yes; the p1_wheel does refer to the "hat", and I believe that there is also p1_sw_thumb for the thumb button (or would that be what p1_sw_top goes to?)
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)