ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
irrigation.cpp File Reference
#include "modules/irrigation.hpp"
#include <ArduinoJson.h>
#include <ArduinoLog.h>
#include <HTTPClient.h>
#include <sys/time.h>
#include <time.h>
#include "webserver.hpp"

Go to the source code of this file.

Functions

void CheckIrrigationConditions ()
 
String formatTimeRFC1123 (time_t timestamp)
 
float GetSimpleSoilMoisture ()
 
void EnableAutoIrrigation (float min_thresh, float max_thresh)
 
void DisableAutoIrrigation ()
 
bool IsAutoIrrigationEnabled ()
 
float GetMinThreshold ()
 
float GetMaxThreshold ()
 
unsigned long GetCheckInterval ()
 
void SetCheckInterval (unsigned long interval_ms)
 
float GetCurrentMoistureFromCache ()
 

Variables

bool auto_irrigation_enabled = false
 

Function Documentation

◆ CheckIrrigationConditions()

◆ DisableAutoIrrigation()

void DisableAutoIrrigation ( )

Definition at line 192 of file irrigation.cpp.

References auto_irrigation_enabled.

Referenced by HandleAutoToggle().

◆ EnableAutoIrrigation()

void EnableAutoIrrigation ( float  min_thresh,
float  max_thresh 
)

◆ formatTimeRFC1123()

String formatTimeRFC1123 ( time_t  timestamp)

Definition at line 99 of file irrigation.cpp.

Referenced by GetSimpleSoilMoisture().

◆ GetCheckInterval()

unsigned long GetCheckInterval ( )

Definition at line 203 of file irrigation.cpp.

References check_interval.

Referenced by HandleAutoIrrigationSetup(), and HandleStatus().

◆ GetCurrentMoistureFromCache()

float GetCurrentMoistureFromCache ( )

Definition at line 209 of file irrigation.cpp.

Referenced by GetCurrentMoisture().

◆ GetMaxThreshold()

float GetMaxThreshold ( )

Definition at line 201 of file irrigation.cpp.

References moisture_max_threshold.

Referenced by HandleAutoToggle(), and HandleStatus().

◆ GetMinThreshold()

float GetMinThreshold ( )

Definition at line 199 of file irrigation.cpp.

References moisture_min_threshold.

Referenced by HandleAutoToggle(), and HandleStatus().

◆ GetSimpleSoilMoisture()

float GetSimpleSoilMoisture ( )

Definition at line 107 of file irrigation.cpp.

References formatTimeRFC1123().

Referenced by ModuleIrrigation::CheckAutoIrrigation().

◆ IsAutoIrrigationEnabled()

bool IsAutoIrrigationEnabled ( )

Definition at line 197 of file irrigation.cpp.

References auto_irrigation_enabled.

Referenced by HandleMoisture(), and HandleStatus().

◆ SetCheckInterval()

void SetCheckInterval ( unsigned long  interval_ms)

Definition at line 205 of file irrigation.cpp.

References check_interval.

Referenced by HandleAutoIrrigationSetup().

Variable Documentation

◆ auto_irrigation_enabled