16 #define DECIMATION 10 // Decimate the data if necessary 17 #define REFERENCE_DATA 10000 // Reference data for trajectory tracking 18 #define BUFLEN 10000 // Actual data; sent to client using circular buffer 39 int refPos[REFERENCE_DATA];
197 void buffer_write(
int M1_actPos,
int M2_actPos,
int M1_u,
int M2_u);
int maxInt(int a, int b)
returns the large value of the two
Definition: Utilities.c:158
Definition: Utilities.h:31
void setMODE(mode newMODE)
Sets the Mode of the robot.
Definition: Utilities.c:24
int get_refPos(int index, int motor)
Gets the reference position.
Definition: Utilities.c:60
int buffer_full(void)
Returns true if the buffer is full.
Definition: Utilities.c:78
Definition: Utilities.h:25
int boundInt(int a, int n)
Bounds a given input to a range of values.
Definition: Utilities.c:144
Definition: Utilities.h:38
void write_refPos(int position, int index, int motor)
Writes the reference position.
Definition: Utilities.c:48
void setN(void)
Receive number N of samples to save into data buffer.
Definition: Utilities.c:32
Definition: Utilities.h:24
Definition: Utilities.h:27
int getN(void)
Returns the number of samples.
Definition: Utilities.c:44
Definition: Utilities.h:29
void setNclient(int n)
Recieve number of values to store in position data arrays from client.
Definition: Utilities.c:39
Definition: Utilities.h:30
Definition: Utilities.h:28
int buffer_empty(void)
Returns true if the buffer is empty.
Definition: Utilities.c:74
void buffer_write(int M1_actPos, int M2_actPos, int M1_u, int M2_u)
Write data to buffer.
Definition: Utilities.c:116
int buffer_read_u(int motor)
Reads current value from current buffer location.
Definition: Utilities.c:95
mode
Definition: Utilities.h:23
int buffer_read_position(int motor)
Reads position from the current buffer location.
Definition: Utilities.c:82
mode getMODE()
Return the Mode of the robot.
Definition: Utilities.c:28
void buffer_read_increment(void)
Increments the buffer read index.
Definition: Utilities.c:109
void send_data(void)
Send data to client when it becomes available.
Definition: Utilities.c:129
Definition: Utilities.h:26