Torque calculation added to leg readout

Dependencies:   AS5048 LCM101 MODSERIAL PinDetect SDFileSystem mbed

Fork of heros_leg_readout by Martijn Grootens

constants.cpp

Committer:
Technical_Muffin
Date:
2018-06-05
Revision:
3:3fd9f1a00381
Parent:
2:84d479fe9b5e

File content as of revision 3:3fd9f1a00381:

#include "constants.h"

namespace sensors {
    
    // LCM101-100kgf force sensor
    const float kLcm101Offset = -1.52;
    //This is currently the offset for the S610 sensor -5.41;
    //Offset for LCM101 sensor = -1.52
    const float kLcm101Factor = 970.55;
    //This is currently the factor for the S610 sensor 977.35;
    //Factor for LCM101 sensor is 970.55
        
    // AS5048 abs angle sensor chain
    const int kNumJoints = 4;

    const char *kJointNames[]     = {"Toes","Ankle","Knee","Hip"};
    const float kOffsetsDegrees[] = {83.2f,6.3f,170.7f,6.5f};
    const bool kDirections[] = {false,true,false,true};
}

namespace timing {
    const int kTimeControlUs            =   1000;   // 1000 Hz control loop
    const int kTimeLogDataUs            =  20000;   //   50 Hz data logging
    const int kTimeSerialPrintUs        = 500000;   //    2 Hz serial print
  
    const int kSerialBaudrate = 115200;
}