Commit 5933077f authored by Arnaud Cadot's avatar Arnaud Cadot

Updated values for KJ servos

parent 814fe1f2
......@@ -8,8 +8,8 @@
*/
class KJ2016Tempo
{
static const float KJ_INTERAXIS = 100.f; // To update
static const float KJ_WHEEL_DIAMETER = 60.f;
static const float KJ_INTERAXIS = 132.f; // To update
static const float KJ_WHEEL_DIAMETER = 70.f;
static const float SERVO_MAX_RPM = 59.f;
public:
......
......@@ -10,21 +10,21 @@ class FishingNet
/**
* The ID of the innermost AX12 (i.e. for rotation)
*/
static const int SERVO_INT_ID = 0; // To update
static const int SERVO_INT_ID = 42; // To update
/**
* The ID of the outermost AX12 (i.e. for folding/unfolding)
*/
static const int SERVO_EXT_ID = 1;
static const int SERVO_EXT_ID = 16;
/**
* Those constantes are angles sent to the relevant servos for the relevant action (names are pretty explicit)
*/
static const int SERVO_EXT_CLOSED_POS = 0x00;
static const int SERVO_EXT_DEPLOYED_POS = 0x00;
static const int SERVO_EXT_RAISED_POS = 0x00;
static const int SERVO_EXT_CLOSED_POS = 0x0339;
static const int SERVO_EXT_DEPLOYED_POS = 0x0200;
static const int SERVO_EXT_RAISED_POS = 0x0240;
static const int SERVO_INT_RAISED_POS = 0x00;
static const int SERVO_INT_LOWERED_POS = 0x00;
static const int SERVO_INT_RAISED_POS = 0x0200;
static const int SERVO_INT_LOWERED_POS = 0x00C3;
public:
enum NET_STATE
......
......@@ -20,8 +20,8 @@ void KJ2016Tempo::run(bool isYellow)
{
/** ID for the driving servos **/
/* Left and right is relative to the starting position */
const unsigned int SERVO_ONE_ID = 0;
const unsigned int SERVO_TWO_ID = 1;
const unsigned int SERVO_ONE_ID = 69;
const unsigned int SERVO_TWO_ID = 15;
KJ2016Tempo KJ(isYellow?SERVO_ONE_ID:SERVO_TWO_ID, isYellow?SERVO_TWO_ID:SERVO_ONE_ID);
......@@ -97,10 +97,13 @@ void KJ2016Tempo::move(int distance)
void KJ2016Tempo::waitForArrival(unsigned int duration)
{
static const unsigned int sensorCheckDelay = Clock::MS_PER_TICK * 10;
unsigned int sensorCheckDelay = Clock::MS_PER_TICK * 10;
while(true)
{
if(sensorCheckDelay > duration)
sensorCheckDelay = duration;
unsigned int t = Clock::delay(sensorCheckDelay);
if(t >= duration)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment