Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ lib_extra_dirs = ${common_env_data.esp8266_lib}
build_flags = -Wl,-Tesp8266.flash.1m64.ld -DBOARD=Sonoff
-DBREWPI_LCD=false -DBREWPI_MENU=false -DBREWPI_BUTTONS=false
-DDEVELOPMENT_OTA=false -DAUTO_CAP=false -DSupportPressureTransducer=false
-DEanbleParasiteTempControl=false
-DEnableParasiteTempControl=false
lib_deps = ${common_env_data.lib_deps_external_esp8266}

#[env:sonoffota]
Expand All @@ -232,7 +232,7 @@ lib_extra_dirs = ${common_env_data.esp8266_lib}
build_flags = -Wl,-Tesp8266.flash.1m64.ld -DBOARD=Sonoff
-DBREWPI_LCD=false -DBREWPI_MENU=false -DBREWPI_BUTTONS=false
-DDEVELOPMENT_OTA=false -DAUTO_CAP=false -DSupportPressureTransducer=false
-DEanbleParasiteTempControl=false
-DEnableParasiteTempControl=false


lib_deps = ${common_env_data.lib_deps_external_esp8266}
Expand All @@ -247,7 +247,7 @@ lib_extra_dirs = ${common_env_data.esp8266_lib}
build_flags = -Wl,-Tesp8266.flash.1m64.ld -DBOARD=Sonoff
-DBREWPI_LCD=false -DBREWPI_MENU=false -DBREWPI_BUTTONS=false
-DDEVELOPMENT_OTA=false -DAUTO_CAP=false -DSupportPressureTransducer=false
-DEanbleParasiteTempControl=false -DSONOFF_USE_AM2301=true
-DEnableParasiteTempControl=false -DSONOFF_USE_AM2301=true


lib_deps = ${common_env_data.lib_deps_external_esp8266}
Expand Down
8 changes: 4 additions & 4 deletions src/BPLSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void BPLSettings::setDefault(void)
defaultRemoteLogging();
defaultAutoCapSettings();

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
defaultParasiteTempControlSettings();
#endif
#if EnableDHTSensorSupport
Expand Down Expand Up @@ -859,7 +859,7 @@ String BPLSettings::jsonRemoteLogging(void)

//***************************************************************
// parasite control
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
#define EnableKey "enabled"
#define SetTempKey "temp"
#define TrigerTempKey "stemp"
Expand Down Expand Up @@ -1070,7 +1070,7 @@ String BPLSettings::jsonMqttRemoteControlSettings(void){
}


