LCC Fusion Project 1.0
LCC Automation
Loading...
Searching...
No Matches
CurrentMonitor Struct Reference

#include <CurrentMonitor.h>

Public Member Functions

void begin (int pin, int inSignalPin, const char *msg, float inSampleMax=800)
 
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
 

Detailed Description

This structure/class describes a current monitor.

Definition at line 28 of file CurrentMonitor.h.

Member Function Documentation

◆ begin()

void CurrentMonitor::begin ( int  pin,
int  inSignalPin,
const char *  msg,
float  inSampleMax = 800 
)

begin function.

Parameters
pinAttached pin. UNEFINED_PIN to inactivate this monitor.
inSignalPinPin to set LOW if a shortcut is detectexd.
msgMessage to send to console when a smoothed current value greater than maximum is detected.
inSampleMaxMaximum value of the current. Default is 300 for AVR, 800 for ESP32.

Definition at line 22 of file CurrentMonitor.cpp.

Here is the caller graph for this function:

◆ check()

void CurrentMonitor::check ( )

Checks the current on this monitor.

Definition at line 39 of file CurrentMonitor.cpp.

Here is the caller graph for this function:

◆ checkTime()

boolean CurrentMonitor::checkTime ( )
static

Checks if sufficient time has elapsed since last update. Common to all monitors.

Definition at line 31 of file CurrentMonitor.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ current

float CurrentMonitor::current

Value of the last measured current.

Definition at line 33 of file CurrentMonitor.h.

◆ currentSampleMax

float CurrentMonitor::currentSampleMax

Value of the maximum current accepted without problem.

Definition at line 32 of file CurrentMonitor.h.

◆ msg

const char* CurrentMonitor::msg

Message to send when excessive current is measured.

Definition at line 34 of file CurrentMonitor.h.

◆ pin

int CurrentMonitor::pin

Attached check pin.

Definition at line 30 of file CurrentMonitor.h.

◆ sampleTime

long int CurrentMonitor::sampleTime =0
static

time elapsed since last measurement. This delay is common to all monitors.

Definition at line 29 of file CurrentMonitor.h.

◆ signalPin

int CurrentMonitor::signalPin

signal pin.

Definition at line 31 of file CurrentMonitor.h.


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