tico 0.1
Mechanical Watch Terminal Timegrapher
Functions
printing.h File Reference
#include <stddef.h>
Include dependency graph for printing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void printmsg (const char *fmt,...) __attribute__((format(printf
 Prints a message right-aligned to the screen, 5 lines from the top, in light blue. More...
 
void void printheader (double fittedRate, unsigned int everyline, double beatError, double seconds)
 
void printspaces (int maxpos, size_t hexvalue, size_t mod, size_t acolumns, double avgPos, size_t correlationThreshold)
 Prints spaces to visually represent the position of the maximum correlation in the capture output, based on the provided parameters. More...
 
void print (const char *fmt,...) __attribute__((format(printf
 Prints a formatted message to the standard error stream, using a printf-style format string and variable arguments. More...
 

Function Documentation

◆ print()

void print ( const char *  fmt,
  ... 
)

Prints a formatted message to the standard error stream, using a printf-style format string and variable arguments.

Parameters
fmtThe printf-style format string.
...Arguments for the format string.

◆ printheader()

void void printheader ( double  fittedRate,
unsigned int  everyline,
double  beatError,
double  seconds 
)

◆ printmsg()

void printmsg ( const char *  fmt,
  ... 
)

Prints a message right-aligned to the screen, 5 lines from the top, in light blue.

Uses the global columns variable for width. Accepts printf-style format strings.

Parameters
fmtThe printf-style format string.
...Arguments for the format string.

◆ printspaces()

void printspaces ( int  maxpos,
size_t  hexvalue,
size_t  mod,
size_t  acolumns,
double  avgPos,
size_t  correlationThreshold 
)

Prints spaces to visually represent the position of the maximum correlation in the capture output, based on the provided parameters.

Parameters
maxposThe position of the maximum correlation.
hexvalueThe hexadecimal value representing the correlation strength.
modThe modulus used for calculating the width of the spaces.
acolumnsThe total number of columns available for printing.
avgPosThe average position of the correlation.
correlationThresholdThe threshold for determining the color of the output.