Shield Code 6.0
Loading...
Searching...
No Matches
Pip Class Reference

Manages the Pip sensor sweep and associated data. More...

#include <Pip.hpp>

Collaboration diagram for Pip:

Public Member Functions

 Pip (int delay_us, uint16_t avg_num, uint16_t num_samples, uint16_t min, uint16_t max, uint8_t dac_pin, Max1148 &adc)
 Constructor for the Pip class.
 

Public Attributes

uint16_t data [SWEEP_MAX_SAMPLES]
 The data array for the sweep.
 

Private Member Functions

void clear_data (uint16_t data[], uint16_t size)
 Clears the data array.
 
uint16_t read_adc ()
 

Private Attributes

uint8_t dac_pin
 The pin for the DAC output.
 
int delay_us
 The delay between steps in the sweep. Measured in microseconds.
 
Max1148adc
 The ADC object for the Pip to use. Assuming each pip will use a different ADC channel.
 
uint16_t avg_num
 The number of samples to average when querying the ADC.
 
uint16_t num_samples
 The number of samples to take during the sweep. AKA the number of steps in the sweep.
 
uint16_t sweep_min
 The minimum and maximum values for the sweep.
 
uint16_t sweep_max
 

Friends

class PipController
 

Detailed Description

Manages the Pip sensor sweep and associated data.

Definition at line 33 of file Pip.hpp.

Constructor & Destructor Documentation

◆ Pip()

Pip::Pip ( int  delay,
uint16_t  avg_num,
uint16_t  num_samples,
uint16_t  min,
uint16_t  max,
uint8_t  dac_pin,
Max1148 adc 
)

Constructor for the Pip class.

Definition at line 7 of file Pip.cpp.

Member Function Documentation

◆ clear_data()

void Pip::clear_data ( uint16_t  data[],
uint16_t  size 
)
private

Clears the data array.

Clears the data array.

Parameters
dataThe data array to clear.
sizeThe size of the data array.
Parameters
dataThe data array to clear.
sizeThe size of the data array.

Definition at line 14 of file Pip.cpp.

◆ read_adc()

uint16_t Pip::read_adc ( )
private

Definition at line 20 of file Pip.cpp.

Friends And Related Function Documentation

◆ PipController

friend class PipController
friend

Definition at line 34 of file Pip.hpp.

Member Data Documentation

◆ adc

Max1148& Pip::adc
private

The ADC object for the Pip to use. Assuming each pip will use a different ADC channel.

Definition at line 48 of file Pip.hpp.

◆ avg_num

uint16_t Pip::avg_num
private

The number of samples to average when querying the ADC.

Definition at line 52 of file Pip.hpp.

◆ dac_pin

uint8_t Pip::dac_pin
private

The pin for the DAC output.

Definition at line 39 of file Pip.hpp.

◆ data

uint16_t Pip::data[SWEEP_MAX_SAMPLES]

The data array for the sweep.

Definition at line 81 of file Pip.hpp.

◆ delay_us

int Pip::delay_us
private

The delay between steps in the sweep. Measured in microseconds.

Definition at line 43 of file Pip.hpp.

◆ num_samples

uint16_t Pip::num_samples
private

The number of samples to take during the sweep. AKA the number of steps in the sweep.

Definition at line 56 of file Pip.hpp.

◆ sweep_max

uint16_t Pip::sweep_max
private

Definition at line 61 of file Pip.hpp.

◆ sweep_min

uint16_t Pip::sweep_min
private

The minimum and maximum values for the sweep.

Definition at line 60 of file Pip.hpp.


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