Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
src
BrownoutMode.h
1
#pragma once
2
3
#include "Mode.h"
4
#include "EMAVDivSampler.h"
5
13
class
BrownoutMode
:
public
Mode
{
14
public
:
20
BrownoutMode
(
EMAVDivSampler
& vSampler,
const
float
vThreshLow,
const
float
vThreshHigh);
21
25
virtual
void
update
();
26
31
virtual
void
enterBrownout
() {;}
32
37
virtual
void
exitBrownout
() {;}
38
42
bool
brownedOut
() {
return
_brownedOut; }
43
44
protected
:
45
EMAVDivSampler
& _vSampler;
46
float
_vThreshLow;
47
float
_vThreshHigh;
48
bool
_brownedOut;
49
};
50
BrownoutMode::exitBrownout
virtual void exitBrownout()
Definition:
BrownoutMode.h:37
BrownoutMode::update
virtual void update()
Definition:
BrownoutMode.cpp:11
Mode
Definition:
Mode.h:39
BrownoutMode::BrownoutMode
BrownoutMode(EMAVDivSampler &vSampler, const float vThreshLow, const float vThreshHigh)
Definition:
BrownoutMode.cpp:3
BrownoutMode::enterBrownout
virtual void enterBrownout()
Definition:
BrownoutMode.h:31
BrownoutMode::brownedOut
bool brownedOut()
Definition:
BrownoutMode.h:42
BrownoutMode
Mode class with brownout detection.
Definition:
BrownoutMode.h:13
EMAVDivSampler
Exponential Moving Average Voltage Divider based voltage sampler.
Definition:
EMAVDivSampler.h:10
Generated by
1.8.15