DeepSpace  2019
RobotMap.h File Reference
#include <iostream>

Go to the source code of this file.

Macros

#define DODEBUG   0
 
#define ROBOT_PERIOD   0.02
 
#define ARM_CURRENT_THRESHOLD   35
 
#define ARM_CURRENT_HOLD   33
 
#define ARM_PEAK_TIMEOUT   0
 
#define ARM_CURRENT_TIMEOUT   30
 
#define CAMERASERVER_DRIVER_CAMERA   1
 
#define CAMERASERVER_VISION_CAMERA   0
 
#define DRIVETRAIN_LEFT_FRONT_MOTOR   1
 
#define DRIVETRAIN_LEFT_REAR_MOTOR   2
 
#define DRIVETRAIN_RIGHT_FRONT_MOTOR   3
 
#define DRIVETRAIN_RIGHT_REAR_MOTOR   4
 
#define TALLON_TPR   4096
 
#define ARCADE_KP   0.25
 
#define ARCADE_KI   0.0
 
#define ARCADE_KD   0.0
 
#define SLEW_LIMIT   0.15
 
#define R_SLEW_LIMIT   0.04
 
#define DRIVETRAIN_LEFT_FRONT_MOTOR_INVERT   false
 
#define DRIVETRAIN_LEFT_REAR_MOTOR_INVERT   false
 
#define DRIVETRAIN_RIGHT_FRONT_MOTOR_INVERT   true
 
#define DRIVETRAIN_RIGHT_REAR_MOTOR_INVERT   true
 
#define XBOX_DEADZONE_RIGHT_JOY   0.1
 
#define XBOX_DEADZONE_LEFT_JOY   0.1
 
#define CLIMB_ARM_MOTOR   5
 
#define CLIMB_ARM_MOTOR_2   7
 
#define CLIMB_LEG_MOTOR   8
 
#define CRAWL_LEFT_MOTOR   1
 
#define CRAWL_RIGHT_MOTOR   0
 
#define CLIMB_ULTRASONIC   1
 
#define OPTICAL_PIN   7
 
#define DRIVETRAIN_RADIAL_SENSITIVITY_CUTOFF   0.8
 
#define CLIMB_M   0.6
 
#define CLIMB_B   0.3
 
#define CLIMB_MAX_HEIGHT   100
 
#define LEG_PIN_TOP   1
 
#define LEG_PIN_MIDDLE   5
 
#define LEG_PIN_BOTTOM   6
 
#define ARM_PIN_LOWERED   4
 
#define ARM_HOLD_SPEED   0.2
 
#define LEG_HOLD_SPEED   0.1
 
#define SLIDER_MOTOR   6
 
#define PCM_CAN_ID   11
 
#define PISTON_ID   7
 
#define LIGHT_ID   0
 
#define LEDCONTROLLER_ID   2
 
#define HatchGripper_FORWARD_ID   1
 
#define HatchGripper_REVERSE_ID   2
 
#define FLAP_ID_FORWARD   5
 
#define FLAP_ID_REVERSE   6
 
#define DRIVEWITHJOYSTICK_ROTATION_LIMITER   0.95
 
#define XBOX_CONTROLLER_DRIVE_PORT   0
 
#define XBOX_CONTROLLER_OPERATOR_PORT   1
 
#define XBOX_CONTROLLER_DEBUG_PORT   2
 
#define False   false
 
#define True   true
 
#define elif   else if
 
#define Hand   frc::GenericHID::JoystickHand
 
#define WinGame(_class_)   frc::StartRobot<_class_>()
 
#define Header(x)   std::cout << x
 
#define EndHeader()   std::cout << "DONE" << std::endl
 

Macro Definition Documentation

◆ ARCADE_KD

#define ARCADE_KD   0.0

Definition at line 40 of file RobotMap.h.

◆ ARCADE_KI

#define ARCADE_KI   0.0

Definition at line 39 of file RobotMap.h.

◆ ARCADE_KP

#define ARCADE_KP   0.25

Definition at line 38 of file RobotMap.h.

◆ ARM_CURRENT_HOLD

#define ARM_CURRENT_HOLD   33

Definition at line 21 of file RobotMap.h.

◆ ARM_CURRENT_THRESHOLD

#define ARM_CURRENT_THRESHOLD   35

