mirror of https://github.com/arendst/Tasmota.git
save a few bytes in default config
This commit is contained in:
parent
8e54a5f955
commit
7e6be7fdd3
|
@ -86,11 +86,15 @@ void SEESAW_SOILDetect(void) {
|
|||
}
|
||||
|
||||
void SEESAW_SOILEverySecond(void) { // update sensor values and publish if changed
|
||||
#ifdef SEESAW_SOIL_PUBLISH
|
||||
uint32_t old_moist;
|
||||
#endif // SEESAW_SOIL_PUBLISH
|
||||
|
||||
for (uint32_t i = 0; i < SeeSoilCount; i++) {
|
||||
SeeSoil[i].temperature = ConvertTemp(SeeSoil[i].ss->getTemp());
|
||||
#ifdef SEESAW_SOIL_PUBLISH
|
||||
old_moist = uint32_t (CAP_TO_MOIST(SeeSoil[i].capacitance)*100);
|
||||
#endif // SEESAW_SOIL_PUBLISH
|
||||
SeeSoil[i].capacitance = SeeSoil[i].ss->touchRead(0);
|
||||
#ifdef SEESAW_SOIL_PUBLISH
|
||||
if (uint32_t (CAP_TO_MOIST(SeeSoil[i].capacitance)*100) != old_moist) {
|
||||
|
|
Loading…
Reference in New Issue