#include "CurrentMonitor.h"
Public Member Functions | |
void | begin (int pin, int inSignalPin, const char *msg, float inSampleMax=300) |
void | check () |
Static Public Member Functions | |
static boolean | checkTime () |
Public Attributes | |
int | pin |
int | signalPin |
float | currentSampleMax |
float | current |
const char * | msg |
Static Public Attributes | |
static long int | sampleTime =0 |
This structure/class describes a current monitor.
Definition at line 27 of file CurrentMonitor.h.
void CurrentMonitor::begin | ( | int | pin, |
int | inSignalPin, | ||
const char * | msg, | ||
float | inSampleMax = 300 |
||
) |
begin function.
pin | Attached pin. UNEFINED_PIN to inactivate this monitor. |
inSignalPin | Pin to set LOW if a shortcut is detectexd. |
msg | Message to send to console when a smoothed current value greater than maximum is detected. |
inSampleMax | Maximum value of the current. Default is 300. |
Definition at line 18 of file CurrentMonitor.cpp.
void CurrentMonitor::check | ( | ) |
Checks the current on this monitor.
Definition at line 35 of file CurrentMonitor.cpp.
|
static |
Checks if sufficient time has elapsed since last update. Common to all monitors.
Definition at line 27 of file CurrentMonitor.cpp.
float CurrentMonitor::current |
Value of the last measured current.
Definition at line 32 of file CurrentMonitor.h.
float CurrentMonitor::currentSampleMax |
Value of the maximum current accepted without problem.
Definition at line 31 of file CurrentMonitor.h.
const char* CurrentMonitor::msg |
Message to send when excessive current is measured.
Definition at line 33 of file CurrentMonitor.h.
int CurrentMonitor::pin |
Attached check pin.
Definition at line 29 of file CurrentMonitor.h.
|
static |
time elapsed since last measurement. This delay is common to all monitors.
Definition at line 28 of file CurrentMonitor.h.
int CurrentMonitor::signalPin |
signal pin.
Definition at line 30 of file CurrentMonitor.h.