/***********************************************************************//**
 * @file		RobotControl.h
 * @brief		Contains tasks for robot control
 * @version		1.0
 * @date		21. April. 2014
 * @author		Michal Semrad
 **************************************************************************/

#ifndef ROBOTCTRL_H
#define ROBOTCTRL_H

#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "queue.h"
#include "timers.h"

#include "kinematic.h"
#include "SerialCOM.h"
#include "common.h"

#define MAX_PWM		61000
#define	MIN_PWM		14000

int PWMvalue_actual[6];		//actual PWM values
int speedp[6];				//particular speeds

void KinematicInit();

void MainConrolTask();
void AutomatModeTask();
void vSpeedControlTimer( xTimerHandle pxTimer );

void GoToStartPosition();
void ComputeTimeToWait();

#endif /*ROBOTCTRL_H*/
