Defines | Functions

match-timing.c File Reference

#include "match-timing.h"
#include "robot.h"
#include <ul_log.h>
Include dependency graph for match-timing.c:

Defines

#define COMPETITION_TIME_DEFAULT   90
#define TIME_TO_DEPOSITE_DEFAULT   65
#define COMPETITION_TIME   COMPETITION_TIME_DEFAULT
#define TIME_TO_DEPOSITE   TIME_TO_DEPOSITE_DEFAULT
#define WAIT(sec)

Functions

 UL_LOG_CUST (ulogd_match_timing)
void * timing_thread (void *arg)
int timespec_subtract (struct timespec *result, struct timespec *x, struct timespec *y)
 Subtract the `struct timespec' values X and Y, storing the result in RESULT (result = x - y).
float robot_current_time ()

Define Documentation

#define COMPETITION_TIME   COMPETITION_TIME_DEFAULT
#define COMPETITION_TIME_DEFAULT   90
#define TIME_TO_DEPOSITE   TIME_TO_DEPOSITE_DEFAULT
#define TIME_TO_DEPOSITE_DEFAULT   65
#define WAIT (   sec  ) 
Value:
do {                                                            \
                struct timespec t;                                      \
                t.tv_sec = start.tv_sec+sec;                            \
                t.tv_nsec = start.tv_nsec;                              \
                clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &t, NULL); \
        } while(0)

Function Documentation

float robot_current_time (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

int timespec_subtract ( struct timespec *  result,
struct timespec *  x,
struct timespec *  y 
)

Subtract the `struct timespec' values X and Y, storing the result in RESULT (result = x - y).

Return 1 if the difference is negative, otherwise 0.

void* timing_thread ( void *  arg  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

UL_LOG_CUST ( ulogd_match_timing   )