DovesLapTimer 4.3.0
GPS-based lap timing Arduino library — go-karts to race cars
Loading...
Searching...
No Matches
CourseManager Class Reference

#include <CourseManager.h>

+ Collaboration diagram for CourseManager:

Public Member Functions

 CourseManager (TrackConfig &config, double crossingThreshold=7.0, Stream *debugSerial=NULL)
 
int getActiveCourseIndex () const
 
const char * getActiveCourseName () const
 
DovesLapTimergetActiveTimer ()
 
int getCourseCount () const
 
int getDetectionRejectionCount () const
 
CourseDetectorgetDetector ()
 
WaypointLapTimergetLapAnythingTimer ()
 
const char * getShortName () const
 
const char * getTrackName () const
 
bool isCourseTimerActive (int index) const
 
bool isDetectionComplete () const
 
bool isLapAnythingActive () const
 
int loop (double lat, double lng, float altMeters, float speedKnots)
 
void pruneInactiveCourses ()
 
void reset ()
 
bool selectCourse (int index)
 Selects a course directly, bypassing CourseDetector entirely.
 
void setDetectionProximityMeters (float meters)
 
void setSpeedThresholdMph (float mph)
 
void setWaypointProximityMeters (float meters)
 
void updateCurrentTime (unsigned long ms)
 

Constructor & Destructor Documentation

◆ CourseManager()

CourseManager::CourseManager ( TrackConfig config,
double  crossingThreshold = 7.0,
Stream *  debugSerial = NULL 
)

Member Function Documentation

◆ getActiveCourseIndex()

int CourseManager::getActiveCourseIndex ( ) const

◆ getActiveCourseName()

const char * CourseManager::getActiveCourseName ( ) const

◆ getActiveTimer()

DovesLapTimer * CourseManager::getActiveTimer ( )

◆ getCourseCount()

int CourseManager::getCourseCount ( ) const

◆ getDetectionRejectionCount()

int CourseManager::getDetectionRejectionCount ( ) const

◆ getDetector()

CourseDetector * CourseManager::getDetector ( )

◆ getLapAnythingTimer()

WaypointLapTimer * CourseManager::getLapAnythingTimer ( )

◆ getShortName()

const char * CourseManager::getShortName ( ) const

◆ getTrackName()

const char * CourseManager::getTrackName ( ) const

◆ isCourseTimerActive()

bool CourseManager::isCourseTimerActive ( int  index) const

◆ isDetectionComplete()

bool CourseManager::isDetectionComplete ( ) const

◆ isLapAnythingActive()

bool CourseManager::isLapAnythingActive ( ) const

◆ loop()

int CourseManager::loop ( double  lat,
double  lng,
float  altMeters,
float  speedKnots 
)

◆ pruneInactiveCourses()

void CourseManager::pruneInactiveCourses ( )

◆ reset()

void CourseManager::reset ( )

◆ selectCourse()

bool CourseManager::selectCourse ( int  index)

Selects a course directly, bypassing CourseDetector entirely.

For callers that already know which layout is in play (an app-side default course choice, or sprint mode's newest-course-by-date rule — point-to-point driving can never satisfy the detector's drive-a-lap-back-to-your-waypoint premise). Marks detection complete, deactivates every other course timer (same effect as detection + pruneInactiveCourses()), and clears any Lap Anything activation. reset() returns the manager to normal detection.

Parameters
indexCourse index [0, getCourseCount()).
Returns
True if the index was valid and the course was selected.

◆ setDetectionProximityMeters()

void CourseManager::setDetectionProximityMeters ( float  meters)

◆ setSpeedThresholdMph()

void CourseManager::setSpeedThresholdMph ( float  mph)

◆ setWaypointProximityMeters()

void CourseManager::setWaypointProximityMeters ( float  meters)

◆ updateCurrentTime()

void CourseManager::updateCurrentTime ( unsigned long  ms)

The documentation for this class was generated from the following files: