mirror of https://github.com/arendst/Tasmota.git
Add support for Sugar Valley NeoPool Controller
Add support for Sugar Valley NeoPool Controller by Norbert Richter (#10637)
This commit is contained in:
parent
8744ab0f19
commit
5561de02fa
|
@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Compile time option ``USE_MQTT_TLS_DROP_OLD_FINGERPRINT`` to drop old (less secure) TLS fingerprint
|
||||
- Command ``SetOption40 0..250`` to disable button functionality if activated for over 0.1 second re-introduced
|
||||
- Support for SM2135 current selection using GPIO ``SM2135 DAT`` index (#10634)
|
||||
- Support for Sugar Valley NeoPool Controller by Norbert Richter (#10637)
|
||||
|
||||
### Breaking Changed
|
||||
- ESP32 switch from default SPIFFS to default LittleFS file system loosing current (zigbee) files
|
||||
|
|
|
@ -81,6 +81,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
|
|||
- Support for time proportioned (``#define USE_TIMEPROP``) and optional PID (``#define USE_PID``) relay control [#10412](https://github.com/arendst/Tasmota/issues/10412)
|
||||
- Support for 24/26/32/34 bit RFID Wiegand interface (D0/D1) by Sigurd Leuther [#3647](https://github.com/arendst/Tasmota/issues/3647)
|
||||
- Support for SM2135 current selection using GPIO ``SM2135 DAT`` index [#10634](https://github.com/arendst/Tasmota/issues/10634)
|
||||
- Support for Sugar Valley NeoPool Controller by Norbert Richter [#10637](https://github.com/arendst/Tasmota/issues/10637)
|
||||
- Support rotary encoder on Shelly Dimmer [#10407](https://github.com/arendst/Tasmota/issues/10407#issuecomment-756240920)
|
||||
- Support character `#` to be replaced by `space`-character in command ``Publish`` topic [#10258](https://github.com/arendst/Tasmota/issues/10258)
|
||||
- Basic support for ESP32 Odroid Go 16MB binary tasmota32-odroidgo.bin [#8630](https://github.com/arendst/Tasmota/issues/8630)
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include <Wire.h> // I2C support library
|
||||
//#endif // USE_I2C
|
||||
#ifdef USE_SPI
|
||||
#include <SPI.h> // SPI support, TFT
|
||||
#include <SPI.h> // SPI support, TFT, SDcard
|
||||
#endif // USE_SPI
|
||||
|
||||
#ifdef USE_UFILESYS
|
||||
|
@ -79,9 +79,7 @@
|
|||
#include <SDFAT.h>
|
||||
#endif // USE_SDCARD
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef ESP32
|
||||
#define FFS_2
|
||||
#include <LITTLEFS.h>
|
||||
#ifdef USE_SDCARD
|
||||
#include <SD.h>
|
||||
|
|
|
@ -60,9 +60,7 @@ ufsfree free size in kB
|
|||
#include <SDFAT.h>
|
||||
#endif // USE_SDCARD
|
||||
#endif // ESP8266
|
||||
|
||||
#ifdef ESP32
|
||||
#define FFS_2
|
||||
#include <LITTLEFS.h>
|
||||
#ifdef USE_SDCARD
|
||||
#include <SD.h>
|
||||
|
|
|
@ -656,23 +656,20 @@ void NeoPool250ms(void) // Every 250 mSec
|
|||
|
||||
/*********************************************************************************************/
|
||||
|
||||
void NeoPoolInit(void)
|
||||
{
|
||||
if (NeoPoolInitData()) {
|
||||
if (PinUsed(GPIO_NEOPOOL_RX) && PinUsed(GPIO_NEOPOOL_TX)) {
|
||||
NeoPoolModbus = new TasmotaModbus(Pin(GPIO_NEOPOOL_RX), Pin(GPIO_NEOPOOL_TX));
|
||||
uint8_t result = NeoPoolModbus->Begin(NEOPOOL_MODBUS_SPEED);
|
||||
if (result) {
|
||||
if (2 == result) {
|
||||
ClaimSerial();
|
||||
}
|
||||
#ifdef NEOPOOL_OPTIMIZE_READINGS
|
||||
neopool_first_read = true;
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
neopool_active = true;
|
||||
void NeoPoolInit(void) {
|
||||
neopool_active = false;
|
||||
if (PinUsed(GPIO_NEOPOOL_RX) && PinUsed(GPIO_NEOPOOL_TX)) {
|
||||
NeoPoolModbus = new TasmotaModbus(Pin(GPIO_NEOPOOL_RX), Pin(GPIO_NEOPOOL_TX));
|
||||
uint8_t result = NeoPoolModbus->Begin(NEOPOOL_MODBUS_SPEED);
|
||||
if (result) {
|
||||
if (2 == result) {
|
||||
ClaimSerial();
|
||||
}
|
||||
else {
|
||||
neopool_active = false;
|
||||
#ifdef NEOPOOL_OPTIMIZE_READINGS
|
||||
neopool_first_read = true;
|
||||
#endif // NEOPOOL_OPTIMIZE_READINGS
|
||||
if (NeoPoolInitData()) { // Claims heap space
|
||||
neopool_active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1314,32 +1311,28 @@ bool Xsns83(uint8_t function)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
switch (function) {
|
||||
case FUNC_INIT:
|
||||
NeoPoolInit();
|
||||
break;
|
||||
case FUNC_EVERY_250_MSECOND:
|
||||
if (neopool_active) {
|
||||
if (FUNC_INIT == function) {
|
||||
NeoPoolInit();
|
||||
}
|
||||
else if (neopool_active) {
|
||||
switch (function) {
|
||||
case FUNC_EVERY_250_MSECOND:
|
||||
NeoPool250ms();
|
||||
}
|
||||
break;
|
||||
case FUNC_COMMAND_SENSOR:
|
||||
if (XSNS_83 == XdrvMailbox.index) {
|
||||
result = NeoPoolCmnd();
|
||||
}
|
||||
break;
|
||||
case FUNC_JSON_APPEND:
|
||||
if (neopool_active) {
|
||||
break;
|
||||
case FUNC_COMMAND_SENSOR:
|
||||
if (XSNS_83 == XdrvMailbox.index) {
|
||||
result = NeoPoolCmnd();
|
||||
}
|
||||
break;
|
||||
case FUNC_JSON_APPEND:
|
||||
NeoPoolShow(1);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
#ifdef USE_WEBSERVER
|
||||
case FUNC_WEB_SENSOR:
|
||||
if (neopool_active) {
|
||||
case FUNC_WEB_SENSOR:
|
||||
NeoPoolShow(0);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue