/****************************************************
 *  GyroSensor.c                                         
 *  Created on: 2012/04/17 11:41:23                      
 *  Implementation of the Class GyroSensor       
 *  Original author: hiroyuki.watanabe                     
 ****************************************************/

#include "ecrobot_interface.h"
#include <string.h>
#include <stdlib.h>

#include "GyroSensor.h"
#define GYRO_OFFSET  610

void GyroSensor_init(GyroSensor* this, INPUT_PORT a_inputPort)
{
	this->inputPort = a_inputPort;
	this->offset = GYRO_OFFSET;
}

unsigned int GyroSensor_getAngularVelocity(GyroSensor* this)
{
	return ecrobot_get_gyro_sensor(this->inputPort);
}

unsigned int GyroSensor_getOffset(GyroSensor* this)
{
	return this->offset;
} 




