![]() |
master board program
v. 2 - 2018
|
#include "lines.h"
Macros | |
#define | PI 3.14159 |
#define | SQRT3 1.7321 |
Functions | |
int32_t | abs_int (int32_t x) |
int32_t | max (int32_t x, int32_t y) |
void | calculation_of_motor_speeds (void) |
void | determine_avoiding_direction (void) |
void | calibrate_lines (void) |
void | end_line_calibration (void) |
msg_t | check_line_mailbox (void) |
void | send_to_line_mailbox (msg_t sending_command) |
THD_WORKING_AREA (waLineThread, 128) | |
THD_FUNCTION (LineThread, arg) | |
msg_t | check_line (void) |
msg_t | calibration_memory (msg_t command) |
THD_WORKING_AREA (waLineSaveThread, 128) | |
THD_FUNCTION (LineSaveThread, arg) | |
THD_WORKING_AREA (waLineCalibrationSaveThread, 128) | |
THD_FUNCTION (LineCalibrationSaveThread, arg) | |
void | line_init (void) |
Variables | |
thread_t * | line_save_thread |
thread_t * | line_calibration_save_thread |
msg_t | msg |
static msg_t | line_commands_queue [LINE_QUEUE] |
static mailbox_t | line_commands |
adcsample_t | line_sensors_values [NUMBER_OF_SENSORS] |
uint16_t | min_line_sensors_values [NUMBER_OF_SENSORS] |
uint16_t | max_line_sensors_values [NUMBER_OF_SENSORS] |
uint16_t | average_line_sensors_values [NUMBER_OF_SENSORS] |
uint8_t | line_calibration_values_out [NUMBER_OF_SENSORS] |
uint8_t | line_calibration_values_in [NUMBER_OF_SENSORS] |
int32_t | line_motor_speeds [NUMBER_OF_MOTORS] |
static int16_t | dx [16] = {83, 56, 20, -20, -56, -83, -98, -98, -83, -56, -20, 20, 56, 83, 98, 98} |
static int16_t | dy [16] = {56, 83, 98, 98, 83, 56, 20, -20, -56, -83, -98, -98, -83, -56, -20, 20} |
static int16_t | line_result |
static int16_t | old_line_result = NO_LINE_DETECTED |
static int32_t | res_x |
static int32_t | res_y |
static int32_t | res_max |
static int32_t | old_x |
static int32_t | old_y |
static int32_t | old_max |
uint32_t | line_timer = LINE_REACTION_TIME |
uint32_t | line_calibration_timer = LINE_CALIBRATION_TIME |
int8_t | line_calibration_state = 0 |
static const ADCConversionGroup | line_sensors_cfg1 |
static const ADCConversionGroup | line_sensors_cfg2 |
static const ADCConversionGroup | line_sensors_cfg3 |
static const ADCConversionGroup | line_sensors_cfg |
#define PI 3.14159 |
#define SQRT3 1.7321 |
int32_t abs_int | ( | int32_t | x | ) |
void calculation_of_motor_speeds | ( | void | ) |
void calibrate_lines | ( | void | ) |
msg_t calibration_memory | ( | msg_t | command | ) |
msg_t check_line | ( | void | ) |
msg_t check_line_mailbox | ( | void | ) |
void determine_avoiding_direction | ( | void | ) |
void end_line_calibration | ( | void | ) |
void line_init | ( | void | ) |
int32_t max | ( | int32_t | x, |
int32_t | y | ||
) |
void send_to_line_mailbox | ( | msg_t | sending_command | ) |
THD_FUNCTION | ( | LineThread | , |
arg | |||
) |
THD_FUNCTION | ( | LineSaveThread | , |
arg | |||
) |
THD_FUNCTION | ( | LineCalibrationSaveThread | , |
arg | |||
) |
THD_WORKING_AREA | ( | waLineThread | , |
128 | |||
) |
THD_WORKING_AREA | ( | waLineSaveThread | , |
128 | |||
) |
THD_WORKING_AREA | ( | waLineCalibrationSaveThread | , |
128 | |||
) |
uint16_t average_line_sensors_values[NUMBER_OF_SENSORS] |
|
static |
|
static |
thread_t* line_calibration_save_thread |
int8_t line_calibration_state = 0 |
uint32_t line_calibration_timer = LINE_CALIBRATION_TIME |
uint8_t line_calibration_values_in[NUMBER_OF_SENSORS] |
uint8_t line_calibration_values_out[NUMBER_OF_SENSORS] |
|
static |
|
static |
int32_t line_motor_speeds[NUMBER_OF_MOTORS] |
|
static |
thread_t* line_save_thread |
|
static |
|
static |
|
static |
|
static |
adcsample_t line_sensors_values[NUMBER_OF_SENSORS] |
uint32_t line_timer = LINE_REACTION_TIME |
uint16_t max_line_sensors_values[NUMBER_OF_SENSORS] |
uint16_t min_line_sensors_values[NUMBER_OF_SENSORS] |
msg_t msg |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |