Koala Library
|
Useful functions of the libkoala. More...
Go to the source code of this file.
Functions | |
int | koala_kbhit (void) |
void | koala_change_term_mode (int dir) |
void | koala_clrscr (void) |
void | koala_erase_line (int line) |
void | koala_move_cursor (int c, int l) |
void | koala_move_cursor_column (int c) |
void | koala_move_cursor_line (int l) |
long long | koala_timeval_diff (struct timeval *difference, struct timeval *end_time, struct timeval *start_time) |
Useful functions of the libkoala.
Definition in file koala_utils.c.
void koala_change_term_mode | ( | int | dir | ) |
Change terminal mode for getchar to return immediately
dir | 1= mode changed to non-blocking, 0 mode reverted to previous |
Definition at line 85 of file koala_utils.c.
Referenced by ctrlc_handler(), drive_robot(), and main().
void koala_clrscr | ( | void | ) |
Clear the console screen
Definition at line 111 of file koala_utils.c.
Referenced by drive_robot(), and main().
void koala_erase_line | ( | int | line | ) |
erase line (origin at 1,1)
line | line |
Definition at line 124 of file koala_utils.c.
References koala_move_cursor().
int koala_kbhit | ( | void | ) |
Test if anykey was pushed
Definition at line 52 of file koala_utils.c.
Referenced by braitenbergAvoidance(), drive_robot(), and main().
void koala_move_cursor | ( | int | c, |
int | l | ||
) |
move cursor (origin at 1,1)
c | column |
l | line |
Definition at line 136 of file koala_utils.c.
Referenced by koala_erase_line().
void koala_move_cursor_column | ( | int | c | ) |
move cursor column (origin at 1,1), keep line
c | column |
Definition at line 146 of file koala_utils.c.
void koala_move_cursor_line | ( | int | l | ) |
move cursor line (origin at 1,1), keep column
l | line |
Definition at line 156 of file koala_utils.c.
long long koala_timeval_diff | ( | struct timeval * | difference, |
struct timeval * | end_time, | ||
struct timeval * | start_time | ||
) |
Compute time difference
difference | difference between the two times, in structure timeval type |
end_time | end time |
start_time | start time |
Definition at line 174 of file koala_utils.c.