56 inline float Value()
const {
return val_; }
86 inline float GetRawFloat() {
return (
float)(*raw_) / 65535.f; }
95 float coeff_, samplerate_, val_;
96 float scale_, offset_;
Hardware Interface for control inputs Primarily designed for ADC input controls such as potentiomet...
Definition ctrl.h:18
float Value() const
Definition ctrl.h:56
AnalogControl()
Definition ctrl.h:21
void SetCoeff(float val)
Definition ctrl.h:62
float GetRawFloat()
Definition ctrl.h:86
void SetSampleRate(float sample_rate)
void Init(uint16_t *adcptr, float sr, bool flip=false, bool invert=false, float slew_seconds=0.002f)
uint16_t GetRawValue()
Definition ctrl.h:83
void SetScale(const float scale)
Definition ctrl.h:74
void SetOffset(const float offset)
Definition ctrl.h:80
void InitBipolarCv(uint16_t *adcptr, float sr)
~AnalogControl()
Definition ctrl.h:23
Definition leddriver.h:33
Hardware defines and helpers for daisy field platform.
Definition index.h:2