![]() |
Clawbot demo code. More...
#include <stdlib.h>#include "ch.h"#include "hal.h"#include "vex.h"#include "smartmotor.h"#include "robotc_glue.h"#include "clawbot.h"Macros | |
| #define | MotorDriveR kVexMotor_1 |
| #define | MotorArm kVexMotor_8 |
| #define | MotorClaw kVexMotor_9 |
| #define | MotorDriveL kVexMotor_10 |
| #define | armPot kVexAnalog_1 |
| #define | clawPot kVexAnalog_2 |
| #define | ARM_UPPER_LIMIT 2000 |
| #define | ARM_LOWER_LIMIT 600 |
| #define | ARM_PRESET_H 2000 |
| #define | ARM_PRESET_L 650 |
| #define | CLAW_OPEN_HIGH_SPEED 80 |
| #define | CLAW_CLOSE_HIGH_SPEED -80 |
| #define | CLAW_OPEN_LOW_SPEED 20 |
| #define | CLAW_CLOSE_LOW_SPEED -15 |
Enumerations | |
| enum | clawCommand { kClawNoCommand = 0, kClawOpenCommand, kClawCloseCommand, kClawStopCommand } |
Functions | |
| void | DriveSystemArcadeDrive (short forward, short turn) |
| task | DriveTask (void *arg) |
| task | ArmPidController (void *arg) |
| task | ClawController (void *arg) |
| task | ManualArmClawTask (void *arg) |
| void | vexUserSetup () |
| void | vexUserInit () |
| msg_t | vexAutonomous (void *arg) |
| msg_t | vexOperator (void *arg) |
Variables | |
| clawCommand | clawCmd = kClawNoCommand |
Clawbot demo code.
| #define MotorDriveR kVexMotor_1 |
| #define MotorArm kVexMotor_8 |
| #define MotorClaw kVexMotor_9 |
| #define MotorDriveL kVexMotor_10 |
| #define armPot kVexAnalog_1 |
| #define clawPot kVexAnalog_2 |
| #define ARM_UPPER_LIMIT 2000 |
| #define ARM_LOWER_LIMIT 600 |
| #define ARM_PRESET_H 2000 |
| #define ARM_PRESET_L 650 |
| #define CLAW_OPEN_HIGH_SPEED 80 |
| #define CLAW_CLOSE_HIGH_SPEED -80 |
| #define CLAW_OPEN_LOW_SPEED 20 |
| #define CLAW_CLOSE_LOW_SPEED -15 |
| enum clawCommand |
| Enumerator | |
|---|---|
| kClawNoCommand | |
| kClawOpenCommand | |
| kClawCloseCommand | |
| kClawStopCommand | |
| void DriveSystemArcadeDrive | ( | short | forward, |
| short | turn | ||
| ) |
| void vexUserSetup | ( | void | ) |
| void vexUserInit | ( | void | ) |
| msg_t vexAutonomous | ( | void * | arg) |
| msg_t vexOperator | ( | void * | arg) |
| clawCommand clawCmd = kClawNoCommand |