Speeduino
Loading...
Searching...
No Matches
Macros | Functions | Variables
idle.cpp File Reference
#include "idle.h"
#include "maths.h"
#include "timers.h"
#include "src/PID_v1/PID_v1.h"

Macros

#define STEPPER_LESS_AIR_DIRECTION()   ((configPage9.iacStepperInv == 0) ? STEPPER_BACKWARD : STEPPER_FORWARD)
 
#define STEPPER_MORE_AIR_DIRECTION()   ((configPage9.iacStepperInv == 0) ? STEPPER_FORWARD : STEPPER_BACKWARD)
 

Functions

static void enableIdle (void)
 
void initialiseIdle (bool forcehoming)
 
void initialiseIdleUpOutput (void)
 
static byte checkForStepping (void)
 
static void doStep (void)
 
static byte isStepperHomed (void)
 
void idleControl (void)
 
void disableIdle (void)
 
void idleInterrupt (void)
 

Variables

byte idleUpOutputHIGH = HIGH
 
byte idleUpOutputLOW = LOW
 
byte idleCounter
 
uint8_t idleTaper
 
struct StepperIdle idleStepper
 
bool idleOn
 
byte idleInitComplete = 99
 
unsigned int iacStepTime_uS
 
unsigned int iacCoolTime_uS
 
unsigned int completedHomeSteps
 
volatile bool idle_pwm_state
 
bool lastDFCOValue
 
uint16_t idle_pwm_max_count
 
volatile unsigned int idle_pwm_cur_value
 
long idle_pid_target_value
 
long FeedForwardTerm
 
unsigned long idle_pwm_target_value
 
long idle_cl_target_rpm
 
volatile PORT_TYPEidle_pin_port
 
volatile PINMASK_TYPE idle_pin_mask
 
volatile PORT_TYPEidle2_pin_port
 
volatile PINMASK_TYPE idle2_pin_mask
 
volatile PORT_TYPEidleUpOutput_pin_port
 
volatile PINMASK_TYPE idleUpOutput_pin_mask
 
struct table2D iacPWMTable
 
struct table2D iacStepTable
 
struct table2D iacCrankStepsTable
 
struct table2D iacCrankDutyTable
 
integerPID idlePIDcurrentStatus
 

Macro Definition Documentation

◆ STEPPER_LESS_AIR_DIRECTION

#define STEPPER_LESS_AIR_DIRECTION ( )    ((configPage9.iacStepperInv == 0) ? STEPPER_BACKWARD : STEPPER_FORWARD)

◆ STEPPER_MORE_AIR_DIRECTION

#define STEPPER_MORE_AIR_DIRECTION ( )    ((configPage9.iacStepperInv == 0) ? STEPPER_FORWARD : STEPPER_BACKWARD)

Function Documentation

◆ checkForStepping()

static byte checkForStepping ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disableIdle()

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

◆ doStep()

static void doStep ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableIdle()

static void enableIdle ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ idleControl()

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

◆ idleInterrupt()

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

◆ initialiseIdle()

void initialiseIdle ( bool  forcehoming)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseIdleUpOutput()

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

◆ isStepperHomed()

static byte isStepperHomed ( void  )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ completedHomeSteps

unsigned int completedHomeSteps

◆ currentStatus

integerPID idlePID& currentStatus

The master global "live" status struct. Contains all values that are updated frequently and used across modules

◆ FeedForwardTerm

long FeedForwardTerm

◆ iacCoolTime_uS

unsigned int iacCoolTime_uS

◆ iacCrankDutyTable

struct table2D iacCrankDutyTable

◆ iacCrankStepsTable

struct table2D iacCrankStepsTable

◆ iacPWMTable

struct table2D iacPWMTable

◆ iacStepTable

struct table2D iacStepTable

◆ iacStepTime_uS

unsigned int iacStepTime_uS

◆ idle2_pin_mask

volatile PINMASK_TYPE idle2_pin_mask

◆ idle2_pin_port

volatile PORT_TYPE* idle2_pin_port

◆ idle_cl_target_rpm

long idle_cl_target_rpm

◆ idle_pid_target_value

long idle_pid_target_value

◆ idle_pin_mask

volatile PINMASK_TYPE idle_pin_mask

◆ idle_pin_port

volatile PORT_TYPE* idle_pin_port

◆ idle_pwm_cur_value

volatile unsigned int idle_pwm_cur_value

◆ idle_pwm_max_count

uint16_t idle_pwm_max_count

◆ idle_pwm_state

volatile bool idle_pwm_state

◆ idle_pwm_target_value

unsigned long idle_pwm_target_value

◆ idleCounter

byte idleCounter

◆ idleInitComplete

byte idleInitComplete = 99

◆ idleOn

bool idleOn

◆ idleStepper

struct StepperIdle idleStepper

◆ idleTaper

uint8_t idleTaper

◆ idleUpOutput_pin_mask

volatile PINMASK_TYPE idleUpOutput_pin_mask

◆ idleUpOutput_pin_port

volatile PORT_TYPE* idleUpOutput_pin_port

◆ idleUpOutputHIGH

byte idleUpOutputHIGH = HIGH

◆ idleUpOutputLOW

byte idleUpOutputLOW = LOW

◆ lastDFCOValue

bool lastDFCOValue