25#define DEBUG_PRINT(...) printf(__VA_ARGS__)
27#define DEBUG_PRINT(...)
59 uint16_t buffer_size);
66 uint16_t buffer_size);
int16_t a_star_maze_path_nav_to_buffer(maze_grid_t *p_grid, const a_star_path_t *p_path, const maze_navigator_state_t *p_navigator, uint8_t *p_buffer, uint16_t buffer_size)
Inserts the maze, path and navigator state into a buffer.
Definition: a_star.c:264
a_star_path_t * a_star_get_path(maze_grid_cell_t *p_end_node)
Get the path from the start node to the end node (inclusive).
Definition: a_star.c:108
int16_t a_star_path_to_buffer(const a_star_path_t *p_path, uint8_t *p_buffer, uint16_t buffer_size)
Inserts the path in coordinates from the start node to the end node into a buffer.
Definition: a_star.c:208
struct a_star_path a_star_path_t
Struct containing the path from the start node to the end node.
void a_star(maze_grid_t *p_grid, maze_grid_cell_t *p_start_node, maze_grid_cell_t *p_end_node)
Runs the A* algorithm on a grid maze to find the shortest path between two points,...
Definition: a_star.c:59
char * a_star_get_path_str(maze_grid_t *p_grid, a_star_path_t *p_path)
Gets the string representation of the path from the start node to the end node.
Definition: a_star.c:142
This file contains the declarations for the binary min-heap used in the a* algorithm.
Header file for the maze data structure and public functions.
Struct containing the path from the start node to the end node.
Definition: a_star.h:40
maze_grid_cell_t * p_path
Pointer to the first node in the path.
Definition: a_star.h:42
uint32_t length
Length of the path.
Definition: a_star.h:41
This struct contains the node information.
Definition: maze.h:91
This struct contains the maze grid information.
Definition: maze.h:113
This struct contains the state of a navigator in the maze.
Definition: maze.h:124