Skip to content

Commit

Permalink
make ESP8266 compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
vitotai committed Jan 16, 2024
1 parent f94c2f5 commit 9345be3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[platformio]
#sonoff OTA no longer supported, classic interface no longer supported
#default_envs = esp32, esp32-oled, esp8266, esp8266-oled, esp8266-tw, esp8266-spanish, esp8266-portuguese-br, esp8266-slovak, esp8266-ispindel, esp8266-it, esp8266-norwegian, thorrax, sonoff, sonoff-esp8285, d1pro, sonoff-am2301
default_envs = esp32-dev
#default_envs = esp8266-dev
#default_envs = esp32-dev
default_envs = esp8266-dev
#default_envs = esp8266

include_dir= wdoc/
Expand Down
2 changes: 2 additions & 0 deletions src/BleListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <functional>

#include "Config.h"
#if ESP32
#include <NimBLEDevice.h>
#include <NimBLEAdvertisedDevice.h>
#include "NimBLEEddystoneURL.h"
Expand Down Expand Up @@ -66,4 +67,5 @@ class BleListener :public BLEAdvertisedDeviceCallbacks{
extern BleListener bleListener;


#endif
#endif
3 changes: 2 additions & 1 deletion src/BlePillListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <functional>

#include "Config.h"

#if SupportPillHydrometer
#include "BleListener.h"

class PillHydrometerInfo: public BleHydrometerDevice{
Expand Down Expand Up @@ -70,4 +70,5 @@ class PillScanner:public BleDeviceListener {
};

extern PillScanner pillScanner;
#endif
#endif
1 change: 0 additions & 1 deletion src/BrewPiLess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,6 @@ void reportRssi(void)
uint8_t mode, state;
char unit;
float beerSet, beerTemp, fridgeTemp, fridgeSet, roomTemp;
float min,max;

mode = brewPi.getMode();
state = brewPi.getState();
Expand Down
6 changes: 3 additions & 3 deletions src/ExternalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ void ExternalData::_gotPillInfo(PillHydrometerInfo* info){
#endif

void ExternalData::_reconfig(void){
DBG_PRINTF("refoncig: devicetype:%d, %d\n",_cfg->gravityDeviceType,_bleHydrometerType);
#if SupportTiltHydrometer || SupportPillHydrometer
DBG_PRINTF("refoncig: devicetype:%d, %d\n",_cfg->gravityDeviceType,_bleHydrometerType);
if(_cfg->gravityDeviceType != _bleHydrometerType){
if((_bleHydrometerType == GravityDeviceTilt) || (_bleHydrometerType == GravityDevicePill) ){
if(_bleHydrometer){
Expand Down Expand Up @@ -218,8 +218,9 @@ void ExternalData::_reconfig(void){
}
}
#endif

#if SupportTiltHydrometer || SupportPillHydrometer
_bleHydrometerType = _cfg->gravityDeviceType;
#endif
}

void ExternalData::loadConfig(void){
Expand Down Expand Up @@ -317,7 +318,6 @@ void ExternalData::_setGravity(float sg, time_t now,bool log){

#if SMART_DISPLAY
char unit = brewPi.getUnit();
float max,min;
smartDisplay.gravityDeviceData(sg,_auxTemp,_lastUpdate,unit,_cfg->usePlato,_deviceVoltage,_tiltAngle,_rssi);
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/ExternalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class ExternalData

public:
ExternalData(void):_gravity(INVALID_GRAVITY),_auxTemp(INVALID_TEMP),
_lastUpdate(0),_deviceVoltage(INVALID_VOLTAGE)
,_ispindelName(NULL),_calibrating(false),_rssiValid(false){
_lastUpdate(0),_rssiValid(false),_deviceVoltage(INVALID_VOLTAGE)
,_ispindelName(NULL),_calibrating(false){
_filteredGravity = INVALID_GRAVITY;
#if SupportTiltHydrometer || SupportPillHydrometer
_bleHydrometerType = GravityDeviceNone;
Expand Down

0 comments on commit 9345be3

Please sign in to comment.