#if EanbleParasiteTempControl
#if EnableParasiteTempControl
if(settings->ptcPathOffset){
root[PtcPathKey] = settings->_strings + settings->ptcPathOffset;
}
Expand Down Expand Up @@ -1186,7 +1186,7 @@ bool BPLSettings::dejsonMqttRemoteControlSettings(String json){

if(!(ptr=copyIfExist(root,ReportBasePathKey,settings->reportBasePathOffset,ptr,base))) return false;

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
if(!(ptr=copyIfExist(root,PtcPathKey,settings->ptcPathOffset,ptr,base))) return false;
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/BPLSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class BPLSettings
void defaultLogFileIndexes(void);
void defaultRemoteLogging(void);
void defaultAutoCapSettings(void);
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
void defaultParasiteTempControlSettings(void);
#endif
#if EnableDHTSensorSupport
Expand Down
18 changes: 9 additions & 9 deletions src/BrewPiLess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extern "C" {
#include "MqttRemoteControl.h"
#endif

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
#include "ParasiteTempController.h"
#endif

Expand Down Expand Up @@ -149,7 +149,7 @@ extern "C" {
#define GETSTATUS_PATH "/getstatus"
#define DEFAULT_INDEX_FILE "index.htm"

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
#define ParasiteTempControlPath "/ptc"
#endif

Expand Down Expand Up @@ -631,7 +631,7 @@ class BrewPiWebHandler: public AsyncWebHandler
}
}
#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
else if(request->url() == ParasiteTempControlPath){
if(request->method() == HTTP_POST){
if(request->hasParam("c", true)){
Expand Down Expand Up @@ -788,7 +788,7 @@ class BrewPiWebHandler: public AsyncWebHandler
#ifdef ENABLE_LOGGING
|| request->url() == LOGGING_PATH
#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
|| request->url() == ParasiteTempControlPath
#endif
#if AUTO_CAP
Expand Down Expand Up @@ -822,7 +822,7 @@ class BrewPiWebHandler: public AsyncWebHandler
#ifdef ENABLE_LOGGING
|| request->url() == LOGGING_PATH
#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
|| request->url() == ParasiteTempControlPath
#endif
#if SupportPressureTransducer
Expand Down Expand Up @@ -940,7 +940,7 @@ void greeting(std::function<void(const char*)> sendFunc)
capControlStatusJson(cap);

#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl

doc["ptc"]= serialized(parasiteTempController.getSettings());
#endif
Expand Down Expand Up @@ -1112,7 +1112,7 @@ void reportRssi(void)
doc["tu"] = String(unit);


#if EanbleParasiteTempControl
#if EnableParasiteTempControl
doc["ptc"] = String(parasiteTempController.getMode());
doc["pt"] = parasiteTempController.getTimeElapsed();
doc["ptctp"] = parasiteTempController.getTemp();
Expand Down Expand Up @@ -1998,7 +1998,7 @@ void setup(void){
tiltListener.begin();
#endif

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
parasiteTempController.init();
#endif

Expand Down Expand Up @@ -2036,7 +2036,7 @@ void loop(void){
#ifdef ESP8266
MDNS.update();
#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
parasiteTempController.run();
#endif

Expand Down
10 changes: 5 additions & 5 deletions src/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
//////////////////////////////////////////////////////////////////////////
//
// Flag to control implementation of TempControl as a static class.
// Should normally be left alone unles you are experimenting with multi-instancing.
// Should normally be left alone unless you are experimenting with multi-instancing.
//
// #ifndef TEMP_CONTROL_STATIC
// #define TEMP_CONTROL_STATIC 1
Expand Down Expand Up @@ -247,8 +247,8 @@
#endif


#ifndef EanbleParasiteTempControl
#define EanbleParasiteTempControl true
#ifndef EnableParasiteTempControl
#define EnableParasiteTempControl true
#endif

#ifndef SupportPressureTransducer
Expand Down Expand Up @@ -392,8 +392,8 @@
#define BREWPI_BUTTONS 0

//overwrite feature set
#undef EanbleParasiteTempControl
#define EanbleParasiteTempControl flase
#undef EnableParasiteTempControl
#define EnableParasiteTempControl false
#undef SupportPressureTransducer
//#define SupportPressureTransducer false
#undef SupportMqttRemoteControl
Expand Down
6 changes: 3 additions & 3 deletions src/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "AutoCapControl.h"
#endif

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
#include "ParasiteTempController.h"
#endif

Expand Down Expand Up @@ -230,7 +230,7 @@ inline void** deviceTarget(DeviceConfig& config)
break;
#endif

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
case DEVICE_PTC_COOL:
ppv = (void**)& parasiteTempController.cooler;
break;
Expand Down Expand Up @@ -1121,7 +1121,7 @@ DeviceType deviceType(DeviceFunction id) {
#if AUTO_CAP
case DEVICE_BEER_CAPPER:
#endif
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
case DEVICE_PTC_COOL:
#endif
#if EnableDHTSensorSupport
Expand Down
12 changes: 6 additions & 6 deletions src/MqttRemoteControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extern BrewPiProxy brewpi;

#if SupportMqttRemoteControl

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
#include "ParasiteTempController.h"
#endif

Expand Down Expand Up @@ -244,7 +244,7 @@ void MqttRemoteControl::_loadConfig()
_beerSetPath = settings->beerSetPathOffset? (char*)settings->_strings + settings->beerSetPathOffset:NULL;
_fridgeSetPath = settings->fridgeSetPathOffset? (char*)settings->_strings + settings->fridgeSetPathOffset:NULL;

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
_ptcPath = settings->ptcPathOffset? (char*)settings->_strings + settings->ptcPathOffset:NULL;
#endif

Expand All @@ -258,7 +258,7 @@ void MqttRemoteControl::_loadConfig()
if(_beerSetPath) DBG_PRINTF("_setTempPath:%s\n",_beerSetPath);
if(_fridgeSetPath) DBG_PRINTF("_setTempPath:%s\n",_fridgeSetPath);

#if EanbleParasiteTempControl
#if EnableParasiteTempControl

if(_ptcPath) DBG_PRINTF("_ptcPath:%s\n",_ptcPath);
#endif
Expand Down Expand Up @@ -322,7 +322,7 @@ void MqttRemoteControl::_onConnect(void){
}


#if EanbleParasiteTempControl
#if EnableParasiteTempControl
if(_ptcPath){
if(_client.subscribe(_ptcPath, 1)){
DBG_PRINTF("MQTT:Subscribing %s\n",_ptcPath);
Expand Down Expand Up @@ -360,7 +360,7 @@ void MqttRemoteControl::_onMessage(char* topic, uint8_t* payload, size_t len) {
}else if(strcmp(topic, _fridgeSetPath) ==0){
this->_onSettingTempChange(false,(char*)payload,len);
}
#if EanbleParasiteTempControl
#if EnableParasiteTempControl
else if(strcmp(topic, _ptcPath) ==0){
this->_onPtcChange((char*)payload,len);
}
Expand Down Expand Up @@ -431,7 +431,7 @@ void MqttRemoteControl::_onSettingTempChange(bool isBeerSet,char* payload, size_
}
}

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
void MqttRemoteControl::_onPtcChange(char* payload, size_t len){
char buffer[32];
size_t toCopy=len;
Expand Down
4 changes: 2 additions & 2 deletions src/MqttRemoteControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MqttRemoteControl{

char* _reportBasePath;

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
char* _ptcPath;
#endif

Expand All @@ -77,7 +77,7 @@ class MqttRemoteControl{

void _runModeCommand(void);

#if EanbleParasiteTempControl
#if EnableParasiteTempControl
void _onPtcChange(char* payload,size_t len);
#endif

Expand Down