PER Firmware
Loading...
Searching...
No Matches
lap_timer.c File Reference

DASHBOARD lap timer task implementations. More...

#include "lap_timer.h"
#include "fault_library/faults_common.h"
#include "can_library/generated/DASHBOARD.h"
#include "utils/geodetic.h"
#include "utils/geometry.h"
#include "utils/vector2.h"
Include dependency graph for lap_timer.c:

Functions

static vector2_t lap_timer_gps_to_local (int32_t latitude, int32_t longitude)
 
static bool lap_timer_l2_crossed (const vector2_t previous_point, const vector2_t current_point)
 
static void lap_timer_finish_lap (const vector2_t current_point)
 
void lap_timer_onpress (void)
 
void lap_timer_periodic (void)
 
uint32_t lap_timer_elapsed_ms (void)
 
uint32_t lap_timer_best_time_ms (void)
 

Variables

static lap_timer_context_t lap_timer
 

Detailed Description

DASHBOARD lap timer task implementations.

Author
Amruth Nadimpally (nadim.nosp@m.paa@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)
Aditya Saini (saini.nosp@m.91@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ lap_timer_best_time_ms()

uint32_t lap_timer_best_time_ms ( void )
Here is the caller graph for this function:

◆ lap_timer_elapsed_ms()

uint32_t lap_timer_elapsed_ms ( void )
Here is the caller graph for this function:

◆ lap_timer_finish_lap()

static void lap_timer_finish_lap ( const vector2_t current_point)
inlinestatic
Here is the caller graph for this function:

◆ lap_timer_gps_to_local()

static vector2_t lap_timer_gps_to_local ( int32_t latitude,
int32_t longitude )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lap_timer_l2_crossed()

static bool lap_timer_l2_crossed ( const vector2_t previous_point,
const vector2_t current_point )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lap_timer_onpress()

void lap_timer_onpress ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lap_timer_periodic()

void lap_timer_periodic ( void )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ lap_timer

lap_timer_context_t lap_timer
static
Initial value:
= {
.origin = {0.0f, 0.0f},
.start_point = {0.0f, 0.0f},
.l1_end_point = {0.0f, 0.0f},
.last_point = {0.0f, 0.0f},
}
@ LAP_TIMER_STATE_IDLE
Definition lap_timer.h:23