#include "CurrentMonitor.h"
Public Member Functions | |
void | begin (int pin, const char *msg, float inSampleMax = 300) |
void | check () |
Static Public Member Functions | |
static boolean | checkTime () |
Public Attributes | |
int | pin |
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, |
const char * | msg, | ||
float | inSampleMax = 300 |
||
) |
begin function.
pin | Attached pin. UNEFINED_PIN to inactivate this monitor. |
msg | Message to send to console when a smoothed current value grater than maximum is detected. |
inSampleMax | Maximum value of the current. Default is 300. |
Definition at line 16 of file CurrentMonitor.cpp.
void CurrentMonitor::check | ( | ) |
Checks the current on this monitor.
Definition at line 32 of file CurrentMonitor.cpp.
|
static |
Checks if sufficient time has elapsed since last update. Common to all monitors.
Definition at line 24 of file CurrentMonitor.cpp.
float CurrentMonitor::current |
Value of the last measured current.
Definition at line 31 of file CurrentMonitor.h.
float CurrentMonitor::currentSampleMax |
Value of the maximum current accepted without problem.
Definition at line 30 of file CurrentMonitor.h.
const char* CurrentMonitor::msg |
Message to send when excessive current is measured.
Definition at line 32 of file CurrentMonitor.h.
int CurrentMonitor::pin |
Attached 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.