Rename function

This commit is contained in:
2025-05-16 09:22:34 +02:00
parent 64852b2a67
commit ba10840f50
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
//#define MOISTURE_SENSOR_A7 PC7 //#define MOISTURE_SENSOR_A7 PC7
// You may just connect the pumps that actually are needed in the vase // You may just connect the pumps that actually are needed in the vase
// or define exactly the connected pumps on your system // or define only the connected pumps on your system
#define PUMP_D3 PD3 #define PUMP_D3 PD3
#define PUMP_D4 PD4 #define PUMP_D4 PD4
#define PUMP_D5 PD5 #define PUMP_D5 PD5
+1 -1
View File
@@ -5,7 +5,7 @@
#include <stdbool.h> #include <stdbool.h>
void sensorsInit(void); void sensorsInit(void);
void triggerRead(void); void triggerMoistureRead(void);
int16_t moistureAverage(int8_t sensorPin); int16_t moistureAverage(int8_t sensorPin);
int16_t moistureRead(void); int16_t moistureRead(void);
+3 -2
View File
@@ -8,7 +8,7 @@
#include "pump.h" #include "pump.h"
ISR(WDT_vect) { ISR(WDT_vect) {
triggerRead(); triggerMoistureRead();
} }
void watchdogs(void) { void watchdogs(void) {
@@ -29,7 +29,7 @@ void enterSleep(void) {
void setup(void) { void setup(void) {
adcInit(); adcInit();
sensorsInit(); sensorsInit();
//pumpsInit(); pumpsInit();
watchdogs(); watchdogs();
} }
@@ -41,6 +41,7 @@ int main(void) {
int16_t result = moistureRead(); int16_t result = moistureRead();
//espSend(VASE_NUM, result) //espSend(VASE_NUM, result)
} }
triggerPump(PUMP_D7, 50);
// if(espGet("ask if i need to water plants") == true) {waterPlant()} // if(espGet("ask if i need to water plants") == true) {waterPlant()}
enterSleep(); enterSleep();
} }
+1 -1
View File
@@ -29,7 +29,7 @@ void sensorsInit(void) {
//(1 << MOISTURE_SENSOR_A7)); //(1 << MOISTURE_SENSOR_A7));
} }
void triggerRead(void) { void triggerMoistureRead(void) {
readSensors = true; readSensors = true;
} }