#include <stdlib.h>
#include "ch.h"
#include "hal.h"
};
};
#define LeftDrive1 kVexMotor_1
#define LeftDrive2 kVexMotor_2
#define LeftDrive3 kVexMotor_3
#define RightDrive4 kVexMotor_4
#define RightDrive5 kVexMotor_5
#define Mech1 kVexMotor_6
#define Mech2 kVexMotor_7
#define Mech3 kVexMotor_8
#define Mech4 kVexMotor_9
#define RightDrive10 kVexMotor_10
#define JUMPER_IN 0
#define JUMPER_OUT 1
void
{
}
void
{
int16_t mech1_lim_ccw = 0;
int16_t mech1_lim_cw = 0;
int16_t mech2_lim_ccw = 0;
int16_t mech2_lim_cw = 0;
int16_t mech3_lim_ccw = 0;
int16_t mech3_lim_cw = 0;
int16_t mech4_lim_ccw = 0;
int16_t mech4_lim_cw = 0;
int16_t drive_left = 0;
int16_t drive_right = 0;
int16_t drive_mech1 = 0;
int16_t drive_mech2 = 0;
int16_t drive_mech3 = 0;
int16_t drive_mech4 = 0;
while( !chThdShouldTerminate() )
{
{
}
else
{
}
else
{
}
else
{
}
if( ( !mech1_lim_cw && (drive_mech1 > 0)) || ( !mech1_lim_ccw && (drive_mech1 < 0)) )
drive_mech1 = 0;
if( ( !mech2_lim_cw && (drive_mech2 > 0)) || ( !mech2_lim_ccw && (drive_mech2 < 0)) )
drive_mech2 = 0;
if( ( !mech3_lim_cw && (drive_mech3 > 0)) || ( !mech3_lim_ccw && (drive_mech3 < 0)) )
drive_mech3 = 0;
if( ( !mech4_lim_cw && (drive_mech4 > 0)) || ( !mech4_lim_ccw && (drive_mech4 < 0)) )
drive_mech4 = 0;
}
}