TrekkingPhoenix / Mbed 2 deprecated TrekkingControllerV1-4_WinterChallenge20

Dependencies:   mbed mbed-rtos MotionSensor EthernetInterface

Protocol/protocol.h

Committer:
drelliak
Date:
2016-04-11
Revision:
0:88faaa1afb83
Child:
8:a1067fcde341

File content as of revision 0:88faaa1afb83:

/*
Copyright 2016 Erik Perillo <erik.perillo@gmail.com>

This file is part of piranha-ptc.

This is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef __PIRANHA_PROTOCOL_H__
#define __PIRANHA_PROTOCOL_H__

#define PI 3.141593

//pid values range
#define PID_PARAMS_MIN -100.0
#define PID_PARAMS_MAX 100.0

//ground speed range
#define GND_SPEED_MIN -100.0
#define GND_SPEED_MAX 100.0

//angle reference range (in radians)
#define ANG_REF_MIN -PI
#define ANG_REF_MAX PI

//messages to send via protocol
enum
{
    //do nothing
    NONE,
    //brake the robot
    BRAKE,
    //reset angle measure
    ANG_RST,
    //set new angle reference
    ANG_REF,
    //set new ground speed for robot
    GND_SPEED,
    //send pid control parameters
    PID_PARAMS
};

#endif