Speeduino
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
tachoController.cpp File Reference
#include "tachoController.h"
#include "tachoController_detail.h"
#include "../../../maths.h"
#include "../../../unit_testing.h"

Namespaces

namespace  tachoController
 
namespace  tachoController::detail
 

Functions

void initialiseTachoControl (uint8_t tachoPin, const config2 &page2, const config6 &page6, const statuses &current)
 Initialises the tacho control module.
 
static void tachoSweep (const statuses &current, tacho_control_state &tachoState)
 
static void tachoOutput (tacho_control_state &tachoState)
 
void tachoControl (const statuses &current)
 The tacho control function.
 
void tachoOutputOn (void)
 Turns the tacho output on.
 
void tachoOutputOff (void)
 Turns the tacho output off.
 

Variables

TESTABLE_STATIC detail::tacho_control_state tachoController::state
 
TESTABLE_CONSTEXPR uint16_t TACHO_SWEEP_TIME_MS = 1500
 
TESTABLE_CONSTEXPR uint16_t TACHO_SWEEP_RAMP_MS = TACHO_SWEEP_TIME_MS * 2 / 3
 

Function Documentation

◆ initialiseTachoControl()

void initialiseTachoControl ( uint8_t  tachoPin,
const config2 page2,
const config6 page6,
const statuses current 
)

Initialises the tacho control module.

◆ tachoControl()

void tachoControl ( const statuses current)

The tacho control function.

Should be called regularly to update the tacho output status.

This function will check the current engine status and decide whether to turn the tacho output on or off based on the configured settings and timing.

◆ tachoOutput()

static void tachoOutput ( tacho_control_state tachoState)
static

◆ tachoOutputOff()

void tachoOutputOff ( void  )

Turns the tacho output off.

◆ tachoOutputOn()

void tachoOutputOn ( void  )

Turns the tacho output on.

◆ tachoSweep()

static void tachoSweep ( const statuses current,
tacho_control_state tachoState 
)
static

Variable Documentation

◆ TACHO_SWEEP_RAMP_MS

TESTABLE_CONSTEXPR uint16_t TACHO_SWEEP_RAMP_MS = TACHO_SWEEP_TIME_MS * 2 / 3

◆ TACHO_SWEEP_TIME_MS

TESTABLE_CONSTEXPR uint16_t TACHO_SWEEP_TIME_MS = 1500