Definition at line 20 of file RobotMap.h.

◆ ARM_CURRENT_TIMEOUT

#define ARM_CURRENT_TIMEOUT   30

Definition at line 23 of file RobotMap.h.

◆ ARM_HOLD_SPEED

#define ARM_HOLD_SPEED   0.2

Definition at line 80 of file RobotMap.h.

◆ ARM_PEAK_TIMEOUT

#define ARM_PEAK_TIMEOUT   0

Definition at line 22 of file RobotMap.h.

◆ ARM_PIN_LOWERED

#define ARM_PIN_LOWERED   4

Definition at line 77 of file RobotMap.h.

◆ CAMERASERVER_DRIVER_CAMERA

#define CAMERASERVER_DRIVER_CAMERA   1

Definition at line 26 of file RobotMap.h.

◆ CAMERASERVER_VISION_CAMERA

#define CAMERASERVER_VISION_CAMERA   0

Definition at line 27 of file RobotMap.h.

◆ CLIMB_ARM_MOTOR

#define CLIMB_ARM_MOTOR   5

Definition at line 56 of file RobotMap.h.

◆ CLIMB_ARM_MOTOR_2

#define CLIMB_ARM_MOTOR_2   7

Definition at line 57 of file RobotMap.h.

◆ CLIMB_B

#define CLIMB_B   0.3

Definition at line 69 of file RobotMap.h.

◆ CLIMB_LEG_MOTOR

#define CLIMB_LEG_MOTOR   8

Definition at line 58 of file RobotMap.h.

◆ CLIMB_M

#define CLIMB_M   0.6

Definition at line 68 of file RobotMap.h.

◆ CLIMB_MAX_HEIGHT

#define CLIMB_MAX_HEIGHT   100

Definition at line 71 of file RobotMap.h.

◆ CLIMB_ULTRASONIC

#define CLIMB_ULTRASONIC   1

Definition at line 63 of file RobotMap.h.

◆ CRAWL_LEFT_MOTOR

#define CRAWL_LEFT_MOTOR   1

Definition at line 59 of file RobotMap.h.

◆ CRAWL_RIGHT_MOTOR

#define CRAWL_RIGHT_MOTOR   0

Definition at line 60 of file RobotMap.h.

◆ DODEBUG

#define DODEBUG   0

The RobotMap is a mapping from the ports sensors and actuators are wired into to a variable name. This provides flexibility changing wiring, makes checking the wiring easier and significantly reduces the number of magic numbers floating around.

Definition at line 15 of file RobotMap.h.

◆ DRIVETRAIN_LEFT_FRONT_MOTOR

#define DRIVETRAIN_LEFT_FRONT_MOTOR   1

Definition at line 30 of file RobotMap.h.

◆ DRIVETRAIN_LEFT_FRONT_MOTOR_INVERT

#define DRIVETRAIN_LEFT_FRONT_MOTOR_INVERT   false

Definition at line 46 of file RobotMap.h.

◆ DRIVETRAIN_LEFT_REAR_MOTOR

#define DRIVETRAIN_LEFT_REAR_MOTOR   2

Definition at line 31 of file RobotMap.h.

◆ DRIVETRAIN_LEFT_REAR_MOTOR_INVERT

#define DRIVETRAIN_LEFT_REAR_MOTOR_INVERT   false

Definition at line 47 of file RobotMap.h.

◆ DRIVETRAIN_RADIAL_SENSITIVITY_CUTOFF

#define DRIVETRAIN_RADIAL_SENSITIVITY_CUTOFF   0.8

Definition at line 65 of file RobotMap.h.

◆ DRIVETRAIN_RIGHT_FRONT_MOTOR

#define DRIVETRAIN_RIGHT_FRONT_MOTOR   3

Definition at line 32 of file RobotMap.h.

◆ DRIVETRAIN_RIGHT_FRONT_MOTOR_INVERT

#define DRIVETRAIN_RIGHT_FRONT_MOTOR_INVERT   true

Definition at line 48 of file RobotMap.h.

◆ DRIVETRAIN_RIGHT_REAR_MOTOR

#define DRIVETRAIN_RIGHT_REAR_MOTOR   4

Definition at line 33 of file RobotMap.h.

◆ DRIVETRAIN_RIGHT_REAR_MOTOR_INVERT

