Modified version of the UKESF lab source which can be carried out with no knowledge of C

Fork of PsiSwarm-Headstart by UKESF Headstart Summer School

Committer:
YRL50
Date:
Fri Sep 14 16:00:48 2018 +0000
Revision:
5:f6be169e465b
Parent:
4:dc77a25f29de
Fixing compile warnings

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d6269d17c8cf 1 /* University of York Robotics Laboratory PsiSwarm Library: Motor Functions Header File
jah128 0:d6269d17c8cf 2 *
jah128 0:d6269d17c8cf 3 * File: motors.h
jah128 0:d6269d17c8cf 4 *
jah128 0:d6269d17c8cf 5 * (C) Dept. Electronics & Computer Science, University of York
jah128 0:d6269d17c8cf 6 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
jah128 0:d6269d17c8cf 7 *
jah128 4:dc77a25f29de 8 * PsiSwarm Library Version: 0.5
jah128 0:d6269d17c8cf 9 *
jah128 4:dc77a25f29de 10 * April 2016
jah128 0:d6269d17c8cf 11 *
jah128 0:d6269d17c8cf 12 *
jah128 0:d6269d17c8cf 13 */
jah128 0:d6269d17c8cf 14
jah128 0:d6269d17c8cf 15 #ifndef MOTORS_H
jah128 0:d6269d17c8cf 16 #define MOTORS_H
jah128 0:d6269d17c8cf 17
jah128 4:dc77a25f29de 18 void set_motor_speed(float left_motor_speed, float right_motor_speed);
jah128 0:d6269d17c8cf 19 void set_left_motor_speed(float speed);
jah128 0:d6269d17c8cf 20 void set_right_motor_speed(float speed);
jah128 0:d6269d17c8cf 21 void brake_left_motor(void);
jah128 0:d6269d17c8cf 22 void brake_right_motor(void);
jah128 0:d6269d17c8cf 23 void brake(void);
jah128 0:d6269d17c8cf 24 void stop(void);
jah128 0:d6269d17c8cf 25 void forward(float speed);
jah128 0:d6269d17c8cf 26 void backward(float speed);
jah128 0:d6269d17c8cf 27 void turn(float speed);
jah128 0:d6269d17c8cf 28
jah128 0:d6269d17c8cf 29 // New time based functions (library v0.3)
jah128 0:d6269d17c8cf 30 void time_based_forward(float speed, int microseconds, char brake);
jah128 0:d6269d17c8cf 31 void time_based_turn(float speed, int microseconds, char brake);
jah128 0:d6269d17c8cf 32 int time_based_turn_degrees(float speed, float degrees, char brake);
jah128 0:d6269d17c8cf 33 float get_maximum_turn_angle(int microseconds);
jah128 0:d6269d17c8cf 34 int get_time_based_turn_time(float speed, float degrees);
jah128 0:d6269d17c8cf 35 void IF_check_time_for_existing_time_based_action();
jah128 0:d6269d17c8cf 36 void IF_end_time_based_action();
jah128 0:d6269d17c8cf 37
jah128 0:d6269d17c8cf 38 void IF_update_motors();
jah128 4:dc77a25f29de 39 float IF_calibrated_left_speed(float speed);
jah128 4:dc77a25f29de 40 float IF_calibrated_right_speed(float speed);
jah128 0:d6269d17c8cf 41 float IF_calibrated_speed(float speed);
jah128 0:d6269d17c8cf 42 void IF_init_motors(void);
jah128 0:d6269d17c8cf 43
jah128 0:d6269d17c8cf 44 #endif