Rleg  2
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Functions
calibration.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "communication/communication.h"
#include "calibration.h"
Include dependency graph for calibration.c:

Go to the source code of this file.

Functions

void calibrate_all (IMU_DATA_STRUCT *imu_data)
 Calibrate all sensors. More...
 
void calibrate_imu (IMU_DATA_STRUCT *imu_data)
 Calibrate imu sensors. More...
 
void calibrate_enc (ENC_DATA_STRUCT *enc_data)
 Calibrate encoder to return values in the rage of 0 to 90. More...
 

Function Documentation

void calibrate_enc ( ENC_DATA_STRUCT enc_data)

Calibrate encoder to return values in the rage of 0 to 90.

Definition at line 35 of file calibration.c.

References ENC_DATA_STRUCT::calib, ENC_FS, ENC_MAX, ENC_DATA_STRUCT::position, and ENC_DATA_STRUCT::calibrate::position.

35  {
36  enc_data->calib.position = ((ENC_MAX - enc_data->position)/ENC_FS);
37 }
#define ENC_MAX
Definition: calibration.h:39
#define ENC_FS
Definition: calibration.h:38
struct ENC_DATA_STRUCT::calibrate calib
unsigned short int position
unsigned short int position