Added defines for more granular feature disable control

This commit is contained in:
cschwinne
2018-11-01 15:36:13 +01:00
parent 48c165b0b4
commit 5e6b1e8175
12 changed files with 105 additions and 53 deletions

View File

@@ -7,19 +7,24 @@ byte blSat = 255;
void initBlynk(const char* auth)
{
#ifndef WLED_DISABLE_BLYNK
if (WiFi.status() != WL_CONNECTED) return;
blynkEnabled = (auth[0] != 0);
if (blynkEnabled) Blynk.config(auth);
#endif
}
void handleBlynk()
{
#ifndef WLED_DISABLE_BLYNK
if (WiFi.status() == WL_CONNECTED && blynkEnabled)
Blynk.run();
#endif
}
void updateBlynk()
{
#ifndef WLED_DISABLE_BLYNK
if (onlyAP) return;
Blynk.virtualWrite(V0, bri);
//we need a RGB -> HSB convert here
@@ -29,8 +34,10 @@ void updateBlynk()
Blynk.virtualWrite(V6, effectIntensity);
Blynk.virtualWrite(V7, nightlightActive);
Blynk.virtualWrite(V8, notifyDirect);
#endif
}
#ifndef WLED_DISABLE_BLYNK
BLYNK_WRITE(V0)
{
bri = param.asInt();//bri
@@ -86,4 +93,4 @@ BLYNK_WRITE(V8)
{
notifyDirect = (param.asInt()>0); //send notifications
}
#endif