/**************************************************************************** Module CollisionModule.c Revision 1.0.1 Description This is a Collision detection file for ME218B Lab 8 for Team 3. Notes Private Definitions FRONT_LEFT_SWITCH_HI FRONT_RIGHT_SWITCH_HI REAR_LEFT_SWITCH_HI REAR_RIGHT_SWITCH_HI LastSwitchStates void InitializeCollisionDetection(void) ------------------------------------- // Sample the limit switch port pin and use it to initialize history bool LimitSwitchChecker(void) ----------------------------------------------- // grab the current switch line // check if front left limit switch depressed (and wasn't before) // if so: // set return value to be true // post that a limit switch was hit to debounce limit switch service // check if front right limit switch depressed (and wasn't before) // if so: // set return value to be true // post that a limit switch was hit to debounce limit switch service // check if rear left limit switch depressed (and wasn't before) // if so: // set return value to be true // post that a limit switch was hit to debounce limit switch service // check if rear right limit switch depressed (and wasn't before) // if so: // set return value to be true // post that a limit switch was hit to debounce limit switch service // reset the last state of the switches // return return value /***************************************************************************/