MBot Software Library  v1.0
An API documentation to mbot_firmware repository
Functions
print_tables.h File Reference

Functions for generating formatted tables with integer or float data. More...

Go to the source code of this file.

Functions

void generateTableInt (char *buf, int rows, int cols, const char *title, const char *headings[], int data[rows][cols])
 Generates a formatted table with integer data. More...
 
void generateTableFloat (char *buf, int rows, int cols, const char *title, const char *headings[], float data[rows][cols])
 Generates a formatted table with floating-point data. More...
 
void generateBottomLine (char *buf, int cols)
 

Detailed Description

Functions for generating formatted tables with integer or float data.

Function Documentation

◆ generateTableFloat()

void generateTableFloat ( char *  buf,
int  rows,
int  cols,
const char *  title,
const char *  headings[],
float  data[rows][cols] 
)

Generates a formatted table with floating-point data.

Parameters
[out]bufThe output buffer for the table string.
[in]rowsThe number of rows in the table.
[in]colsThe number of columns in the table.
[in]titleThe title of the table.
[in]headingsThe headings for each column.
[in]dataThe floating-point data for the table.

◆ generateTableInt()

void generateTableInt ( char *  buf,
int  rows,
int  cols,
const char *  title,
const char *  headings[],
int  data[rows][cols] 
)

Generates a formatted table with integer data.

Parameters
[out]bufThe output buffer for the table string.
[in]rowsThe number of rows in the table.
[in]colsThe number of columns in the table.
[in]titleThe title of the table.
[in]headingsThe headings for each column.
[in]dataThe integer data for the table.