#define DRIVETRAIN_RIGHT_REAR_MOTOR_INVERT   true

Definition at line 49 of file RobotMap.h.

◆ DRIVEWITHJOYSTICK_ROTATION_LIMITER

#define DRIVEWITHJOYSTICK_ROTATION_LIMITER   0.95

Definition at line 103 of file RobotMap.h.

◆ elif

#define elif   else if

Definition at line 113 of file RobotMap.h.

◆ EndHeader

#define EndHeader ( )    std::cout << "DONE" << std::endl

Definition at line 122 of file RobotMap.h.

◆ False

#define False   false

Definition at line 111 of file RobotMap.h.

◆ FLAP_ID_FORWARD

#define FLAP_ID_FORWARD   5

Definition at line 99 of file RobotMap.h.

◆ FLAP_ID_REVERSE

#define FLAP_ID_REVERSE   6

Definition at line 100 of file RobotMap.h.

◆ Hand

#define Hand   frc::GenericHID::JoystickHand

Definition at line 116 of file RobotMap.h.

◆ HatchGripper_FORWARD_ID

#define HatchGripper_FORWARD_ID   1

Definition at line 96 of file RobotMap.h.

◆ HatchGripper_REVERSE_ID

#define HatchGripper_REVERSE_ID   2

Definition at line 97 of file RobotMap.h.

◆ Header

#define Header (   x)    std::cout << x

Definition at line 121 of file RobotMap.h.

◆ LEDCONTROLLER_ID

#define LEDCONTROLLER_ID   2

Definition at line 93 of file RobotMap.h.

◆ LEG_HOLD_SPEED

#define LEG_HOLD_SPEED   0.1

Definition at line 81 of file RobotMap.h.

◆ LEG_PIN_BOTTOM

#define LEG_PIN_BOTTOM   6

Definition at line 76 of file RobotMap.h.

◆ LEG_PIN_MIDDLE

#define LEG_PIN_MIDDLE   5

Definition at line 75 of file RobotMap.h.

◆ LEG_PIN_TOP

#define LEG_PIN_TOP   1

Definition at line 74 of file RobotMap.h.

◆ LIGHT_ID

#define LIGHT_ID   0

Definition at line 92 of file RobotMap.h.

◆ OPTICAL_PIN

#define OPTICAL_PIN   7

Definition at line 64 of file RobotMap.h.

◆ PCM_CAN_ID

#define PCM_CAN_ID   11

Definition at line 87 of file RobotMap.h.

◆ PISTON_ID

#define PISTON_ID   7

Definition at line 89 of file RobotMap.h.

◆ R_SLEW_LIMIT

#define R_SLEW_LIMIT   0.04

Definition at line 43 of file RobotMap.h.

◆ ROBOT_PERIOD

#define ROBOT_PERIOD   0.02

Definition at line 17 of file RobotMap.h.

◆ SLEW_LIMIT

#define SLEW_LIMIT   0.15

Definition at line 42 of file RobotMap.h.

◆ SLIDER_MOTOR

#define SLIDER_MOTOR   6

Definition at line 84 of file RobotMap.h.

◆ TALLON_TPR

#define TALLON_TPR   4096

Definition at line 35 of file RobotMap.h.

◆ True

#define True   true

Definition at line 112 of file RobotMap.h.

◆ WinGame

#define WinGame (   _class_)    frc::StartRobot<_class_>()

Definition at line 119 of file RobotMap.h.

◆ XBOX_CONTROLLER_DEBUG_PORT

#define XBOX_CONTROLLER_DEBUG_PORT   2

Definition at line 108 of file RobotMap.h.

◆ XBOX_CONTROLLER_DRIVE_PORT

#define XBOX_CONTROLLER_DRIVE_PORT   0

Definition at line 106 of file RobotMap.h.

◆ XBOX_CONTROLLER_OPERATOR_PORT

#define XBOX_CONTROLLER_OPERATOR_PORT   1

Definition at line 107 of file RobotMap.h.

◆ XBOX_DEADZONE_LEFT_JOY

#define XBOX_DEADZONE_LEFT_JOY   0.1

Definition at line 53 of file RobotMap.h.

◆ XBOX_DEADZONE_RIGHT_JOY

#define XBOX_DEADZONE_RIGHT_JOY   0.1

Definition at line 52 of file RobotMap.h.