Project

General

Profile

Revision 1429

updated library binaries and included header files

View differences:

trunk/code/lib/include/libdragonfly/motor.h
51 51

  
52 52
/** @brief Initialize the motors **/
53 53
void motors_init(void);
54
/** @brief Set speed and direction of motor1 **/
54
/** @brief Set speed and direction of motor1 
55
 *  @deprecated use the left motor function instead. it's more intuitive and easier to read.**/
55 56
void motor1_set(int direction, int speed);
56
/** @brief Set speed and direction of motor2 **/
57
/** @brief Set speed and direction of motor2 
58
 *  @deprecated use the right motor function instead. it's more intuitive and easier to read.**/
57 59
void motor2_set(int direction, int speed);
60
/** @brief Set speed and direction of left motor **/
61
void motor_l_set(int direction, int speed);
62
/** @brief Set speed and direction of right motor **/
63
void motor_r_set(int direction, int speed);
58 64
/** @brief Turn the motors off **/
59 65
void motors_off(void);
60 66

  
trunk/code/lib/include/libdragonfly/encoders.h
28 28
	#define RIGHT 1
29 29
#endif
30 30

  
31
/** @brief Max value of valid encoder reading. **/
32
#define ENCODER_MAX 1024
33

  
31 34
/** @brief Magnet misaligned - likely distance from encoder problem. **/
32 35
#define ENCODER_MAGNET_FAILURE 1025
33 36
/** @brief Encoder misaligned - likely on XY plane. **/
......
49 52
#define MagDECn _BV(0)
50 53

  
51 54
/** @brief Buffer size **/
52
#define BUFFER_SIZE 23
55
#define BUFFER_SIZE 46
53 56

  
57
#define ERR_VEL 1024
58

  
54 59
/** @brief Initialize encoders. **/
55 60
void encoders_init(void);
56 61
/** @brief Read instantaneous encoder value. **/
57 62
int encoder_read(char encoder);
58 63

  
64
/** @brief Get total distance traveled.
65
 *  @note  Simply calls encoder_get_dx.
66
 **/
67
int encoder_get_x(char encoder);
68

  
69
/** @brief Get instantaneous velocity. **/
70
int encoder_get_v(char encoder);
71

  
59 72
/** @brief Get total distance traveled. **/
60 73
int encoder_get_dx(char encoder);
61 74
/** @brief Reset distance counter. **/
trunk/code/lib/include/libdragonfly/dragonfly_lib.h
64 64
#define RANGE  0x0100
65 65
/** @brief Initialize the BOM **/
66 66
#define BOM  0x0200
67
/** @brief Initilize encoders **/
68
#define ENCODERS 0x400
67 69
/** @brief Initialize everything  **/
68
#define ALL_ON 0x03FF
70
#define ALL_ON 0x07FF
69 71

  
70 72
/** @brief Initialize the board **/
71 73
void dragonfly_init(int config);
......
94 96
#include <buzzer.h>
95 97
#include <rangefinder.h>
96 98
#include <bom.h>
99
#include <encoders.h>
97 100
#include <move.h>
98 101
#include <reset.h>
99 102
#include <math.h>
trunk/code/lib/include/libdragonfly/bom.h
71 71
/** @brief Enables the selected bom leds on a BOM1.5 **/
72 72
void bom_set_leds(int bit_field);
73 73

  
74
/** @brief (DEPRECATED) Gets and compares all bom values.  Returns the index to the highest value element. **/
74
/** @brief (DEPRECATED) Gets and compares all bom values.  Returns the index to the highest value element since last refresh. **/
75 75
int get_max_bom(void);
76 76

  
77 77
/** @brief Turns on all BOM leds, or turns on enabled leds on a BOM1.5. **/

Also available in: Unified diff