Remove Blynk support (#3102)
Change default palette for Railway to Colors 1 and 2
This commit is contained in:
parent
be2acbd3eb
commit
220718cb58
@ -1,5 +1,9 @@
|
|||||||
## WLED changelog
|
## WLED changelog
|
||||||
|
|
||||||
|
#### Build 2302180
|
||||||
|
|
||||||
|
- Removed Blynk support (servers shut down on 31st Dec 2022)
|
||||||
|
|
||||||
#### Build 2301240
|
#### Build 2301240
|
||||||
|
|
||||||
- Version bump to v0.14.0-b2 "Hoshi"
|
- Version bump to v0.14.0-b2 "Hoshi"
|
||||||
|
@ -151,7 +151,7 @@ upload_speed = 115200
|
|||||||
# Please note that we don't always use the latest version of a library.
|
# Please note that we don't always use the latest version of a library.
|
||||||
#
|
#
|
||||||
# The following libraries have been included (and some of them changd) in the source:
|
# The following libraries have been included (and some of them changd) in the source:
|
||||||
# ArduinoJson@5.13.5, Blynk@0.5.4(changed), E131@1.0.0(changed), Time@1.5, Timezone@1.2.1
|
# ArduinoJson@5.13.5, E131@1.0.0(changed), Time@1.5, Timezone@1.2.1
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
lib_compat_mode = strict
|
lib_compat_mode = strict
|
||||||
lib_deps =
|
lib_deps =
|
||||||
@ -285,7 +285,7 @@ platform = ${common.platform_wled_default}
|
|||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_4m1m}
|
board_build.ldscript = ${common.ldscript_4m1m}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 -D WLED_DISABLE_BLYNK #-DWLED_DISABLE_2D
|
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266 #-DWLED_DISABLE_2D
|
||||||
lib_deps = ${esp8266.lib_deps}
|
lib_deps = ${esp8266.lib_deps}
|
||||||
monitor_filters = esp8266_exception_decoder
|
monitor_filters = esp8266_exception_decoder
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ platform = ${common.platform_wled_default}
|
|||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_2m512k}
|
board_build.ldscript = ${common.ldscript_2m512k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP02 -D WLED_DISABLE_BLYNK
|
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP02
|
||||||
lib_deps = ${esp8266.lib_deps}
|
lib_deps = ${esp8266.lib_deps}
|
||||||
|
|
||||||
[env:esp01_1m_full]
|
[env:esp01_1m_full]
|
||||||
@ -304,7 +304,7 @@ platform = ${common.platform_wled_default}
|
|||||||
platform_packages = ${common.platform_packages}
|
platform_packages = ${common.platform_packages}
|
||||||
board_build.ldscript = ${common.ldscript_1m128k}
|
board_build.ldscript = ${common.ldscript_1m128k}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP01 -D WLED_DISABLE_OTA -D WLED_DISABLE_BLYNK
|
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP01 -D WLED_DISABLE_OTA
|
||||||
lib_deps = ${esp8266.lib_deps}
|
lib_deps = ${esp8266.lib_deps}
|
||||||
|
|
||||||
[env:esp07]
|
[env:esp07]
|
||||||
@ -350,7 +350,7 @@ board = esp32dev
|
|||||||
platform = ${esp32.platform}
|
platform = ${esp32.platform}
|
||||||
platform_packages = ${esp32.platform_packages}
|
platform_packages = ${esp32.platform_packages}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
|
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-D WLED_DISABLE_BROWNOUT_DET
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
board_build.partitions = ${esp32.default_partitions}
|
board_build.partitions = ${esp32.default_partitions}
|
||||||
@ -360,7 +360,7 @@ board = esp32dev
|
|||||||
platform = ${esp32.platform}
|
platform = ${esp32.platform}
|
||||||
platform_packages = ${esp32.platform_packages}
|
platform_packages = ${esp32.platform_packages}
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 -D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
|
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 #-D WLED_DISABLE_BROWNOUT_DET
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
board_build.partitions = ${esp32.default_partitions}
|
board_build.partitions = ${esp32.default_partitions}
|
||||||
@ -373,7 +373,7 @@ platform = ${esp32.platform}
|
|||||||
platform_packages = ${esp32.platform_packages}
|
platform_packages = ${esp32.platform_packages}
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
build_unflags = ${common.build_unflags}
|
build_unflags = ${common.build_unflags}
|
||||||
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_BLYNK
|
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
|
||||||
lib_deps = ${esp32.lib_deps}
|
lib_deps = ${esp32.lib_deps}
|
||||||
board_build.partitions = ${esp32.default_partitions}
|
board_build.partitions = ${esp32.default_partitions}
|
||||||
|
|
||||||
@ -633,7 +633,6 @@ build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_BROWNOUT_DET -D WLED_D
|
|||||||
-D LEDPIN=12
|
-D LEDPIN=12
|
||||||
-D RLYPIN=27
|
-D RLYPIN=27
|
||||||
-D BTNPIN=34
|
-D BTNPIN=34
|
||||||
-D WLED_DISABLE_BLYNK
|
|
||||||
-D DEFAULT_LED_COUNT=6
|
-D DEFAULT_LED_COUNT=6
|
||||||
# Display config
|
# Display config
|
||||||
-D ST7789_DRIVER
|
-D ST7789_DRIVER
|
||||||
|
@ -26,7 +26,6 @@ build_flags = ${common.build_flags_esp8266}
|
|||||||
; disable specific features
|
; disable specific features
|
||||||
; -D WLED_DISABLE_OTA
|
; -D WLED_DISABLE_OTA
|
||||||
; -D WLED_DISABLE_ALEXA
|
; -D WLED_DISABLE_ALEXA
|
||||||
; -D WLED_DISABLE_BLYNK
|
|
||||||
; -D WLED_DISABLE_HUESYNC
|
; -D WLED_DISABLE_HUESYNC
|
||||||
; -D WLED_DISABLE_INFRARED
|
; -D WLED_DISABLE_INFRARED
|
||||||
; -D WLED_DISABLE_WEBSOCKETS
|
; -D WLED_DISABLE_WEBSOCKETS
|
||||||
|
@ -35,7 +35,6 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control
|
|||||||
- WLED app for [Android](https://play.google.com/store/apps/details?id=com.aircoookie.WLED) and [iOS](https://apps.apple.com/us/app/wled/id1475695033)
|
- WLED app for [Android](https://play.google.com/store/apps/details?id=com.aircoookie.WLED) and [iOS](https://apps.apple.com/us/app/wled/id1475695033)
|
||||||
- JSON and HTTP request APIs
|
- JSON and HTTP request APIs
|
||||||
- MQTT
|
- MQTT
|
||||||
- Blynk IoT
|
|
||||||
- E1.31, Art-Net, DDP and TPM2.net
|
- E1.31, Art-Net, DDP and TPM2.net
|
||||||
- [diyHue](https://github.com/diyhue/diyHue) (Wled is supported by diyHue, including Hue Sync Entertainment under udp. Thanks to [Gregory Mallios](https://github.com/gmallios))
|
- [diyHue](https://github.com/diyhue/diyHue) (Wled is supported by diyHue, including Hue Sync Entertainment under udp. Thanks to [Gregory Mallios](https://github.com/gmallios))
|
||||||
- [Hyperion](https://github.com/hyperion-project/hyperion.ng)
|
- [Hyperion](https://github.com/hyperion-project/hyperion.ng)
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
# Blynk controllable relay
|
|
||||||
Enables controlling a relay state via user variables. Allows the user variables to be set via Blynk.
|
|
||||||
|
|
||||||
Optionally, the servo can have a reset timer to return to its default state after a user definable interval. The interval is set via userVar1.
|
|
||||||
|
|
||||||
## Instalation
|
|
||||||
|
|
||||||
Replace the WLED06_usermod.ino file in Aircoookies WLED folder, with the one here.
|
|
||||||
|
|
||||||
## Customizations
|
|
||||||
|
|
||||||
Update the following parameters in WLED06_usermod.ino to configure the mod's behavior:
|
|
||||||
|
|
||||||
```cpp
|
|
||||||
//Which pin is the relay connected to
|
|
||||||
#define RELAY_PIN 5
|
|
||||||
//Which pin state should the relay default to
|
|
||||||
#define RELAY_PIN_DEFAULT LOW
|
|
||||||
//If >0 The controller returns to RELAY_PIN_DEFAULT after this time, in milliseconds
|
|
||||||
#define RELAY_PIN_TIMER_DEFAULT 3000
|
|
||||||
|
|
||||||
//Blynk virtual pin for controlling relay
|
|
||||||
#define BLYNK_USER_VAR0_PIN V9
|
|
||||||
//Blynk virtual pin for controlling relay timer
|
|
||||||
#define BLYNK_USER_VAR1_PIN V10
|
|
||||||
//Number of milliseconds between Blynk updates
|
|
||||||
#define BLYNK_RELAY_UPDATE_INTERVAL 5000
|
|
||||||
```
|
|
@ -1,96 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file allows you to add own functionality to WLED more easily
|
|
||||||
* See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality
|
|
||||||
* EEPROM bytes 2750+ are reserved for your custom use case. (if you extend #define EEPSIZE in wled_eeprom.h)
|
|
||||||
* bytes 2400+ are currently ununsed, but might be used for future wled features
|
|
||||||
*/
|
|
||||||
|
|
||||||
//Use userVar0 (API calls &U0=, uint16_t) to set relay state
|
|
||||||
#define relayPinState userVar0
|
|
||||||
//Use userVar1 (API calls &U1=, uint16_t) to set relay timer duration
|
|
||||||
//Ignored if 0, otherwise number of milliseconds to allow relay to stay in
|
|
||||||
//non default state.
|
|
||||||
#define relayTimerInterval userVar1
|
|
||||||
|
|
||||||
//Which pin is the relay connected to
|
|
||||||
#define RELAY_PIN 5
|
|
||||||
//Which pin state should the relay default to
|
|
||||||
#define RELAY_PIN_DEFAULT LOW
|
|
||||||
//If >0 The controller returns to RELAY_PIN_DEFAULT after this time in milliseconds
|
|
||||||
#define RELAY_PIN_TIMER_DEFAULT 3000
|
|
||||||
|
|
||||||
//Blynk virtual pin for controlling relay
|
|
||||||
#define BLYNK_USER_VAR0_PIN V9
|
|
||||||
//Blynk virtual pin for controlling relay timer
|
|
||||||
#define BLYNK_USER_VAR1_PIN V10
|
|
||||||
//Number of milliseconds between updating blynk
|
|
||||||
#define BLYNK_RELAY_UPDATE_INTERVAL 5000
|
|
||||||
|
|
||||||
//Is the timer for resetting the relay active
|
|
||||||
bool relayTimerStarted = false;
|
|
||||||
//millis() time after which relay will be reset
|
|
||||||
unsigned long relayTimeToDefault = 0;
|
|
||||||
//millis() time after which relay vars in Blynk will be sent
|
|
||||||
unsigned long relayBlynkUpdateTime = 0;
|
|
||||||
|
|
||||||
//gets called once at boot. Do all initialization that doesn't depend on network here
|
|
||||||
void userSetup()
|
|
||||||
{
|
|
||||||
relayPinState = RELAY_PIN_DEFAULT;
|
|
||||||
relayTimerInterval = RELAY_PIN_TIMER_DEFAULT;
|
|
||||||
pinMode(RELAY_PIN, OUTPUT);
|
|
||||||
digitalWrite(RELAY_PIN, relayPinState);
|
|
||||||
}
|
|
||||||
|
|
||||||
//gets called every time WiFi is (re-)connected. Initialize own network interfaces here
|
|
||||||
void userConnected()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//loop. You can use "if (WLED_CONNECTED)" to check for successful connection
|
|
||||||
void userLoop()
|
|
||||||
{
|
|
||||||
//Normalize relayPinState to an accepted value
|
|
||||||
if (relayPinState != HIGH && relayPinState != LOW) {
|
|
||||||
relayPinState = RELAY_PIN_DEFAULT;
|
|
||||||
}
|
|
||||||
//If relay changes and relayTimerInterval is set, start a timer to change back
|
|
||||||
if (relayTimerInterval != 0 &&
|
|
||||||
relayPinState != RELAY_PIN_DEFAULT &&
|
|
||||||
!relayTimerStarted ) {
|
|
||||||
relayTimerStarted = true;
|
|
||||||
relayTimeToDefault = millis() + relayTimerInterval;
|
|
||||||
}
|
|
||||||
//If manually changed back to default, cancel timer
|
|
||||||
if (relayTimerStarted && relayPinState == RELAY_PIN_DEFAULT ) {
|
|
||||||
relayTimerStarted = false;
|
|
||||||
}
|
|
||||||
//If timer completes, set relay back to default
|
|
||||||
if (relayTimerStarted && millis() > relayTimeToDefault) {
|
|
||||||
relayPinState = RELAY_PIN_DEFAULT;
|
|
||||||
relayTimerStarted = false;
|
|
||||||
}
|
|
||||||
digitalWrite(RELAY_PIN, relayPinState);
|
|
||||||
updateRelayBlynk();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Update Blynk with state of userVars at BLYNK_RELAY_UPDATE_INTERVAL
|
|
||||||
void updateRelayBlynk()
|
|
||||||
{
|
|
||||||
if (!WLED_CONNECTED) return;
|
|
||||||
if (relayBlynkUpdateTime > millis()) return;
|
|
||||||
Blynk.virtualWrite(BLYNK_USER_VAR0_PIN, userVar0);
|
|
||||||
Blynk.virtualWrite(BLYNK_USER_VAR1_PIN, userVar1);
|
|
||||||
relayBlynkUpdateTime = millis() + BLYNK_RELAY_UPDATE_INTERVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add Blynk callback for setting userVar0
|
|
||||||
BLYNK_WRITE(BLYNK_USER_VAR0_PIN)
|
|
||||||
{
|
|
||||||
userVar0 = param.asInt();
|
|
||||||
}
|
|
||||||
//Add Blynk callback for setting userVar1
|
|
||||||
BLYNK_WRITE(BLYNK_USER_VAR1_PIN)
|
|
||||||
{
|
|
||||||
userVar1 = param.asInt();
|
|
||||||
}
|
|
@ -226,7 +226,7 @@ CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {
|
|||||||
case FX_MODE_NOISE16_4 : pal = 26; break; // landscape 33
|
case FX_MODE_NOISE16_4 : pal = 26; break; // landscape 33
|
||||||
case FX_MODE_GLITTER : pal = 11; break; // rainbow colors
|
case FX_MODE_GLITTER : pal = 11; break; // rainbow colors
|
||||||
case FX_MODE_SUNRISE : pal = 35; break; // heat palette
|
case FX_MODE_SUNRISE : pal = 35; break; // heat palette
|
||||||
case FX_MODE_FLOW : pal = 6; break; // party
|
case FX_MODE_RAILWAY : pal = 3; break; // prim + sec
|
||||||
}
|
}
|
||||||
switch (pal) {
|
switch (pal) {
|
||||||
case 0: //default palette. Exceptions for specific effects above
|
case 0: //default palette. Exceptions for specific effects above
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
#include "wled.h"
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
#include "src/dependencies/blynk/Blynk/BlynkHandlers.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Remote light control with the free Blynk app
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint16_t blHue = 0;
|
|
||||||
byte blSat = 255;
|
|
||||||
|
|
||||||
void initBlynk(const char *auth, const char *host, uint16_t port)
|
|
||||||
{
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
if (!WLED_CONNECTED) return;
|
|
||||||
blynkEnabled = (auth[0] != 0);
|
|
||||||
if (blynkEnabled) Blynk.config(auth, host, port);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void handleBlynk()
|
|
||||||
{
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
if (WLED_CONNECTED && blynkEnabled)
|
|
||||||
Blynk.run();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateBlynk()
|
|
||||||
{
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
if (!WLED_CONNECTED) return;
|
|
||||||
Blynk.virtualWrite(V0, bri);
|
|
||||||
//we need a RGB -> HSB convert here
|
|
||||||
Blynk.virtualWrite(V3, bri? 1:0);
|
|
||||||
Blynk.virtualWrite(V4, effectCurrent);
|
|
||||||
Blynk.virtualWrite(V5, effectSpeed);
|
|
||||||
Blynk.virtualWrite(V6, effectIntensity);
|
|
||||||
Blynk.virtualWrite(V7, nightlightActive);
|
|
||||||
Blynk.virtualWrite(V8, notifyDirect);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
BLYNK_WRITE(V0)
|
|
||||||
{
|
|
||||||
bri = param.asInt();//bri
|
|
||||||
stateUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V1)
|
|
||||||
{
|
|
||||||
blHue = param.asInt();//hue
|
|
||||||
colorHStoRGB(blHue*10,blSat,col);
|
|
||||||
colorUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V2)
|
|
||||||
{
|
|
||||||
blSat = param.asInt();//sat
|
|
||||||
colorHStoRGB(blHue*10,blSat,col);
|
|
||||||
colorUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V3)
|
|
||||||
{
|
|
||||||
bool on = (param.asInt()>0);
|
|
||||||
if (!on != !bri) {toggleOnOff(); stateUpdated(CALL_MODE_BLYNK);}
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V4)
|
|
||||||
{
|
|
||||||
effectCurrent = param.asInt()-1;//fx
|
|
||||||
colorUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V5)
|
|
||||||
{
|
|
||||||
effectSpeed = param.asInt();//sx
|
|
||||||
colorUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V6)
|
|
||||||
{
|
|
||||||
effectIntensity = param.asInt();//ix
|
|
||||||
colorUpdated(CALL_MODE_BLYNK);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V7)
|
|
||||||
{
|
|
||||||
nightlightActive = (param.asInt()>0);
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_WRITE(V8)
|
|
||||||
{
|
|
||||||
notifyDirect = (param.asInt()>0); //send notifications
|
|
||||||
}
|
|
||||||
#endif
|
|
@ -423,17 +423,6 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
|||||||
|
|
||||||
CJSON(alexaNumPresets, interfaces["va"]["p"]);
|
CJSON(alexaNumPresets, interfaces["va"]["p"]);
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
const char* apikey = interfaces["blynk"][F("token")] | "Hidden";
|
|
||||||
tdd = strnlen(apikey, 36);
|
|
||||||
if (tdd > 20 || tdd == 0)
|
|
||||||
getStringFromJson(blynkApiKey, apikey, 36); //normally not present due to security
|
|
||||||
|
|
||||||
JsonObject if_blynk = interfaces["blynk"];
|
|
||||||
getStringFromJson(blynkHost, if_blynk[F("host")], 33);
|
|
||||||
CJSON(blynkPort, if_blynk["port"]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
JsonObject if_mqtt = interfaces["mqtt"];
|
JsonObject if_mqtt = interfaces["mqtt"];
|
||||||
CJSON(mqttEnabled, if_mqtt["en"]);
|
CJSON(mqttEnabled, if_mqtt["en"]);
|
||||||
@ -881,13 +870,6 @@ void serializeConfig() {
|
|||||||
|
|
||||||
if_va["p"] = alexaNumPresets;
|
if_va["p"] = alexaNumPresets;
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
JsonObject if_blynk = interfaces.createNestedObject("blynk");
|
|
||||||
if_blynk[F("token")] = strlen(blynkApiKey) ? "Hidden":"";
|
|
||||||
if_blynk[F("host")] = blynkHost;
|
|
||||||
if_blynk["port"] = blynkPort;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
|
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
|
||||||
if_mqtt["en"] = mqttEnabled;
|
if_mqtt["en"] = mqttEnabled;
|
||||||
@ -1018,13 +1000,6 @@ bool deserializeConfigSec() {
|
|||||||
|
|
||||||
JsonObject interfaces = doc["if"];
|
JsonObject interfaces = doc["if"];
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
const char* apikey = interfaces["blynk"][F("token")] | "Hidden";
|
|
||||||
int tdd = strnlen(apikey, 36);
|
|
||||||
if (tdd > 20 || tdd == 0)
|
|
||||||
getStringFromJson(blynkApiKey, apikey, 36);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
JsonObject if_mqtt = interfaces["mqtt"];
|
JsonObject if_mqtt = interfaces["mqtt"];
|
||||||
getStringFromJson(mqttPass, if_mqtt["psk"], 65);
|
getStringFromJson(mqttPass, if_mqtt["psk"], 65);
|
||||||
@ -1063,10 +1038,6 @@ void serializeConfigSec() {
|
|||||||
ap["psk"] = apPass;
|
ap["psk"] = apPass;
|
||||||
|
|
||||||
JsonObject interfaces = doc.createNestedObject("if");
|
JsonObject interfaces = doc.createNestedObject("if");
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
JsonObject if_blynk = interfaces.createNestedObject("blynk");
|
|
||||||
if_blynk[F("token")] = blynkApiKey;
|
|
||||||
#endif
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
|
JsonObject if_mqtt = interfaces.createNestedObject("mqtt");
|
||||||
if_mqtt["psk"] = mqttPass;
|
if_mqtt["psk"] = mqttPass;
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
#define CALL_MODE_FX_CHANGED 6 //no longer used
|
#define CALL_MODE_FX_CHANGED 6 //no longer used
|
||||||
#define CALL_MODE_HUE 7
|
#define CALL_MODE_HUE 7
|
||||||
#define CALL_MODE_PRESET_CYCLE 8
|
#define CALL_MODE_PRESET_CYCLE 8
|
||||||
#define CALL_MODE_BLYNK 9
|
#define CALL_MODE_BLYNK 9 //no longer used
|
||||||
#define CALL_MODE_ALEXA 10
|
#define CALL_MODE_ALEXA 10
|
||||||
#define CALL_MODE_WS_SEND 11 //special call mode, not for notifier, updates websocket only
|
#define CALL_MODE_WS_SEND 11 //special call mode, not for notifier, updates websocket only
|
||||||
#define CALL_MODE_BUTTON_PRESET 12 //button/IR JSON preset/macro
|
#define CALL_MODE_BUTTON_PRESET 12 //button/IR JSON preset/macro
|
||||||
|
@ -179,22 +179,12 @@ Alexa invocation name: <input type="text" name="AI" maxlength="32"><br>
|
|||||||
Also emulate devices to call the first <input name="AP" type="number" class="s" min="0" max="9" required> presets<br><br>
|
Also emulate devices to call the first <input name="AP" type="number" class="s" min="0" max="9" required> presets<br><br>
|
||||||
</div>
|
</div>
|
||||||
<hr class="sml">
|
<hr class="sml">
|
||||||
<div style="color: #fa0;">⚠ <b>Blynk, MQTT and Hue sync all connect to external hosts!<br>
|
<div style="color: #fa0;">⚠ <b>MQTT and Hue sync all connect to external hosts!<br>
|
||||||
This may impact the responsiveness of WLED.</b><br>
|
This may impact the responsiveness of WLED.</b><br>
|
||||||
</div>
|
</div>
|
||||||
For best results, only use one of these services at a time.<br>
|
For best results, only use one of these services at a time.<br>
|
||||||
(alternatively, connect a second ESP to them and use the UDP sync)
|
(alternatively, connect a second ESP to them and use the UDP sync)
|
||||||
<hr class="sml">
|
<hr class="sml">
|
||||||
<h3>Blynk</h3>
|
|
||||||
<div id="NoBlynk" class="hide">
|
|
||||||
<em style="color:#fa0;">This firmware build does not include Blynk support.<br></em>
|
|
||||||
</div>
|
|
||||||
<div id="Blynk">
|
|
||||||
Host: <input type="text" name="BH" maxlength="32">
|
|
||||||
Port: <input name="BP" type="number" min="1" max="65535" value="80" class="d5"><br>
|
|
||||||
Device Auth token: <input name="BK" maxlength="33"><br>
|
|
||||||
<i>Clear the token field to disable. </i><a href="https://kno.wled.ge/interfaces/blynk/" target="_blank">Setup info</a>
|
|
||||||
</div>
|
|
||||||
<h3>MQTT</h3>
|
<h3>MQTT</h3>
|
||||||
<div id="NoMQTT" class="hide">
|
<div id="NoMQTT" class="hide">
|
||||||
<em style="color:#fa0;">This firmware build does not include MQTT support.<br></em>
|
<em style="color:#fa0;">This firmware build does not include MQTT support.<br></em>
|
||||||
|
@ -13,13 +13,6 @@ void handleAlexa();
|
|||||||
void onAlexaChange(EspalexaDevice* dev);
|
void onAlexaChange(EspalexaDevice* dev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//blynk.cpp
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
void initBlynk(const char* auth, const char* host, uint16_t port);
|
|
||||||
void handleBlynk();
|
|
||||||
void updateBlynk();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//button.cpp
|
//button.cpp
|
||||||
void shortPressAction(uint8_t b=0);
|
void shortPressAction(uint8_t b=0);
|
||||||
void longPressAction(uint8_t b=0);
|
void longPressAction(uint8_t b=0);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// Autogenerated from wled00/data/style.css, do not edit!!
|
// Autogenerated from wled00/data/style.css, do not edit!!
|
||||||
const uint16_t PAGE_settingsCss_length = 847;
|
const uint16_t PAGE_settingsCss_length = 847;
|
||||||
const uint8_t PAGE_settingsCss[] PROGMEM = {
|
const uint8_t PAGE_settingsCss[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x55, 0xc1, 0x8e, 0x9b, 0x30,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x55, 0xc1, 0x8e, 0x9b, 0x30,
|
||||||
0x10, 0xfd, 0x15, 0xaa, 0x68, 0xa5, 0xad, 0x14, 0x10, 0x10, 0xc8, 0xa6, 0x46, 0x95, 0xaa, 0xde,
|
0x10, 0xfd, 0x15, 0xaa, 0x68, 0xa5, 0xad, 0x14, 0x10, 0x10, 0xc8, 0xa6, 0x46, 0x95, 0xaa, 0xde,
|
||||||
0x7b, 0xab, 0xaa, 0x4a, 0xd5, 0x1e, 0x0c, 0x1e, 0x82, 0x15, 0x63, 0x23, 0xdb, 0x74, 0x49, 0x11,
|
0x7b, 0xab, 0xaa, 0x4a, 0xd5, 0x1e, 0x0c, 0x1e, 0x82, 0x15, 0x63, 0x23, 0xdb, 0x74, 0x49, 0x11,
|
||||||
0xff, 0x5e, 0xdb, 0xc0, 0x42, 0xb2, 0x68, 0x7b, 0xa9, 0xa2, 0x44, 0xc4, 0x63, 0xc6, 0x6f, 0xde,
|
0xff, 0x5e, 0xdb, 0xc0, 0x42, 0xb2, 0x68, 0x7b, 0xa9, 0xa2, 0x44, 0xc4, 0x63, 0xc6, 0x6f, 0xde,
|
||||||
@ -67,7 +67,7 @@ const uint8_t PAGE_settingsCss[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings.htm, do not edit!!
|
// Autogenerated from wled00/data/settings.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_length = 992;
|
const uint16_t PAGE_settings_length = 992;
|
||||||
const uint8_t PAGE_settings[] PROGMEM = {
|
const uint8_t PAGE_settings[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x56, 0x6d, 0x6f, 0xdb, 0x36,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x56, 0x6d, 0x6f, 0xdb, 0x36,
|
||||||
0x10, 0xfe, 0xee, 0x5f, 0xc1, 0xb0, 0x58, 0x23, 0xa1, 0xb2, 0xec, 0x38, 0xc3, 0xb0, 0xc9, 0x96,
|
0x10, 0xfe, 0xee, 0x5f, 0xc1, 0xb0, 0x58, 0x23, 0xa1, 0xb2, 0xec, 0x38, 0xc3, 0xb0, 0xc9, 0x96,
|
||||||
0x8b, 0x35, 0x2f, 0x9b, 0x87, 0x04, 0x0d, 0x90, 0xa4, 0xdd, 0x80, 0x7d, 0xa1, 0xc9, 0x93, 0xcc,
|
0x8b, 0x35, 0x2f, 0x9b, 0x87, 0x04, 0x0d, 0x90, 0xa4, 0xdd, 0x80, 0x7d, 0xa1, 0xc9, 0x93, 0xcc,
|
||||||
0x46, 0x22, 0x05, 0xf2, 0xe4, 0xc4, 0x73, 0xf3, 0xdf, 0x77, 0x94, 0x9d, 0xb7, 0x26, 0x18, 0x86,
|
0x46, 0x22, 0x05, 0xf2, 0xe4, 0xc4, 0x73, 0xf3, 0xdf, 0x77, 0x94, 0x9d, 0xb7, 0x26, 0x18, 0x86,
|
||||||
@ -135,7 +135,7 @@ const uint8_t PAGE_settings[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_wifi.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_wifi.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_wifi_length = 2098;
|
const uint16_t PAGE_settings_wifi_length = 2098;
|
||||||
const uint8_t PAGE_settings_wifi[] PROGMEM = {
|
const uint8_t PAGE_settings_wifi[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xb5, 0x58, 0x6b, 0x6f, 0xdb, 0xca,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xb5, 0x58, 0x6b, 0x6f, 0xdb, 0xca,
|
||||||
0x11, 0xfd, 0xae, 0x5f, 0xb1, 0xde, 0x16, 0x06, 0x09, 0xd3, 0x94, 0x64, 0x35, 0x69, 0x60, 0x8b,
|
0x11, 0xfd, 0xae, 0x5f, 0xb1, 0xde, 0x16, 0x06, 0x09, 0xd3, 0x94, 0x64, 0x35, 0x69, 0x60, 0x8b,
|
||||||
0x4a, 0xfd, 0xd0, 0x8d, 0xdd, 0x3a, 0x8e, 0x0a, 0x19, 0xd7, 0x28, 0xd2, 0xe0, 0x5e, 0x9a, 0x1c,
|
0x4a, 0xfd, 0xd0, 0x8d, 0xdd, 0x3a, 0x8e, 0x0a, 0x19, 0xd7, 0x28, 0xd2, 0xe0, 0x5e, 0x9a, 0x1c,
|
||||||
0x49, 0x1b, 0x93, 0xbb, 0xbc, 0xdc, 0xa5, 0x64, 0xc3, 0xd6, 0x7f, 0xef, 0xcc, 0x2e, 0xf5, 0xb4,
|
0x49, 0x1b, 0x93, 0xbb, 0xbc, 0xdc, 0xa5, 0x64, 0xc3, 0xd6, 0x7f, 0xef, 0xcc, 0x2e, 0xf5, 0xb4,
|
||||||
@ -273,7 +273,7 @@ const uint8_t PAGE_settings_wifi[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_leds.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_leds_length = 7500;
|
const uint16_t PAGE_settings_leds_length = 7500;
|
||||||
const uint8_t PAGE_settings_leds[] PROGMEM = {
|
const uint8_t PAGE_settings_leds[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xdd, 0x3c, 0xed, 0x76, 0xda, 0xc8,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xdd, 0x3c, 0xed, 0x76, 0xda, 0xc8,
|
||||||
0x92, 0xff, 0x79, 0x8a, 0x76, 0xcf, 0x8c, 0x23, 0x5d, 0x64, 0x90, 0xf8, 0xc8, 0x38, 0x80, 0xf0,
|
0x92, 0xff, 0x79, 0x8a, 0x76, 0xcf, 0x8c, 0x23, 0x5d, 0x64, 0x90, 0xf8, 0xc8, 0x38, 0x80, 0xf0,
|
||||||
0x1a, 0xc7, 0xc9, 0xf8, 0x5e, 0x7b, 0xe2, 0x63, 0x3c, 0xc9, 0xbd, 0x27, 0x93, 0x93, 0x08, 0xd1,
|
0x1a, 0xc7, 0xc9, 0xf8, 0x5e, 0x7b, 0xe2, 0x63, 0x3c, 0xc9, 0xbd, 0x27, 0x93, 0x93, 0x08, 0xd1,
|
||||||
0x80, 0x62, 0x21, 0x71, 0x25, 0x61, 0x9b, 0xb5, 0xd9, 0x67, 0xda, 0x67, 0xd8, 0x27, 0xdb, 0xaa,
|
0x80, 0x62, 0x21, 0x71, 0x25, 0x61, 0x9b, 0xb5, 0xd9, 0x67, 0xda, 0x67, 0xd8, 0x27, 0xdb, 0xaa,
|
||||||
@ -748,7 +748,7 @@ const uint8_t PAGE_settings_leds[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_dmx.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_dmx.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_dmx_length = 1612;
|
const uint16_t PAGE_settings_dmx_length = 1612;
|
||||||
const uint8_t PAGE_settings_dmx[] PROGMEM = {
|
const uint8_t PAGE_settings_dmx[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x57, 0xdb, 0x72, 0xdb, 0x36,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x95, 0x57, 0xdb, 0x72, 0xdb, 0x36,
|
||||||
0x10, 0x7d, 0xd7, 0x57, 0x20, 0x78, 0x88, 0xc9, 0x31, 0x43, 0x4a, 0x4e, 0x95, 0x36, 0x32, 0x49,
|
0x10, 0x7d, 0xd7, 0x57, 0x20, 0x78, 0x88, 0xc9, 0x31, 0x43, 0x4a, 0x4e, 0x95, 0x36, 0x32, 0x49,
|
||||||
0x37, 0x56, 0x5c, 0xdb, 0x1d, 0xdb, 0xf5, 0x44, 0x49, 0xd3, 0x4e, 0xd3, 0xe9, 0x40, 0xe4, 0x4a,
|
0x37, 0x56, 0x5c, 0xdb, 0x1d, 0xdb, 0xf5, 0x44, 0x49, 0xd3, 0x4e, 0xd3, 0xe9, 0x40, 0xe4, 0x4a,
|
||||||
0x44, 0x4c, 0x02, 0x2c, 0x00, 0x4a, 0x76, 0x2e, 0xff, 0xde, 0x05, 0x48, 0x5d, 0xec, 0xd8, 0x69,
|
0x44, 0x4c, 0x02, 0x2c, 0x00, 0x4a, 0x76, 0x2e, 0xff, 0xde, 0x05, 0x48, 0x5d, 0xec, 0xd8, 0x69,
|
||||||
@ -855,7 +855,7 @@ const uint8_t PAGE_settings_dmx[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_ui.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_ui.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_ui_length = 3181;
|
const uint16_t PAGE_settings_ui_length = 3181;
|
||||||
const uint8_t PAGE_settings_ui[] PROGMEM = {
|
const uint8_t PAGE_settings_ui[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x59, 0x6d, 0x77, 0xda, 0x38,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x59, 0x6d, 0x77, 0xda, 0x38,
|
||||||
0x16, 0xfe, 0xce, 0xaf, 0x50, 0xd5, 0x39, 0x19, 0x38, 0x71, 0x81, 0xb4, 0xb3, 0x67, 0x5b, 0xc0,
|
0x16, 0xfe, 0xce, 0xaf, 0x50, 0xd5, 0x39, 0x19, 0x38, 0x71, 0x81, 0xb4, 0xb3, 0x67, 0x5b, 0xc0,
|
||||||
0x64, 0x9b, 0x34, 0xd3, 0x66, 0x4e, 0x3a, 0xed, 0x96, 0x74, 0x3b, 0x73, 0xba, 0x3d, 0x19, 0x63,
|
0x64, 0x9b, 0x34, 0xd3, 0x66, 0x4e, 0x3a, 0xed, 0x96, 0x74, 0x3b, 0x73, 0xba, 0x3d, 0x19, 0x63,
|
||||||
0x0b, 0x50, 0x63, 0x5b, 0x1e, 0x4b, 0x0e, 0xc9, 0x52, 0xfe, 0xfb, 0x3e, 0x57, 0xb2, 0xc1, 0x90,
|
0x0b, 0x50, 0x63, 0x5b, 0x1e, 0x4b, 0x0e, 0xc9, 0x52, 0xfe, 0xfb, 0x3e, 0x57, 0xb2, 0xc1, 0x90,
|
||||||
@ -1058,228 +1058,222 @@ const uint8_t PAGE_settings_ui[] PROGMEM = {
|
|||||||
|
|
||||||
|
|
||||||
// Autogenerated from wled00/data/settings_sync.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_sync.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_sync_length = 3403;
|
const uint16_t PAGE_settings_sync_length = 3304;
|
||||||
const uint8_t PAGE_settings_sync[] PROGMEM = {
|
const uint8_t PAGE_settings_sync[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xad, 0x5a, 0x6d, 0x73, 0xda, 0x48,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xad, 0x5a, 0xeb, 0x73, 0xda, 0x48,
|
||||||
0x12, 0xfe, 0xae, 0x5f, 0x31, 0xd6, 0x56, 0xe5, 0x60, 0x8d, 0x41, 0x80, 0x71, 0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x2e, 0x90, 0xe0, 0xd2, 0x22,
|
||||||
0x24, 0x87, 0xd6, 0x61, 0x59, 0x0a, 0x2e, 0xfd, 0xc0, 0xf3, 0xd6, 0xd0, 0xf3, 0x0b, 0xea, 0x81,
|
0xc9, 0x51, 0xfd, 0xa8, 0x28, 0x05, 0x97, 0x7e, 0xe0, 0x79, 0x2b, 0xe8, 0xf9, 0x05, 0xf5, 0x40,
|
||||||
0x66, 0x26, 0x06, 0xda, 0x89, 0x69, 0xdb, 0x19, 0x9c, 0xc0, 0xc1, 0x54, 0x5c, 0xd5, 0xe3, 0x84,
|
0x33, 0x13, 0x03, 0xed, 0xd4, 0xb4, 0xac, 0x14, 0x4e, 0xe0, 0x60, 0x2a, 0xae, 0xaa, 0x51, 0xcc,
|
||||||
0x4b, 0xee, 0xf2, 0x00, 0x0e, 0xa8, 0x90, 0xd4, 0xaa, 0x55, 0x14, 0xc4, 0xda, 0x48, 0x11, 0x8c,
|
0x25, 0x77, 0xb8, 0x0f, 0x07, 0x54, 0x48, 0x5a, 0xaf, 0x94, 0x14, 0xc4, 0x5a, 0x48, 0xe1, 0x8f,
|
||||||
0x24, 0x4f, 0x20, 0xba, 0x10, 0x44, 0xfb, 0x92, 0x85, 0x98, 0x09, 0x6e, 0x1f, 0x6c, 0x56, 0xfd,
|
0x24, 0x8f, 0x21, 0xba, 0x10, 0x44, 0xfb, 0x92, 0x05, 0x98, 0x09, 0x4e, 0x1f, 0x6c, 0x56, 0xfe,
|
||||||
0xfb, 0xef, 0x8c, 0x0c, 0xf8, 0xc3, 0x18, 0x02, 0xf7, 0x03, 0xc8, 0x27, 0x37, 0xdc, 0x63, 0x75,
|
0xfb, 0xef, 0x94, 0x0c, 0xf8, 0x83, 0x08, 0x02, 0xf7, 0x13, 0xc8, 0x27, 0xd7, 0xdc, 0x65, 0x55,
|
||||||
0x32, 0x08, 0x18, 0x6a, 0xc8, 0x10, 0xe0, 0xc8, 0xd7, 0x8f, 0x97, 0x17, 0xa4, 0x3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,
|
||||||
0xdc, 0xd9, 0x36, 0xc1, 0x5a, 0x50, 0x8e, 0x20, 0x60, 0x43, 0x83, 0xf8, 0xf0, 0x1d, 0x9f, 0xfe,
|
0x77, 0xb6, 0x4c, 0xb0, 0x16, 0x94, 0x23, 0x08, 0xd8, 0xc0, 0x20, 0x1e, 0x7c, 0xc7, 0xa7, 0x3f,
|
||||||
0x14, 0x66, 0x56, 0x42, 0x47, 0x13, 0x93, 0x40, 0x01, 0x9b, 0x71, 0x78, 0x13, 0x73, 0x01, 0xa5,
|
0x85, 0x99, 0x96, 0xd0, 0xd1, 0xc4, 0x24, 0x50, 0xc0, 0x66, 0x1c, 0xde, 0x44, 0x5c, 0x40, 0x29,
|
||||||
0x14, 0xd2, 0x3b, 0x1d, 0x87, 0x3e, 0x94, 0x32, 0x8c, 0x7c, 0x60, 0xf5, 0xfc, 0x47, 0xa2, 0x6a,
|
0x85, 0xf4, 0x4e, 0xc6, 0x81, 0x07, 0xa5, 0x0c, 0x23, 0x1f, 0x58, 0x5d, 0xef, 0x89, 0xa8, 0x1a,
|
||||||
0x84, 0x6d, 0x4a, 0x0e, 0xe6, 0x79, 0xca, 0xd6, 0x8c, 0x6c, 0x71, 0xc6, 0x82, 0xb8, 0x07, 0x6b,
|
0x61, 0x99, 0x92, 0x83, 0x79, 0x9e, 0xd3, 0x35, 0x23, 0x5d, 0x9c, 0x31, 0x3f, 0xea, 0xc0, 0x1a,
|
||||||
0x00, 0x47, 0x12, 0x8b, 0x10, 0x00, 0x97, 0x6d, 0xea, 0x2f, 0x28, 0xcd, 0x0d, 0x7c, 0xf7, 0xc1,
|
0xc0, 0x91, 0xc4, 0x22, 0x04, 0xc0, 0x65, 0x99, 0xfa, 0x0b, 0x4a, 0x73, 0x7c, 0xcf, 0x79, 0xb4,
|
||||||
0x36, 0xaf, 0x51, 0xd6, 0xfb, 0x6e, 0x43, 0xbf, 0x00, 0x55, 0x41, 0x44, 0xc1, 0x63, 0xac, 0x61,
|
0xcc, 0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, 0x24, 0xcd,
|
0x8d, 0x28, 0x3e, 0x65, 0x5b, 0x78, 0x79, 0x07, 0xec, 0x20, 0x4b, 0x30, 0x1f, 0x33, 0x49, 0x33,
|
||||||
0x7c, 0xd1, 0x57, 0x9d, 0xa2, 0xf2, 0x02, 0xc4, 0x06, 0xce, 0x09, 0xea, 0xc6, 0x00, 0x0f, 0xaa,
|
0x77, 0xfb, 0xaa, 0x53, 0x54, 0x5e, 0x80, 0xd8, 0xc0, 0x39, 0x41, 0xdd, 0x18, 0xe0, 0x41, 0x75,
|
||||||
0xd3, 0x97, 0xe8, 0x39, 0xc2, 0xc4, 0x71, 0x04, 0x10, 0xa1, 0x59, 0x6f, 0x37, 0x49, 0x45, 0x9c,
|
0xfa, 0x12, 0x3d, 0x47, 0x98, 0x38, 0x8e, 0x00, 0x22, 0x34, 0xaa, 0x87, 0x0d, 0x52, 0x12, 0xe7,
|
||||||
0x9d, 0x7f, 0xaa, 0x76, 0x1b, 0x9a, 0xc2, 0x29, 0x51, 0xe2, 0x54, 0x62, 0x3a, 0x67, 0x89, 0x3c,
|
0x17, 0x37, 0xe5, 0x76, 0x4d, 0x53, 0xd8, 0x05, 0x4a, 0x9c, 0x4a, 0x4c, 0xfb, 0x3c, 0x96, 0x07,
|
||||||
0x00, 0x55, 0x0a, 0xa2, 0xb2, 0x3c, 0x88, 0x1a, 0xad, 0x09, 0x0c, 0x8f, 0x66, 0xfe, 0x04, 0x78,
|
0xa0, 0x4a, 0x4e, 0x54, 0x94, 0x07, 0x51, 0xa3, 0x35, 0x81, 0xe1, 0xd1, 0xcc, 0x9e, 0x00, 0xaf,
|
||||||
0x95, 0x0a, 0xc9, 0x43, 0x82, 0x3d, 0xfa, 0x5c, 0x7e, 0x43, 0xbf, 0xd7, 0xc7, 0x54, 0x6d, 0x33,
|
0x12, 0x21, 0x79, 0x40, 0xb0, 0x47, 0x9f, 0xcb, 0xaf, 0xe9, 0xf7, 0xfa, 0x98, 0xaa, 0x6d, 0x46,
|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x08, 0x27, 0xa0, 0x3c, 0x9c, 0x9b, 0xc5, 0x21, 0xf5, 0xc9, 0x8c, 0x0b, 0x29, 0xf6,
|
||||||
0x24, 0xa2, 0x01, 0x99, 0x71, 0x21, 0x85, 0x2a, 0x38, 0xda, 0x97, 0x21, 0x7d, 0x21, 0x7e, 0x08,
|
0x74, 0x3a, 0xa1, 0x0f, 0x03, 0xfa, 0x4a, 0xbc, 0x00, 0x10, 0x5d, 0xaa, 0xb3, 0x81, 0x42, 0x11,
|
||||||
0xc8, 0x2e, 0xd5, 0x19, 0x41, 0xb1, 0x18, 0x1a, 0x51, 0xa8, 0x9f, 0x91, 0x6a, 0xd2, 0x27, 0xea,
|
0x34, 0xa0, 0x50, 0x37, 0x43, 0xd5, 0x9c, 0x4f, 0xd4, 0x55, 0x21, 0xd4, 0xba, 0xf1, 0x82, 0x86,
|
||||||
0xca, 0x10, 0x6a, 0xde, 0x78, 0x41, 0x53, 0xcc, 0x21, 0x32, 0x66, 0x02, 0x8b, 0xa2, 0x00, 0xd4,
|
0x98, 0x3b, 0x64, 0xcc, 0x04, 0x16, 0x43, 0x01, 0x68, 0x01, 0x03, 0x06, 0xb6, 0x49, 0x24, 0x81,
|
||||||
0x80, 0x41, 0x03, 0xdb, 0x25, 0x92, 0x42, 0x13, 0xc5, 0x23, 0x86, 0x5c, 0x20, 0x0b, 0xbe, 0x08,
|
0xe6, 0x89, 0x87, 0x0c, 0xb9, 0x40, 0x16, 0x7c, 0x11, 0x2c, 0xd6, 0xe6, 0xa3, 0x50, 0x89, 0x08,
|
||||||
0x96, 0x68, 0x33, 0x52, 0xa8, 0x48, 0x04, 0x03, 0x5e, 0x45, 0x83, 0x51, 0x81, 0xe8, 0x47, 0x75,
|
0x06, 0xba, 0x8a, 0x02, 0xa3, 0x04, 0x51, 0x8f, 0xea, 0x48, 0xd8, 0xc7, 0x7f, 0xad, 0xe4, 0x8a,
|
||||||
0x24, 0xec, 0x13, 0xbc, 0xd4, 0x0a, 0x45, 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4, 0xac, 0xf5, 0x93, 0xb2, 0xca, 0x15, 0xfc, 0x5c, 0x2f, 0xa8, 0xf3, 0xf6, 0x08, 0x69,
|
0x2a, 0xfe, 0xaa, 0x0b, 0x7f, 0xf0, 0x97, 0x5f, 0xfc, 0x19, 0x18, 0xff, 0xff, 0xd4, 0xff, 0x00,
|
||||||
0xe0, 0x73, 0x83, 0xa0, 0x77, 0xad, 0x26, 0x0c, 0xd2, 0xf8, 0xb9, 0x5e, 0x50, 0xd3, 0x52, 0xbb,
|
0xfb, 0x96, 0x87, 0x40, 0x4f, 0x25, 0x00, 0x00
|
||||||
0xa9, 0x3f, 0x1b, 0x44, 0x35, 0xb5, 0x52, 0xcd, 0xb2, 0x56, 0x4b, 0xe3, 0x36, 0x80, 0xd7, 0x6f,
|
|
||||||
0x8c, 0xc5, 0xd8, 0x5d, 0x6b, 0x53, 0x21, 0xb2, 0x63, 0x79, 0xee, 0x87, 0x71, 0xc2, 0x1f, 0xeb,
|
|
||||||
0x64, 0xc4, 0x61, 0xc4, 0x1c, 0x73, 0x9a, 0x78, 0xba, 0xd1, 0x47, 0xb0, 0xcc, 0x80, 0x91, 0xcc,
|
|
||||||
0x20, 0x29, 0x95, 0x3f, 0x8a, 0x3b, 0x60, 0x2c, 0x56, 0x1b, 0x7f, 0x05, 0xff, 0x99, 0x1f, 0xb4,
|
|
||||||
0x8d, 0x85, 0x1f, 0xcb, 0xf1, 0x47, 0x7b, 0xf8, 0x83, 0x3f, 0xec, 0xe3, 0xaf, 0xfc, 0xf8, 0xdf,
|
|
||||||
0xe3, 0xfe, 0x07, 0xc0, 0x76, 0xd3, 0x8e, 0x2e, 0x27, 0x00, 0x00
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_time.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_time_length = 3313;
|
const uint16_t PAGE_settings_time_length = 3313;
|
||||||
const uint8_t PAGE_settings_time[] PROGMEM = {
|
const uint8_t PAGE_settings_time[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xd5, 0x1a, 0x6b, 0x57, 0xdb, 0x38,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xd5, 0x1a, 0x6b, 0x57, 0xdb, 0x38,
|
||||||
0xf6, 0x7b, 0x7e, 0x85, 0x50, 0x7b, 0x98, 0x78, 0x70, 0x9e, 0x90, 0x16, 0x92, 0xd8, 0xdd, 0x10,
|
0xf6, 0x7b, 0x7e, 0x85, 0x50, 0x7b, 0x98, 0x78, 0x70, 0x9e, 0x90, 0x16, 0x92, 0xd8, 0xdd, 0x10,
|
||||||
0xd2, 0x42, 0x4b, 0x02, 0x67, 0x92, 0x0e, 0xbb, 0xd3, 0xf6, 0x4c, 0x15, 0x5b, 0x49, 0x0c, 0x8e,
|
0xd2, 0x42, 0x4b, 0x02, 0x67, 0x92, 0x0e, 0xbb, 0xd3, 0xf6, 0x4c, 0x15, 0x5b, 0x49, 0x0c, 0x8e,
|
||||||
0xe4, 0xb5, 0x65, 0x02, 0x4b, 0xf9, 0xef, 0x7b, 0x25, 0x39, 0xce, 0xd3, 0xd0, 0x76, 0x66, 0x3f,
|
0xe4, 0xb5, 0x65, 0x02, 0x4b, 0xf9, 0xef, 0x7b, 0x25, 0x39, 0xce, 0xd3, 0xd0, 0x76, 0x66, 0x3f,
|
||||||
@ -1493,7 +1487,7 @@ const uint8_t PAGE_settings_time[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_sec.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_sec_length = 2407;
|
const uint16_t PAGE_settings_sec_length = 2407;
|
||||||
const uint8_t PAGE_settings_sec[] PROGMEM = {
|
const uint8_t PAGE_settings_sec[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xa5, 0x58, 0x6d, 0x53, 0xdb, 0x48,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xa5, 0x58, 0x6d, 0x53, 0xdb, 0x48,
|
||||||
0x12, 0xfe, 0xee, 0x5f, 0x31, 0x9e, 0x54, 0xb1, 0xd6, 0x45, 0x58, 0x40, 0x72, 0x5b, 0x09, 0x58,
|
0x12, 0xfe, 0xee, 0x5f, 0x31, 0x9e, 0x54, 0xb1, 0xd6, 0x45, 0x58, 0x40, 0x72, 0x5b, 0x09, 0x58,
|
||||||
0xce, 0x41, 0x20, 0x1b, 0xae, 0x20, 0x50, 0xd8, 0x6c, 0xee, 0x2a, 0x97, 0x4a, 0x8d, 0xa5, 0xb1,
|
0xce, 0x41, 0x20, 0x1b, 0xae, 0x20, 0x50, 0xd8, 0x6c, 0xee, 0x2a, 0x97, 0x4a, 0x8d, 0xa5, 0xb1,
|
||||||
0x35, 0xb1, 0xac, 0xd1, 0xce, 0x8c, 0x70, 0x7c, 0xd9, 0xfd, 0xef, 0xf7, 0xf4, 0x48, 0x32, 0x86,
|
0x35, 0xb1, 0xac, 0xd1, 0xce, 0x8c, 0x70, 0x7c, 0xd9, 0xfd, 0xef, 0xf7, 0xf4, 0x48, 0x32, 0x86,
|
||||||
@ -1650,7 +1644,7 @@ const uint8_t PAGE_settings_sec[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_um.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_um_length = 2786;
|
const uint16_t PAGE_settings_um_length = 2786;
|
||||||
const uint8_t PAGE_settings_um[] PROGMEM = {
|
const uint8_t PAGE_settings_um[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xcd, 0x59, 0x6d, 0x73, 0xdb, 0x36,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xcd, 0x59, 0x6d, 0x73, 0xdb, 0x36,
|
||||||
0x12, 0xfe, 0xee, 0x5f, 0x41, 0x23, 0x1e, 0x9b, 0x1c, 0xd1, 0x94, 0x9c, 0xb4, 0x33, 0xa9, 0x24,
|
0x12, 0xfe, 0xee, 0x5f, 0x41, 0x23, 0x1e, 0x9b, 0x1c, 0xd1, 0x94, 0x9c, 0xb4, 0x33, 0xa9, 0x24,
|
||||||
0xd2, 0x97, 0x38, 0x69, 0xa3, 0xcb, 0x8b, 0x3d, 0xe3, 0xb4, 0x9d, 0x1b, 0xc7, 0x17, 0x53, 0x22,
|
0xd2, 0x97, 0x38, 0x69, 0xa3, 0xcb, 0x8b, 0x3d, 0xe3, 0xb4, 0x9d, 0x1b, 0xc7, 0x17, 0x53, 0x22,
|
||||||
0x24, 0x21, 0xa6, 0x00, 0x16, 0x04, 0xfd, 0x72, 0xb2, 0xfe, 0xfb, 0x3d, 0x0b, 0xbe, 0x88, 0x72,
|
0x24, 0x21, 0xa6, 0x00, 0x16, 0x04, 0xfd, 0x72, 0xb2, 0xfe, 0xfb, 0x3d, 0x0b, 0xbe, 0x88, 0x72,
|
||||||
@ -1831,7 +1825,7 @@ const uint8_t PAGE_settings_um[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_2D.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_2D.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_2D_length = 3161;
|
const uint16_t PAGE_settings_2D_length = 3161;
|
||||||
const uint8_t PAGE_settings_2D[] PROGMEM = {
|
const uint8_t PAGE_settings_2D[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xc5, 0x59, 0x5b, 0x77, 0xdb, 0x36,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xc5, 0x59, 0x5b, 0x77, 0xdb, 0x36,
|
||||||
0x12, 0x7e, 0xd7, 0xaf, 0x80, 0xd1, 0xae, 0x4b, 0x5a, 0xd4, 0xcd, 0x4d, 0x7a, 0x5a, 0x49, 0xa4,
|
0x12, 0x7e, 0xd7, 0xaf, 0x80, 0xd1, 0xae, 0x4b, 0x5a, 0xd4, 0xcd, 0x4d, 0x7a, 0x5a, 0x49, 0xa4,
|
||||||
0x36, 0x8e, 0xd3, 0xd8, 0x7b, 0xe2, 0x44, 0xc7, 0x72, 0xed, 0xe4, 0xb4, 0x3d, 0x2d, 0x4d, 0x42,
|
0x36, 0x8e, 0xd3, 0xd8, 0x7b, 0xe2, 0x44, 0xc7, 0x72, 0xed, 0xe4, 0xb4, 0x3d, 0x2d, 0x4d, 0x42,
|
||||||
0x12, 0x12, 0x0a, 0x60, 0x49, 0x50, 0xb6, 0xeb, 0xf8, 0xbf, 0xef, 0x0c, 0xc0, 0x9b, 0x28, 0xd9,
|
0x12, 0x12, 0x0a, 0x60, 0x49, 0x50, 0xb6, 0xeb, 0xf8, 0xbf, 0xef, 0x0c, 0xc0, 0x9b, 0x28, 0xd9,
|
||||||
@ -2035,7 +2029,7 @@ const uint8_t PAGE_settings_2D[] PROGMEM = {
|
|||||||
// Autogenerated from wled00/data/settings_pin.htm, do not edit!!
|
// Autogenerated from wled00/data/settings_pin.htm, do not edit!!
|
||||||
const uint16_t PAGE_settings_pin_length = 471;
|
const uint16_t PAGE_settings_pin_length = 471;
|
||||||
const uint8_t PAGE_settings_pin[] PROGMEM = {
|
const uint8_t PAGE_settings_pin[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x5d, 0x52, 0x4d, 0x6f, 0x13, 0x31,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0x5d, 0x52, 0x4d, 0x6f, 0x13, 0x31,
|
||||||
0x10, 0xbd, 0xef, 0xaf, 0x30, 0x73, 0x69, 0x82, 0x92, 0x6c, 0xa8, 0xa8, 0x04, 0xaa, 0xbd, 0x42,
|
0x10, 0xbd, 0xef, 0xaf, 0x30, 0x73, 0x69, 0x82, 0x92, 0x6c, 0xa8, 0xa8, 0x04, 0xaa, 0xbd, 0x42,
|
||||||
0x81, 0x1e, 0xb8, 0x94, 0x48, 0xe5, 0x52, 0x55, 0x55, 0xe5, 0xd8, 0xb3, 0x89, 0x55, 0x7f, 0x2c,
|
0x81, 0x1e, 0xb8, 0x94, 0x48, 0xe5, 0x52, 0x55, 0x55, 0xe5, 0xd8, 0xb3, 0x89, 0x55, 0x7f, 0x2c,
|
||||||
0xb6, 0x37, 0x21, 0x54, 0xfc, 0x77, 0xc6, 0xbb, 0xa1, 0xa0, 0x5c, 0xd6, 0x7e, 0x33, 0xe3, 0x37,
|
0xb6, 0x37, 0x21, 0x54, 0xfc, 0x77, 0xc6, 0xbb, 0xa1, 0xa0, 0x5c, 0xd6, 0x7e, 0x33, 0xe3, 0x37,
|
||||||
|
@ -713,9 +713,9 @@ void serializeInfo(JsonObject root)
|
|||||||
#ifndef WLED_DISABLE_ALEXA
|
#ifndef WLED_DISABLE_ALEXA
|
||||||
os += 0x40;
|
os += 0x40;
|
||||||
#endif
|
#endif
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
os += 0x20;
|
//os += 0x20; // indicated now removed Blynk support, may be reused to indicate another build-time option
|
||||||
#endif
|
|
||||||
#ifdef USERMOD_CRONIXIE
|
#ifdef USERMOD_CRONIXIE
|
||||||
os += 0x10;
|
os += 0x10;
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,7 +105,7 @@ void stateUpdated(byte callMode) {
|
|||||||
|
|
||||||
if (callMode != CALL_MODE_NOTIFICATION && callMode != CALL_MODE_NO_NOTIFY) notify(callMode);
|
if (callMode != CALL_MODE_NOTIFICATION && callMode != CALL_MODE_NO_NOTIFY) notify(callMode);
|
||||||
|
|
||||||
//set flag to update blynk, ws and mqtt
|
//set flag to update ws and mqtt
|
||||||
interfaceUpdateCallMode = callMode;
|
interfaceUpdateCallMode = callMode;
|
||||||
stateChanged = false;
|
stateChanged = false;
|
||||||
} else {
|
} else {
|
||||||
@ -170,10 +170,6 @@ void updateInterfaces(uint8_t callMode)
|
|||||||
espalexaDevice->setColor(col[0], col[1], col[2]);
|
espalexaDevice->setColor(col[0], col[1], col[2]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
if (callMode != CALL_MODE_BLYNK &&
|
|
||||||
callMode != CALL_MODE_NO_NOTIFY) updateBlynk();
|
|
||||||
#endif
|
|
||||||
doPublishMqtt = true;
|
doPublishMqtt = true;
|
||||||
interfaceUpdateCallMode = 0; //disable
|
interfaceUpdateCallMode = 0; //disable
|
||||||
}
|
}
|
||||||
@ -278,9 +274,7 @@ void handleNightlight()
|
|||||||
applyFinalBri();
|
applyFinalBri();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
updateBlynk();
|
|
||||||
#endif
|
|
||||||
if (macroNl > 0)
|
if (macroNl > 0)
|
||||||
applyPreset(macroNl);
|
applyPreset(macroNl);
|
||||||
nightlightActiveOld = false;
|
nightlightActiveOld = false;
|
||||||
|
@ -312,16 +312,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
|||||||
t = request->arg(F("AP")).toInt();
|
t = request->arg(F("AP")).toInt();
|
||||||
if (t >= 0 && t <= 9) alexaNumPresets = t;
|
if (t >= 0 && t <= 9) alexaNumPresets = t;
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
strlcpy(blynkHost, request->arg("BH").c_str(), 33);
|
|
||||||
t = request->arg(F("BP")).toInt();
|
|
||||||
if (t > 0) blynkPort = t;
|
|
||||||
|
|
||||||
if (request->hasArg("BK") && !request->arg("BK").equals(F("Hidden"))) {
|
|
||||||
strlcpy(blynkApiKey, request->arg("BK").c_str(), 36); initBlynk(blynkApiKey, blynkHost, blynkPort);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
mqttEnabled = request->hasArg(F("MQ"));
|
mqttEnabled = request->hasArg(F("MQ"));
|
||||||
strlcpy(mqttServer, request->arg(F("MS")).c_str(), 33);
|
strlcpy(mqttServer, request->arg(F("MS")).c_str(), 33);
|
||||||
|
@ -1,321 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkApi.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief High-level functions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkApi_h
|
|
||||||
#define BlynkApi_h
|
|
||||||
|
|
||||||
#include "BlynkConfig.h"
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
#include "BlynkParam.h"
|
|
||||||
#include "BlynkTimer.h"
|
|
||||||
#include "BlynkHandlers.h"
|
|
||||||
#include "BlynkProtocolDefs.h"
|
|
||||||
|
|
||||||
#if defined(BLYNK_EXPERIMENTAL)
|
|
||||||
#include <Blynk/BlynkEveryN.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents high-level functions of Blynk
|
|
||||||
*/
|
|
||||||
template <class Proto>
|
|
||||||
class BlynkApi
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BlynkApi() {
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DOXYGEN // These API here are only for the documentation
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Connects to the server.
|
|
||||||
* Blocks until connected or timeout happens.
|
|
||||||
* May take less or more then timeout value.
|
|
||||||
*
|
|
||||||
* @param timeout Connection timeout
|
|
||||||
* @returns True if connected to the server
|
|
||||||
*/
|
|
||||||
bool connect(unsigned long timeout = BLYNK_TIMEOUT_MS*3);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disconnects from the server.
|
|
||||||
* It will not try to reconnect, until connect() is called
|
|
||||||
*/
|
|
||||||
void disconnect();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns True if connected to the server
|
|
||||||
*/
|
|
||||||
bool connected();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Performs Blynk-related housekeeping
|
|
||||||
* and processes incoming commands
|
|
||||||
*
|
|
||||||
* @param available True if there is incoming data to process
|
|
||||||
* Only used when user manages connection manually.
|
|
||||||
*/
|
|
||||||
bool run(bool available = false);
|
|
||||||
|
|
||||||
#endif // DOXYGEN
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends value to a Virtual Pin
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
* @param data Value to be sent
|
|
||||||
*/
|
|
||||||
template <typename... Args>
|
|
||||||
void virtualWrite(int pin, Args... values) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add("vw");
|
|
||||||
cmd.add(pin);
|
|
||||||
cmd.add_multi(values...);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends buffer to a Virtual Pin
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
* @param buff Data buffer
|
|
||||||
* @param len Length of data
|
|
||||||
*/
|
|
||||||
void virtualWriteBinary(int pin, const void* buff, size_t len) {
|
|
||||||
char mem[8];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add("vw");
|
|
||||||
cmd.add(pin);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE, 0, cmd.getBuffer(), cmd.getLength(), buff, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends BlynkParam to a Virtual Pin
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
* @param param
|
|
||||||
*/
|
|
||||||
void virtualWrite(int pin, const BlynkParam& param) {
|
|
||||||
virtualWriteBinary(pin, param.getBuffer(), param.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
void virtualWrite(int pin, const BlynkParamAllocated& param) {
|
|
||||||
virtualWriteBinary(pin, param.getBuffer(), param.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests Server to re-send current values for all widgets.
|
|
||||||
*/
|
|
||||||
void syncAll() {
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE_SYNC);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends internal command
|
|
||||||
*/
|
|
||||||
template <typename... Args>
|
|
||||||
void sendInternal(Args... params) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add_multi(params...);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_INTERNAL, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Requests App or Server to re-send current value of a Virtual Pin.
|
|
||||||
* This will probably cause user-defined BLYNK_WRITE handler to be called.
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
*/
|
|
||||||
template <typename... Args>
|
|
||||||
void syncVirtual(Args... pins) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add("vr");
|
|
||||||
cmd.add_multi(pins...);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE_SYNC, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tweets a message
|
|
||||||
*
|
|
||||||
* @param msg Text of the message
|
|
||||||
*/
|
|
||||||
template<typename T>
|
|
||||||
void tweet(const T& msg) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(msg);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_TWEET, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends a push notification to the App
|
|
||||||
*
|
|
||||||
* @param msg Text of the message
|
|
||||||
*/
|
|
||||||
template<typename T>
|
|
||||||
void notify(const T& msg) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(msg);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_NOTIFY, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends an SMS
|
|
||||||
*
|
|
||||||
* @param msg Text of the message
|
|
||||||
*/
|
|
||||||
template<typename T>
|
|
||||||
void sms(const T& msg) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(msg);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_SMS, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends an email message
|
|
||||||
*
|
|
||||||
* @param email Email to send to
|
|
||||||
* @param subject Subject of message
|
|
||||||
* @param msg Text of the message
|
|
||||||
*/
|
|
||||||
template <typename T1, typename T2>
|
|
||||||
void email(const char* email, const T1& subject, const T2& msg) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(email);
|
|
||||||
cmd.add(subject);
|
|
||||||
cmd.add(msg);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_EMAIL, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends an email message
|
|
||||||
*
|
|
||||||
* @param subject Subject of message
|
|
||||||
* @param msg Text of the message
|
|
||||||
*/
|
|
||||||
template <typename T1, typename T2>
|
|
||||||
void email(const T1& subject, const T2& msg) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(subject);
|
|
||||||
cmd.add(msg);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_EMAIL, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets property of a Widget
|
|
||||||
*
|
|
||||||
* @experimental
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
* @param property Property name ("label", "labels", "color", ...)
|
|
||||||
* @param value Property value
|
|
||||||
*/
|
|
||||||
template <typename T, typename... Args>
|
|
||||||
void setProperty(int pin, const T& property, Args... values) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(pin);
|
|
||||||
cmd.add(property);
|
|
||||||
cmd.add_multi(values...);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_PROPERTY, 0, cmd.getBuffer(), cmd.getLength()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void setProperty(int pin, const T& property, const BlynkParam& param) {
|
|
||||||
char mem[32];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(pin);
|
|
||||||
cmd.add(property);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_PROPERTY, 0, cmd.getBuffer(), cmd.getLength(), param.getBuffer(), param.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void setProperty(int pin, const T& property, const BlynkParamAllocated& param) {
|
|
||||||
char mem[32];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(pin);
|
|
||||||
cmd.add(property);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_PROPERTY, 0, cmd.getBuffer(), cmd.getLength(), param.getBuffer(), param.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename NAME>
|
|
||||||
void logEvent(const NAME& event_name) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(event_name);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_EVENT_LOG, 0, cmd.getBuffer(), cmd.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename NAME, typename DESCR>
|
|
||||||
void logEvent(const NAME& event_name, const DESCR& description) {
|
|
||||||
char mem[BLYNK_MAX_SENDBYTES];
|
|
||||||
BlynkParam cmd(mem, 0, sizeof(mem));
|
|
||||||
cmd.add(event_name);
|
|
||||||
cmd.add(description);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_EVENT_LOG, 0, cmd.getBuffer(), cmd.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(BLYNK_EXPERIMENTAL)
|
|
||||||
// Attention!
|
|
||||||
// Every function in this section may be changed, removed or renamed.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Refreshes value of a widget by running
|
|
||||||
* user-defined BLYNK_READ handler of a pin.
|
|
||||||
*
|
|
||||||
* @experimental
|
|
||||||
*
|
|
||||||
* @param pin Virtual Pin number
|
|
||||||
*/
|
|
||||||
void refresh(int pin) {
|
|
||||||
if (WidgetReadHandler handler = GetReadHandler(pin)) {
|
|
||||||
BlynkReq req = { 0, BLYNK_SUCCESS, (uint8_t)pin };
|
|
||||||
handler(req);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delays for N milliseconds, handling server communication in background.
|
|
||||||
*
|
|
||||||
* @experimental
|
|
||||||
* @warning Should be used very carefully, especially on platforms with small RAM.
|
|
||||||
*
|
|
||||||
* @param ms Milliseconds to wait
|
|
||||||
*/
|
|
||||||
void delay(unsigned long ms) {
|
|
||||||
uint16_t start = (uint16_t)micros();
|
|
||||||
while (ms > 0) {
|
|
||||||
static_cast<Proto*>(this)->run();
|
|
||||||
#if !defined(BLYNK_NO_YIELD)
|
|
||||||
yield();
|
|
||||||
#endif
|
|
||||||
if (((uint16_t)micros() - start) >= 1000) {
|
|
||||||
ms--;
|
|
||||||
start += 1000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void processCmd(const void* buff, size_t len);
|
|
||||||
void sendInfo();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,199 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkApiArduino.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Mar 2015
|
|
||||||
* @brief
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkApiArduino_h
|
|
||||||
#define BlynkApiArduino_h
|
|
||||||
|
|
||||||
#include "BlynkApi.h"
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
#ifdef BLYNK_NO_INFO
|
|
||||||
|
|
||||||
template<class Proto>
|
|
||||||
BLYNK_FORCE_INLINE
|
|
||||||
void BlynkApi<Proto>::sendInfo() {}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
template<class Proto>
|
|
||||||
BLYNK_FORCE_INLINE
|
|
||||||
void BlynkApi<Proto>::sendInfo()
|
|
||||||
{
|
|
||||||
static const char profile[] BLYNK_PROGMEM = "blnkinf\0"
|
|
||||||
#ifdef BOARD_FIRMWARE_VERSION
|
|
||||||
BLYNK_PARAM_KV("ver" , BOARD_FIRMWARE_VERSION)
|
|
||||||
BLYNK_PARAM_KV("blynk" , BLYNK_VERSION)
|
|
||||||
#else
|
|
||||||
BLYNK_PARAM_KV("ver" , BLYNK_VERSION)
|
|
||||||
#endif
|
|
||||||
#ifdef BOARD_TEMPLATE_ID
|
|
||||||
BLYNK_PARAM_KV("tmpl" , BOARD_TEMPLATE_ID)
|
|
||||||
#endif
|
|
||||||
BLYNK_PARAM_KV("h-beat" , BLYNK_TOSTRING(BLYNK_HEARTBEAT))
|
|
||||||
BLYNK_PARAM_KV("buff-in", BLYNK_TOSTRING(BLYNK_MAX_READBYTES))
|
|
||||||
#ifdef BLYNK_INFO_DEVICE
|
|
||||||
BLYNK_PARAM_KV("dev" , BLYNK_INFO_DEVICE)
|
|
||||||
#endif
|
|
||||||
#ifdef BLYNK_INFO_CPU
|
|
||||||
BLYNK_PARAM_KV("cpu" , BLYNK_INFO_CPU)
|
|
||||||
#endif
|
|
||||||
#ifdef BLYNK_INFO_CONNECTION
|
|
||||||
BLYNK_PARAM_KV("con" , BLYNK_INFO_CONNECTION)
|
|
||||||
#endif
|
|
||||||
BLYNK_PARAM_KV("build" , __DATE__ " " __TIME__)
|
|
||||||
"\0"
|
|
||||||
;
|
|
||||||
const size_t profile_len = sizeof(profile)-8-2;
|
|
||||||
|
|
||||||
#ifdef BLYNK_HAS_PROGMEM
|
|
||||||
char mem[profile_len];
|
|
||||||
memcpy_P(mem, profile+8, profile_len);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_INTERNAL, 0, mem, profile_len);
|
|
||||||
#else
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_INTERNAL, 0, profile+8, profile_len);
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Check if analog pins can be referenced by name on this device
|
|
||||||
#if defined(analogInputToDigitalPin)
|
|
||||||
#define BLYNK_DECODE_PIN(it) (((it).asStr()[0] == 'A') ? analogInputToDigitalPin(atoi((it).asStr()+1)) : (it).asInt())
|
|
||||||
#else
|
|
||||||
#define BLYNK_DECODE_PIN(it) ((it).asInt())
|
|
||||||
|
|
||||||
#if defined(BLYNK_DEBUG_ALL)
|
|
||||||
#pragma message "analogInputToDigitalPin not defined"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class Proto>
|
|
||||||
BLYNK_FORCE_INLINE
|
|
||||||
void BlynkApi<Proto>::processCmd(const void* buff, size_t len)
|
|
||||||
{
|
|
||||||
BlynkParam param((void*)buff, len);
|
|
||||||
BlynkParam::iterator it = param.begin();
|
|
||||||
if (it >= param.end())
|
|
||||||
return;
|
|
||||||
const char* cmd = it.asStr();
|
|
||||||
uint16_t cmd16;
|
|
||||||
memcpy(&cmd16, cmd, sizeof(cmd16));
|
|
||||||
if (++it >= param.end())
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t pin = BLYNK_DECODE_PIN(it);
|
|
||||||
|
|
||||||
switch(cmd16) {
|
|
||||||
|
|
||||||
#ifndef BLYNK_NO_BUILTIN
|
|
||||||
|
|
||||||
case BLYNK_HW_PM: {
|
|
||||||
while (it < param.end()) {
|
|
||||||
pin = BLYNK_DECODE_PIN(it);
|
|
||||||
++it;
|
|
||||||
if (!strcmp(it.asStr(), "in")) {
|
|
||||||
pinMode(pin, INPUT);
|
|
||||||
} else if (!strcmp(it.asStr(), "out") || !strcmp(it.asStr(), "pwm")) {
|
|
||||||
pinMode(pin, OUTPUT);
|
|
||||||
#ifdef INPUT_PULLUP
|
|
||||||
} else if (!strcmp(it.asStr(), "pu")) {
|
|
||||||
pinMode(pin, INPUT_PULLUP);
|
|
||||||
#endif
|
|
||||||
#ifdef INPUT_PULLDOWN
|
|
||||||
} else if (!strcmp(it.asStr(), "pd")) {
|
|
||||||
pinMode(pin, INPUT_PULLDOWN);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG4(BLYNK_F("Invalid pin "), pin, BLYNK_F(" mode "), it.asStr());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case BLYNK_HW_DR: {
|
|
||||||
char mem[16];
|
|
||||||
BlynkParam rsp(mem, 0, sizeof(mem));
|
|
||||||
rsp.add("dw");
|
|
||||||
rsp.add(pin);
|
|
||||||
rsp.add(digitalRead(pin));
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE, 0, rsp.getBuffer(), rsp.getLength()-1);
|
|
||||||
} break;
|
|
||||||
case BLYNK_HW_DW: {
|
|
||||||
// Should be 1 parameter (value)
|
|
||||||
if (++it >= param.end())
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef ESP8266
|
|
||||||
// Disable PWM...
|
|
||||||
analogWrite(pin, 0);
|
|
||||||
#endif
|
|
||||||
#ifndef BLYNK_MINIMIZE_PINMODE_USAGE
|
|
||||||
pinMode(pin, OUTPUT);
|
|
||||||
#endif
|
|
||||||
digitalWrite(pin, it.asInt() ? HIGH : LOW);
|
|
||||||
} break;
|
|
||||||
case BLYNK_HW_AR: {
|
|
||||||
char mem[16];
|
|
||||||
BlynkParam rsp(mem, 0, sizeof(mem));
|
|
||||||
rsp.add("aw");
|
|
||||||
rsp.add(pin);
|
|
||||||
rsp.add(analogRead(pin));
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_HARDWARE, 0, rsp.getBuffer(), rsp.getLength()-1);
|
|
||||||
} break;
|
|
||||||
|
|
||||||
// TODO: Remove workaround for ESP32
|
|
||||||
#if !defined(ESP32)
|
|
||||||
|
|
||||||
case BLYNK_HW_AW: {
|
|
||||||
// Should be 1 parameter (value)
|
|
||||||
if (++it >= param.end())
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifndef BLYNK_MINIMIZE_PINMODE_USAGE
|
|
||||||
pinMode(pin, OUTPUT);
|
|
||||||
#endif
|
|
||||||
analogWrite(pin, it.asInt());
|
|
||||||
} break;
|
|
||||||
|
|
||||||
#endif // TODO: Remove workaround for ESP32
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case BLYNK_HW_VR: {
|
|
||||||
BlynkReq req = { pin };
|
|
||||||
WidgetReadHandler handler = GetReadHandler(pin);
|
|
||||||
if (handler && (handler != BlynkWidgetRead)) {
|
|
||||||
handler(req);
|
|
||||||
} else {
|
|
||||||
BlynkWidgetReadDefault(req);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case BLYNK_HW_VW: {
|
|
||||||
++it;
|
|
||||||
char* start = (char*)it.asStr();
|
|
||||||
BlynkParam param2(start, len - (start - (char*)buff));
|
|
||||||
BlynkReq req = { pin };
|
|
||||||
WidgetWriteHandler handler = GetWriteHandler(pin);
|
|
||||||
if (handler && (handler != BlynkWidgetWrite)) {
|
|
||||||
handler(req, param2);
|
|
||||||
} else {
|
|
||||||
BlynkWidgetWriteDefault(req, param2);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
default:
|
|
||||||
BLYNK_LOG2(BLYNK_F("Invalid HW cmd: "), cmd);
|
|
||||||
static_cast<Proto*>(this)->sendCmd(BLYNK_CMD_RESPONSE, static_cast<Proto*>(this)->msgIdOutOverride, NULL, BLYNK_ILLEGAL_COMMAND);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,128 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkParam.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkArduinoClient_h
|
|
||||||
#define BlynkArduinoClient_h
|
|
||||||
|
|
||||||
#include "BlynkApiArduino.h"
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
#include <Client.h>
|
|
||||||
|
|
||||||
#if defined(ESP8266) && !defined(BLYNK_NO_YIELD)
|
|
||||||
#define YIELD_FIX() BLYNK_RUN_YIELD();
|
|
||||||
#else
|
|
||||||
#define YIELD_FIX()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename Client>
|
|
||||||
class BlynkArduinoClientGen
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BlynkArduinoClientGen(Client& c)
|
|
||||||
: client(NULL), domain(NULL), port(0), isConn(false)
|
|
||||||
{
|
|
||||||
setClient(&c);
|
|
||||||
}
|
|
||||||
|
|
||||||
BlynkArduinoClientGen()
|
|
||||||
: client(NULL), domain(NULL), port(0), isConn(false)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void setClient(Client* c) {
|
|
||||||
client = c;
|
|
||||||
client->setTimeout(BLYNK_TIMEOUT_MS);
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(IPAddress a, uint16_t p) {
|
|
||||||
domain = NULL;
|
|
||||||
port = p;
|
|
||||||
addr = a;
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(const char* d, uint16_t p) {
|
|
||||||
domain = d;
|
|
||||||
port = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool connect() {
|
|
||||||
if (domain) {
|
|
||||||
BLYNK_LOG4(BLYNK_F("Connecting to "), domain, ':', port);
|
|
||||||
|
|
||||||
isConn = (1 == client->connect(domain, port));
|
|
||||||
return isConn;
|
|
||||||
} else { //if (uint32_t(addr) != 0) {
|
|
||||||
BLYNK_LOG_IP("Connecting to ", addr);
|
|
||||||
isConn = (1 == client->connect(addr, port));
|
|
||||||
return isConn;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void disconnect() { isConn = false; client->stop(); }
|
|
||||||
|
|
||||||
#ifdef BLYNK_ENC28J60_FIX
|
|
||||||
size_t read(void* buf, size_t len) {
|
|
||||||
while (client->available() < len) { BLYNK_RUN_YIELD(); }
|
|
||||||
return client->read((uint8_t*)buf, len);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
size_t read(void* buf, size_t len) {
|
|
||||||
size_t res = client->readBytes((char*)buf, len);
|
|
||||||
YIELD_FIX();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BLYNK_RETRY_SEND
|
|
||||||
size_t write(const void* buf, size_t len) {
|
|
||||||
size_t sent = 0;
|
|
||||||
int retry = 0;
|
|
||||||
while (sent < len && ++retry < 10) {
|
|
||||||
size_t w = client->write((const uint8_t*)buf+sent, len-sent);
|
|
||||||
if (w != 0 && w != -1) {
|
|
||||||
sent += w;
|
|
||||||
} else {
|
|
||||||
BlynkDelay(50);
|
|
||||||
#if defined(BLYNK_DEBUG) && defined(BLYNK_PRINT)
|
|
||||||
BLYNK_PRINT_TIME();
|
|
||||||
BLYNK_PRINT.print(BLYNK_F("Retry "));
|
|
||||||
BLYNK_PRINT.print(retry);
|
|
||||||
BLYNK_PRINT.print(BLYNK_F(" send: "));
|
|
||||||
BLYNK_PRINT.print(sent);
|
|
||||||
BLYNK_PRINT.print('/');
|
|
||||||
BLYNK_PRINT.println(len);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return sent;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
size_t write(const void* buf, size_t len) {
|
|
||||||
YIELD_FIX();
|
|
||||||
size_t res = client->write((const uint8_t*)buf, len);
|
|
||||||
YIELD_FIX();
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool connected() { YIELD_FIX(); return isConn && client->connected(); }
|
|
||||||
int available() { YIELD_FIX(); return client->available(); }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Client* client;
|
|
||||||
IPAddress addr;
|
|
||||||
const char* domain;
|
|
||||||
uint16_t port;
|
|
||||||
bool isConn;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef BlynkArduinoClientGen<Client> BlynkArduinoClient;
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,95 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkConfig.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Configuration of different aspects of library
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkConfig_h
|
|
||||||
#define BlynkConfig_h
|
|
||||||
|
|
||||||
#include "BlynkDetectDevice.h"
|
|
||||||
|
|
||||||
/***************************************************
|
|
||||||
* Change these settings to match your need
|
|
||||||
***************************************************/
|
|
||||||
|
|
||||||
#define BLYNK_DEFAULT_DOMAIN "blynk-cloud.com"
|
|
||||||
#define BLYNK_DEFAULT_PORT 80
|
|
||||||
#define BLYNK_DEFAULT_PORT_SSL 8441
|
|
||||||
|
|
||||||
/***************************************************
|
|
||||||
* Professional settings
|
|
||||||
***************************************************/
|
|
||||||
// Library version.
|
|
||||||
#define BLYNK_VERSION "0.5.3"
|
|
||||||
|
|
||||||
// Heartbeat period in seconds.
|
|
||||||
#ifndef BLYNK_HEARTBEAT
|
|
||||||
#define BLYNK_HEARTBEAT 10
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Network timeout in milliseconds.
|
|
||||||
#ifndef BLYNK_TIMEOUT_MS
|
|
||||||
#define BLYNK_TIMEOUT_MS 2000UL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Limit the amount of outgoing commands per second.
|
|
||||||
#ifndef BLYNK_MSG_LIMIT
|
|
||||||
#define BLYNK_MSG_LIMIT 15
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Limit the incoming command length.
|
|
||||||
#ifndef BLYNK_MAX_READBYTES
|
|
||||||
#define BLYNK_MAX_READBYTES 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Limit the outgoing command length.
|
|
||||||
#ifndef BLYNK_MAX_SENDBYTES
|
|
||||||
#define BLYNK_MAX_SENDBYTES 128
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Uncomment to use Let's Encrypt Root CA
|
|
||||||
//#define BLYNK_SSL_USE_LETSENCRYPT
|
|
||||||
|
|
||||||
// Uncomment to disable built-in analog and digital operations.
|
|
||||||
//#define BLYNK_NO_BUILTIN
|
|
||||||
|
|
||||||
// Uncomment to disable providing info about device to the server.
|
|
||||||
//#define BLYNK_NO_INFO
|
|
||||||
|
|
||||||
// Uncomment to enable debug prints.
|
|
||||||
//#define BLYNK_DEBUG
|
|
||||||
|
|
||||||
// Uncomment to force-enable 128 virtual pins
|
|
||||||
//#define BLYNK_USE_128_VPINS
|
|
||||||
|
|
||||||
// Uncomment to disable fancy logo
|
|
||||||
//#define BLYNK_NO_FANCY_LOGO
|
|
||||||
|
|
||||||
// Uncomment to enable 3D fancy logo
|
|
||||||
//#define BLYNK_FANCY_LOGO_3D
|
|
||||||
|
|
||||||
// Uncomment to enable experimental functions.
|
|
||||||
//#define BLYNK_EXPERIMENTAL
|
|
||||||
|
|
||||||
// Uncomment to disable all float/double usage
|
|
||||||
//#define BLYNK_NO_FLOAT
|
|
||||||
|
|
||||||
// Uncomment to switch to direct-connect mode
|
|
||||||
//#define BLYNK_USE_DIRECT_CONNECT
|
|
||||||
|
|
||||||
|
|
||||||
// Uncomment to append command body to header (uses more RAM)
|
|
||||||
//#define BLYNK_SEND_ATOMIC
|
|
||||||
|
|
||||||
// Split whole command into chunks (in bytes)
|
|
||||||
//#define BLYNK_SEND_CHUNK 64
|
|
||||||
|
|
||||||
// Wait after sending each chunk (in milliseconds)
|
|
||||||
//#define BLYNK_SEND_THROTTLE 10
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,173 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkDateTime.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2016 Volodymyr Shymanskyy
|
|
||||||
* @date Aug 2016
|
|
||||||
* @brief DateTime implementation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkDateTime_h
|
|
||||||
#define BlynkDateTime_h
|
|
||||||
|
|
||||||
typedef long blynk_time_t;
|
|
||||||
|
|
||||||
struct blynk_tm *blynk_gmtime_r(const blynk_time_t *time, struct blynk_tm *tm);
|
|
||||||
blynk_time_t blynk_mk_gmtime(struct blynk_tm *tm);
|
|
||||||
|
|
||||||
struct blynk_tm {
|
|
||||||
int8_t tm_sec;
|
|
||||||
int8_t tm_min;
|
|
||||||
int8_t tm_hour;
|
|
||||||
int8_t tm_mday;
|
|
||||||
int8_t tm_wday;
|
|
||||||
int8_t tm_mon;
|
|
||||||
int16_t tm_year;
|
|
||||||
int16_t tm_yday;
|
|
||||||
int16_t tm_isdst;
|
|
||||||
};
|
|
||||||
|
|
||||||
class BlynkTime {
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const uint32_t MAX_TIME = 86400L;
|
|
||||||
|
|
||||||
BlynkTime() : mTime(-1) {}
|
|
||||||
|
|
||||||
BlynkTime(const BlynkTime& t) : mTime(t.mTime) {}
|
|
||||||
|
|
||||||
BlynkTime(long seconds) : mTime(seconds % MAX_TIME) {}
|
|
||||||
|
|
||||||
BlynkTime(int hour, int minute, int second)
|
|
||||||
{
|
|
||||||
mTime = (hour * 3600 + minute * 60 + second) % MAX_TIME;
|
|
||||||
}
|
|
||||||
|
|
||||||
int second() const { return mTime % 60; }
|
|
||||||
int minute() const { return (mTime / 60) % 60; }
|
|
||||||
int hour() const { return mTime / 3600; }
|
|
||||||
|
|
||||||
int hour12() const {
|
|
||||||
int h = hour();
|
|
||||||
if (h == 0)
|
|
||||||
return 12; // 12 midnight
|
|
||||||
else if (h > 12)
|
|
||||||
return h - 12;
|
|
||||||
return h;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isAM() const { return !isPM(); }
|
|
||||||
bool isPM() const { return (hour() >= 12); }
|
|
||||||
|
|
||||||
void adjustSeconds(int sec) {
|
|
||||||
if (isValid()) {
|
|
||||||
mTime = (mTime + sec) % MAX_TIME;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
blynk_time_t getUnixOffset() const { return mTime; }
|
|
||||||
|
|
||||||
bool isValid() const { return mTime < MAX_TIME; }
|
|
||||||
operator bool() const { return isValid(); }
|
|
||||||
|
|
||||||
bool operator == (const BlynkTime& t) const { return mTime == t.mTime; }
|
|
||||||
bool operator >= (const BlynkTime& t) const { return mTime >= t.mTime; }
|
|
||||||
bool operator <= (const BlynkTime& t) const { return mTime <= t.mTime; }
|
|
||||||
bool operator > (const BlynkTime& t) const { return mTime > t.mTime; }
|
|
||||||
bool operator < (const BlynkTime& t) const { return mTime < t.mTime; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
uint32_t mTime;
|
|
||||||
};
|
|
||||||
|
|
||||||
class BlynkDateTime {
|
|
||||||
|
|
||||||
public:
|
|
||||||
BlynkDateTime() : mTime(0) {}
|
|
||||||
|
|
||||||
BlynkDateTime(const BlynkDateTime& t)
|
|
||||||
{
|
|
||||||
mTime = t.mTime;
|
|
||||||
blynk_gmtime_r(&mTime, &mTm);
|
|
||||||
}
|
|
||||||
|
|
||||||
BlynkDateTime(blynk_time_t t)
|
|
||||||
{
|
|
||||||
mTime = t;
|
|
||||||
blynk_gmtime_r(&mTime, &mTm);
|
|
||||||
}
|
|
||||||
|
|
||||||
BlynkDateTime(int hour, int minute, int second, int day, int month, int year)
|
|
||||||
{
|
|
||||||
mTm.tm_hour = hour;
|
|
||||||
mTm.tm_min = minute;
|
|
||||||
mTm.tm_sec = second;
|
|
||||||
|
|
||||||
mTm.tm_mday = day;
|
|
||||||
mTm.tm_mon = month - 1;
|
|
||||||
mTm.tm_year = year - 1900;
|
|
||||||
|
|
||||||
mTm.tm_isdst = 0;
|
|
||||||
|
|
||||||
mTime = blynk_mk_gmtime(&mTm);
|
|
||||||
}
|
|
||||||
|
|
||||||
int second() const { return mTm.tm_sec; }
|
|
||||||
int minute() const { return mTm.tm_min; }
|
|
||||||
int hour() const { return mTm.tm_hour; }
|
|
||||||
int day() const { return mTm.tm_mday; }
|
|
||||||
int month() const { return 1 + mTm.tm_mon; }
|
|
||||||
int year() const { return 1900 + mTm.tm_year; }
|
|
||||||
|
|
||||||
int day_of_year() const { return 1 + mTm.tm_yday; }
|
|
||||||
int day_of_week() const { return mTm.tm_wday == 0 ? 7 : mTm.tm_wday; }
|
|
||||||
|
|
||||||
/*int weak_of_year() const {
|
|
||||||
int julian = day_of_year();
|
|
||||||
int dow = day_of_week();
|
|
||||||
int dowJan1 = BlynkDateTime(0,0,0, 1,1,year()).day_of_week();
|
|
||||||
int weekNum = ((julian + 6) / 7);
|
|
||||||
if (dow < dowJan1)
|
|
||||||
++weekNum;
|
|
||||||
return (weekNum);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
int hour12() const {
|
|
||||||
int h = hour();
|
|
||||||
if (h == 0)
|
|
||||||
return 12; // 12 midnight
|
|
||||||
else if (h > 12)
|
|
||||||
return h - 12;
|
|
||||||
return h;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isAM() const { return !isPM(); }
|
|
||||||
bool isPM() const { return (hour() >= 12); }
|
|
||||||
|
|
||||||
void adjustSeconds(int sec) {
|
|
||||||
if (isValid()) {
|
|
||||||
mTime += sec;
|
|
||||||
blynk_gmtime_r(&mTime, &mTm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//tm& getTm() { return mTm; }
|
|
||||||
blynk_time_t getUnix() const { return mTime; }
|
|
||||||
|
|
||||||
bool isValid() const { return mTime != 0; }
|
|
||||||
operator bool() const { return isValid(); }
|
|
||||||
|
|
||||||
bool operator == (const BlynkDateTime& t) const { return mTime == t.mTime; }
|
|
||||||
bool operator >= (const BlynkDateTime& t) const { return mTime >= t.mTime; }
|
|
||||||
bool operator <= (const BlynkDateTime& t) const { return mTime <= t.mTime; }
|
|
||||||
bool operator > (const BlynkDateTime& t) const { return mTime > t.mTime; }
|
|
||||||
bool operator < (const BlynkDateTime& t) const { return mTime < t.mTime; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
blynk_tm mTm;
|
|
||||||
blynk_time_t mTime;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,278 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkDebug.cpp
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Debug utilities for Arduino
|
|
||||||
*/
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
|
|
||||||
#if defined(ARDUINO) && defined(__AVR__) && defined(BLYNK_USE_AVR_WDT)
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
#include <avr/wdt.h>
|
|
||||||
|
|
||||||
BLYNK_CONSTRUCTOR
|
|
||||||
static void BlynkSystemInit()
|
|
||||||
{
|
|
||||||
MCUSR = 0;
|
|
||||||
wdt_disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
wdt_enable(WDTO_15MS);
|
|
||||||
delay(50);
|
|
||||||
void(*resetFunc)(void) = 0;
|
|
||||||
resetFunc();
|
|
||||||
for(;;) {} // To make compiler happy
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t BlynkFreeRam()
|
|
||||||
{
|
|
||||||
extern int __heap_start, *__brkval;
|
|
||||||
int v;
|
|
||||||
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && defined(__AVR__)
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
void(*resetFunc)(void) = 0;
|
|
||||||
resetFunc();
|
|
||||||
for(;;) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t BlynkFreeRam()
|
|
||||||
{
|
|
||||||
extern int __heap_start, *__brkval;
|
|
||||||
int v;
|
|
||||||
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && defined(ESP8266)
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
size_t BlynkFreeRam()
|
|
||||||
{
|
|
||||||
return ESP.getFreeHeap();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
ESP.restart();
|
|
||||||
for(;;) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM)
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
|
|
||||||
size_t BlynkFreeRam()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
NVIC_SystemReset();
|
|
||||||
for(;;) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined (ARDUINO_ARCH_ARC32)
|
|
||||||
|
|
||||||
millis_time_t BlynkMillis()
|
|
||||||
{
|
|
||||||
// TODO: Remove workaround for Intel Curie
|
|
||||||
// https://forum.arduino.cc/index.php?topic=391836.0
|
|
||||||
noInterrupts();
|
|
||||||
uint64_t t = millis();
|
|
||||||
interrupts();
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_RESET
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && (defined(__STM32F1__) || defined(__STM32F3__))
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
|
||||||
#include <libmaple/nvic.h>
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
nvic_sys_reset();
|
|
||||||
for(;;) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined (PARTICLE) || defined(SPARK)
|
|
||||||
|
|
||||||
#include "application.h"
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
System.reset();
|
|
||||||
for(;;) {} // To make compiler happy
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(__MBED__)
|
|
||||||
|
|
||||||
#include "mbed.h"
|
|
||||||
|
|
||||||
static Timer blynk_millis_timer;
|
|
||||||
static Ticker blynk_waker;
|
|
||||||
|
|
||||||
static
|
|
||||||
void blynk_wake() {
|
|
||||||
//pc.puts("(...)");
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_CONSTRUCTOR
|
|
||||||
static void BlynkSystemInit()
|
|
||||||
{
|
|
||||||
blynk_waker.attach(&blynk_wake, 2.0);
|
|
||||||
blynk_millis_timer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkDelay(millis_time_t ms)
|
|
||||||
{
|
|
||||||
wait_ms(ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
millis_time_t BlynkMillis()
|
|
||||||
{
|
|
||||||
return blynk_millis_timer.read_ms();
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_RESET
|
|
||||||
|
|
||||||
#elif defined(LINUX) && defined(RASPBERRY)
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <wiringPi.h>
|
|
||||||
|
|
||||||
BLYNK_CONSTRUCTOR
|
|
||||||
static void BlynkSystemInit()
|
|
||||||
{
|
|
||||||
wiringPiSetupGpio();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
exit(1);
|
|
||||||
for(;;) {} // To make compiler happy
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#elif defined(LINUX)
|
|
||||||
|
|
||||||
#define _POSIX_C_SOURCE 200809L
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
static millis_time_t blynk_startup_time = 0;
|
|
||||||
|
|
||||||
BLYNK_CONSTRUCTOR
|
|
||||||
static void BlynkSystemInit()
|
|
||||||
{
|
|
||||||
blynk_startup_time = BlynkMillis();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
exit(1);
|
|
||||||
for(;;) {} // To make compiler happy
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkDelay(millis_time_t ms)
|
|
||||||
{
|
|
||||||
usleep(ms * 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
millis_time_t BlynkMillis()
|
|
||||||
{
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts );
|
|
||||||
return ( ts.tv_sec * 1000 + ts.tv_nsec / 1000000L ) - blynk_startup_time;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#if defined(BLYNK_DEBUG_ALL)
|
|
||||||
#warning "Need to implement board-specific utilities"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
#define _BLYNK_USE_DEFAULT_RESET
|
|
||||||
#define _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
#define _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _BLYNK_USE_DEFAULT_DELAY
|
|
||||||
void BlynkDelay(millis_time_t ms)
|
|
||||||
{
|
|
||||||
return delay(ms);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _BLYNK_USE_DEFAULT_MILLIS
|
|
||||||
millis_time_t BlynkMillis()
|
|
||||||
{
|
|
||||||
return millis();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _BLYNK_USE_DEFAULT_FREE_RAM
|
|
||||||
size_t BlynkFreeRam()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _BLYNK_USE_DEFAULT_RESET
|
|
||||||
void BlynkReset()
|
|
||||||
{
|
|
||||||
for(;;) {} // To make compiler happy
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void BlynkFatal()
|
|
||||||
{
|
|
||||||
BlynkDelay(10000L);
|
|
||||||
BlynkReset();
|
|
||||||
}
|
|
||||||
|
|
@ -1,305 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkDebug.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Debug utilities
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkDebug_h
|
|
||||||
#define BlynkDebug_h
|
|
||||||
|
|
||||||
#include "BlynkConfig.h"
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#ifdef ESP8266
|
|
||||||
extern "C" {
|
|
||||||
#include "ets_sys.h"
|
|
||||||
#include "os_type.h"
|
|
||||||
#include "mem.h"
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#include <inttypes.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ARC32)
|
|
||||||
typedef uint64_t millis_time_t;
|
|
||||||
#else
|
|
||||||
typedef uint32_t millis_time_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void BlynkDelay(millis_time_t ms);
|
|
||||||
millis_time_t BlynkMillis();
|
|
||||||
size_t BlynkFreeRam();
|
|
||||||
void BlynkReset() BLYNK_NORETURN;
|
|
||||||
void BlynkFatal() BLYNK_NORETURN;
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(SPARK) || defined(PARTICLE)
|
|
||||||
#include "application.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ARDUINO)
|
|
||||||
#if ARDUINO >= 100
|
|
||||||
#include <Arduino.h>
|
|
||||||
#else
|
|
||||||
#include <WProgram.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LINUX)
|
|
||||||
#if defined(RASPBERRY)
|
|
||||||
#include <wiringPi.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(BLYNK_RUN_YIELD)
|
|
||||||
#if defined(BLYNK_NO_YIELD)
|
|
||||||
#define BLYNK_RUN_YIELD() {}
|
|
||||||
#elif defined(SPARK) || defined(PARTICLE)
|
|
||||||
#define BLYNK_RUN_YIELD() { Particle.process(); }
|
|
||||||
#elif !defined(ARDUINO) || (ARDUINO < 151)
|
|
||||||
#define BLYNK_RUN_YIELD() {}
|
|
||||||
#else
|
|
||||||
#define BLYNK_RUN_YIELD() { BlynkDelay(0); }
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__AVR__)
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#define BLYNK_HAS_PROGMEM
|
|
||||||
#define BLYNK_PROGMEM PROGMEM
|
|
||||||
#define BLYNK_F(s) F(s)
|
|
||||||
#define BLYNK_PSTR(s) PSTR(s)
|
|
||||||
#else
|
|
||||||
#define BLYNK_PROGMEM
|
|
||||||
#define BLYNK_F(s) s
|
|
||||||
#define BLYNK_PSTR(s) s
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ARDUINO_AVR_DIGISPARK
|
|
||||||
typedef fstr_t __FlashStringHelper;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(BLYNK_DEBUG_ALL) && !(__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__))
|
|
||||||
#warning "Compiler features not enabled -> please contact yor board vendor to enable c++0x"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Diagnostic defines
|
|
||||||
|
|
||||||
#define BLYNK_FATAL(msg) { BLYNK_LOG1(msg); BlynkFatal(); }
|
|
||||||
#define BLYNK_LOG_RAM() { BLYNK_LOG2(BLYNK_F("Free RAM: "), BlynkFreeRam()); }
|
|
||||||
#define BLYNK_LOG_FN() BLYNK_LOG3(BLYNK_F(__FUNCTION__), '@', __LINE__);
|
|
||||||
#define BLYNK_LOG_TROUBLE(t) BLYNK_LOG2(BLYNK_F("Trouble detected: http://docs.blynk.cc/#troubleshooting-"), t)
|
|
||||||
|
|
||||||
#ifndef BLYNK_PRINT
|
|
||||||
#undef BLYNK_DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BLYNK_DEBUG_ALL
|
|
||||||
#define BLYNK_DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BLYNK_PRINT
|
|
||||||
|
|
||||||
#if defined(ARDUINO) || defined(SPARK) || defined(PARTICLE)
|
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ARC32)
|
|
||||||
// This will cause error - on purpose
|
|
||||||
#define BLYNK_LOG(msg, ...) BLYNK_LOG_UNAVAILABLE(msg, ##__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
#define BLYNK_LOG(msg, ...) blynk_dbg_print(BLYNK_PSTR(msg), ##__VA_ARGS__)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BLYNK_LOG1(p1) { BLYNK_LOG_TIME(); BLYNK_PRINT.println(p1); }
|
|
||||||
#define BLYNK_LOG2(p1,p2) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(p1); BLYNK_PRINT.println(p2); }
|
|
||||||
#define BLYNK_LOG3(p1,p2,p3) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(p1); BLYNK_PRINT.print(p2); BLYNK_PRINT.println(p3); }
|
|
||||||
#define BLYNK_LOG4(p1,p2,p3,p4) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(p1); BLYNK_PRINT.print(p2); BLYNK_PRINT.print(p3); BLYNK_PRINT.println(p4); }
|
|
||||||
#define BLYNK_LOG6(p1,p2,p3,p4,p5,p6) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(p1); BLYNK_PRINT.print(p2); BLYNK_PRINT.print(p3); BLYNK_PRINT.print(p4); BLYNK_PRINT.print(p5); BLYNK_PRINT.println(p6); }
|
|
||||||
#define BLYNK_LOG_IP(msg, ip) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(BLYNK_F(msg)); \
|
|
||||||
BLYNK_PRINT.print(ip[0]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.print(ip[1]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.print(ip[2]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.println(ip[3]); }
|
|
||||||
#define BLYNK_LOG_IP_REV(msg, ip) { BLYNK_LOG_TIME(); BLYNK_PRINT.print(BLYNK_F(msg)); \
|
|
||||||
BLYNK_PRINT.print(ip[3]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.print(ip[2]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.print(ip[1]); BLYNK_PRINT.print('.'); \
|
|
||||||
BLYNK_PRINT.println(ip[0]); }
|
|
||||||
|
|
||||||
static
|
|
||||||
void BLYNK_LOG_TIME() {
|
|
||||||
BLYNK_PRINT.print('[');
|
|
||||||
BLYNK_PRINT.print(BlynkMillis());
|
|
||||||
BLYNK_PRINT.print(BLYNK_F("] "));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
#include <ctype.h>
|
|
||||||
#define BLYNK_DBG_BREAK() { for(;;); }
|
|
||||||
#define BLYNK_ASSERT(expr) { if(!(expr)) { BLYNK_LOG2(BLYNK_F("Assertion failed: "), BLYNK_F(#expr)); BLYNK_DBG_BREAK() } }
|
|
||||||
|
|
||||||
static
|
|
||||||
void BLYNK_DBG_DUMP(const char* msg, const void* addr, size_t len) {
|
|
||||||
if (len) {
|
|
||||||
BLYNK_LOG_TIME();
|
|
||||||
BLYNK_PRINT.print(msg);
|
|
||||||
int l2 = len;
|
|
||||||
const uint8_t* octets = (const uint8_t*)addr;
|
|
||||||
bool prev_print = true;
|
|
||||||
while (l2--) {
|
|
||||||
const uint8_t c = *octets++ & 0xFF;
|
|
||||||
if (c >= 32 && c < 127) {
|
|
||||||
if (!prev_print) { BLYNK_PRINT.print(']'); }
|
|
||||||
BLYNK_PRINT.print((char)c);
|
|
||||||
prev_print = true;
|
|
||||||
} else {
|
|
||||||
BLYNK_PRINT.print(prev_print?'[':'|');
|
|
||||||
if (c < 0x10) { BLYNK_PRINT.print('0'); }
|
|
||||||
BLYNK_PRINT.print(c, HEX);
|
|
||||||
prev_print = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!prev_print) {
|
|
||||||
BLYNK_PRINT.print(']');
|
|
||||||
}
|
|
||||||
BLYNK_PRINT.println();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(ARDUINO_ARCH_ARC32)
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
BLYNK_UNUSED
|
|
||||||
void blynk_dbg_print(const char* BLYNK_PROGMEM fmt, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
va_start(ap, fmt);
|
|
||||||
char buff[128];
|
|
||||||
BLYNK_PRINT.print('[');
|
|
||||||
BLYNK_PRINT.print(BlynkMillis());
|
|
||||||
BLYNK_PRINT.print(BLYNK_F("] "));
|
|
||||||
#if defined(__AVR__)
|
|
||||||
vsnprintf_P(buff, sizeof(buff), fmt, ap);
|
|
||||||
#else
|
|
||||||
vsnprintf(buff, sizeof(buff), fmt, ap);
|
|
||||||
#endif
|
|
||||||
BLYNK_PRINT.println(buff);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
#endif // ARDUINO_ARCH_ARC32
|
|
||||||
|
|
||||||
#elif defined(__MBED__)
|
|
||||||
|
|
||||||
#define BLYNK_LOG(msg, ...) { BLYNK_PRINT.printf("[%ld] " msg "\n", BlynkMillis(), ##__VA_ARGS__); }
|
|
||||||
#define BLYNK_LOG1(p1) { BLYNK_LOG(p1);}
|
|
||||||
#define BLYNK_LOG2(p1,p2) { BLYNK_LOG(p1,p2);}
|
|
||||||
#define BLYNK_LOG3(p1,p2,p3) { BLYNK_LOG(p1,p2,p3);}
|
|
||||||
#define BLYNK_LOG4(p1,p2,p3,p4) { BLYNK_LOG(p1,p2,p3,p4);}
|
|
||||||
#define BLYNK_LOG6(p1,p2,p3,p4,p5,p6) { BLYNK_LOG(p1,p2,p3,p4,p5,p6);}
|
|
||||||
|
|
||||||
#define BLYNK_LOG_TIME() BLYNK_PRINT.printf("[%ld]", BlynkMillis());
|
|
||||||
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
#define BLYNK_DBG_BREAK() raise(SIGTRAP);
|
|
||||||
#define BLYNK_ASSERT(expr) assert(expr)
|
|
||||||
|
|
||||||
static
|
|
||||||
void BLYNK_DBG_DUMP(const char* msg, const void* addr, size_t len) {
|
|
||||||
BLYNK_LOG_TIME();
|
|
||||||
BLYNK_PRINT.printf(msg);
|
|
||||||
int l2 = len;
|
|
||||||
const uint8_t* octets = (const uint8_t*)addr;
|
|
||||||
bool prev_print = true;
|
|
||||||
while (l2--) {
|
|
||||||
const uint8_t c = *octets++ & 0xFF;
|
|
||||||
if (c >= 32 && c < 127) {
|
|
||||||
if (!prev_print) { BLYNK_PRINT.putc(']'); }
|
|
||||||
BLYNK_PRINT.putc((char)c);
|
|
||||||
prev_print = true;
|
|
||||||
} else {
|
|
||||||
BLYNK_PRINT.putc(prev_print?'[':'|');
|
|
||||||
BLYNK_PRINT.printf("%02x", c);
|
|
||||||
prev_print = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BLYNK_PRINT.printf("%s\n", prev_print?"":"]");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(LINUX)
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
using namespace std;
|
|
||||||
#define BLYNK_LOG(msg, ...) { fprintf(BLYNK_PRINT, "[%ld] " msg "\n", BlynkMillis(), ##__VA_ARGS__); }
|
|
||||||
#define BLYNK_LOG1(p1) { BLYNK_LOG_TIME(); cout << p1 << endl; }
|
|
||||||
#define BLYNK_LOG2(p1,p2) { BLYNK_LOG_TIME(); cout << p1 << p2 << endl; }
|
|
||||||
#define BLYNK_LOG3(p1,p2,p3) { BLYNK_LOG_TIME(); cout << p1 << p2 << p3 << endl; }
|
|
||||||
#define BLYNK_LOG4(p1,p2,p3,p4) { BLYNK_LOG_TIME(); cout << p1 << p2 << p3 << p4 << endl; }
|
|
||||||
#define BLYNK_LOG6(p1,p2,p3,p4,p5,p6) { BLYNK_LOG_TIME(); cout << p1 << p2 << p3 << p4 << p5 << p6 << endl; }
|
|
||||||
|
|
||||||
#define BLYNK_LOG_TIME() cout << '[' << BlynkMillis() << "] ";
|
|
||||||
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
#define BLYNK_DBG_BREAK() raise(SIGTRAP);
|
|
||||||
#define BLYNK_ASSERT(expr) assert(expr)
|
|
||||||
|
|
||||||
static
|
|
||||||
void BLYNK_DBG_DUMP(const char* msg, const void* addr, size_t len) {
|
|
||||||
BLYNK_LOG_TIME();
|
|
||||||
fprintf(BLYNK_PRINT, "%s", msg);
|
|
||||||
int l2 = len;
|
|
||||||
const uint8_t* octets = (const uint8_t*)addr;
|
|
||||||
bool prev_print = true;
|
|
||||||
while (l2--) {
|
|
||||||
const uint8_t c = *octets++ & 0xFF;
|
|
||||||
if (c >= 32 && c < 127) {
|
|
||||||
if (!prev_print) { fputc(']', BLYNK_PRINT); }
|
|
||||||
fputc((char)c, BLYNK_PRINT);
|
|
||||||
prev_print = true;
|
|
||||||
} else {
|
|
||||||
fputc(prev_print?'[':'|', BLYNK_PRINT);
|
|
||||||
fprintf(BLYNK_PRINT, "%02x", c);
|
|
||||||
prev_print = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(BLYNK_PRINT, "%s\n", prev_print?"":"]");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#warning "Cannot detect platform"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BLYNK_LOG
|
|
||||||
#define BLYNK_LOG(...)
|
|
||||||
#define BLYNK_LOG1(p1)
|
|
||||||
#define BLYNK_LOG2(p1,p2)
|
|
||||||
#define BLYNK_LOG3(p1,p2,p3)
|
|
||||||
#define BLYNK_LOG4(p1,p2,p3,p4)
|
|
||||||
#define BLYNK_LOG6(p1,p2,p3,p4,p5,p6)
|
|
||||||
#define BLYNK_LOG_IP(msg, ip)
|
|
||||||
#define BLYNK_LOG_IP_REV(msg, ip)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BLYNK_DBG_BREAK
|
|
||||||
#define BLYNK_DBG_BREAK()
|
|
||||||
#define BLYNK_ASSERT(expr)
|
|
||||||
#define BLYNK_DBG_DUMP(msg, addr, len)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,268 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkDetectDevice.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2016 Volodymyr Shymanskyy
|
|
||||||
* @date May 2016
|
|
||||||
* @brief
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkDetectDevice_h
|
|
||||||
#define BlynkDetectDevice_h
|
|
||||||
|
|
||||||
// General defines
|
|
||||||
|
|
||||||
#define BLYNK_NEWLINE "\r\n"
|
|
||||||
|
|
||||||
#define BLYNK_CONCAT(a, b) a ## b
|
|
||||||
#define BLYNK_CONCAT2(a, b) BLYNK_CONCAT(a, b)
|
|
||||||
|
|
||||||
#define BLYNK_STRINGIFY(x) #x
|
|
||||||
#define BLYNK_TOSTRING(x) BLYNK_STRINGIFY(x)
|
|
||||||
|
|
||||||
#define BLYNK_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
|
|
||||||
|
|
||||||
#define BLYNK_ATTR_PACKED __attribute__ ((__packed__))
|
|
||||||
#define BLYNK_NORETURN __attribute__ ((noreturn))
|
|
||||||
#define BLYNK_UNUSED __attribute__((__unused__))
|
|
||||||
#define BLYNK_DEPRECATED __attribute__ ((deprecated))
|
|
||||||
#define BLYNK_CONSTRUCTOR __attribute__((constructor))
|
|
||||||
|
|
||||||
// Causes problems on some platforms
|
|
||||||
#define BLYNK_FORCE_INLINE inline //__attribute__((always_inline))
|
|
||||||
|
|
||||||
#ifndef BLYNK_INFO_CPU
|
|
||||||
#if defined(__AVR_ATmega168__)
|
|
||||||
#define BLYNK_INFO_CPU "ATmega168"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BLYNK_INFO_DEVICE
|
|
||||||
|
|
||||||
#if defined(ENERGIA)
|
|
||||||
|
|
||||||
#define BLYNK_NO_YIELD
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
|
|
||||||
#if defined(ENERGIA_ARCH_MSP430)
|
|
||||||
#define BLYNK_INFO_DEVICE "LaunchPad MSP430"
|
|
||||||
#define BLYNK_INFO_CPU "MSP430"
|
|
||||||
#define BLYNK_NO_FLOAT
|
|
||||||
#elif defined(ENERGIA_ARCH_MSP432)
|
|
||||||
#define BLYNK_INFO_DEVICE "LaunchPad MSP432"
|
|
||||||
#define BLYNK_INFO_CPU "MSP432"
|
|
||||||
#elif defined(ENERGIA_ARCH_TIVAC)
|
|
||||||
#define BLYNK_INFO_DEVICE "LaunchPad"
|
|
||||||
|
|
||||||
#elif defined(ENERGIA_ARCH_CC3200EMT) || defined(ENERGIA_ARCH_CC3200)
|
|
||||||
#define BLYNK_INFO_CONNECTION "CC3200"
|
|
||||||
#define BLYNK_SEND_CHUNK 64
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
|
|
||||||
#if defined(ENERGIA_CC3200_LAUNCHXL) //TODO: This is a bug in Energia IDE
|
|
||||||
#define BLYNK_INFO_DEVICE "CC3200 LaunchXL"
|
|
||||||
#elif defined(ENERGIA_RedBearLab_CC3200)
|
|
||||||
#define BLYNK_INFO_DEVICE "RBL CC3200"
|
|
||||||
#elif defined(ENERGIA_RedBearLab_WiFiMini)
|
|
||||||
#define BLYNK_INFO_DEVICE "RBL WiFi Mini"
|
|
||||||
#elif defined(ENERGIA_RedBearLab_WiFiMicro)
|
|
||||||
#define BLYNK_INFO_DEVICE "RBL WiFi Micro"
|
|
||||||
#endif
|
|
||||||
#elif defined(ENERGIA_ARCH_CC3220EMT) || defined(ENERGIA_ARCH_CC3220)
|
|
||||||
#define BLYNK_INFO_CONNECTION "CC3220"
|
|
||||||
#define BLYNK_SEND_CHUNK 64
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
|
|
||||||
#define BLYNK_USE_INTERNAL_DTOSTRF
|
|
||||||
|
|
||||||
#define BLYNK_INFO_DEVICE "CC3220"
|
|
||||||
#define BLYNK_INFO_CPU "CC3220"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(BLYNK_INFO_DEVICE)
|
|
||||||
#define BLYNK_INFO_DEVICE "Energia"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(LINUX)
|
|
||||||
|
|
||||||
#define BLYNK_INFO_DEVICE "Linux"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 4096
|
|
||||||
|
|
||||||
#elif defined(SPARK) || defined(PARTICLE)
|
|
||||||
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
|
|
||||||
#if PLATFORM_ID==0
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle Core"
|
|
||||||
#undef BLYNK_BUFFERS_SIZE // Use default on Core
|
|
||||||
#elif PLATFORM_ID==6
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle Photon"
|
|
||||||
#elif PLATFORM_ID==8
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle P1"
|
|
||||||
#elif PLATFORM_ID==9
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle Ethernet"
|
|
||||||
#elif PLATFORM_ID==10
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle Electron"
|
|
||||||
#elif PLATFORM_ID==31
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle RPi"
|
|
||||||
#elif PLATFORM_ID==82
|
|
||||||
#define BLYNK_INFO_DEVICE "Digistump Oak"
|
|
||||||
#elif PLATFORM_ID==88
|
|
||||||
#define BLYNK_INFO_DEVICE "RedBear Duo"
|
|
||||||
#elif PLATFORM_ID==103
|
|
||||||
#define BLYNK_INFO_DEVICE "Bluz"
|
|
||||||
#else
|
|
||||||
#if defined(BLYNK_DEBUG_ALL)
|
|
||||||
#warning "Cannot detect board type"
|
|
||||||
#endif
|
|
||||||
#define BLYNK_INFO_DEVICE "Particle"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(__MBED__)
|
|
||||||
|
|
||||||
#define BLYNK_INFO_DEVICE "MBED"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 512
|
|
||||||
#define noInterrupts() __disable_irq()
|
|
||||||
#define interrupts() __enable_irq()
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && defined(MPIDE)
|
|
||||||
#define BLYNK_NO_YIELD
|
|
||||||
|
|
||||||
#if defined(_BOARD_UNO_)
|
|
||||||
#define BLYNK_INFO_DEVICE "chipKIT Uno32"
|
|
||||||
#else
|
|
||||||
#define BLYNK_INFO_DEVICE "chipKIT"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && defined(ARDUINO_AMEBA)
|
|
||||||
#if defined(BOARD_RTL8710)
|
|
||||||
#define BLYNK_INFO_DEVICE "RTL8710"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(BOARD_RTL8711AM)
|
|
||||||
#define BLYNK_INFO_DEVICE "RTL8711AM"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(BOARD_RTL8195A)
|
|
||||||
#define BLYNK_INFO_DEVICE "RTL8195A"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#else
|
|
||||||
#define BLYNK_INFO_DEVICE "Ameba"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(ARDUINO) && defined(TEENSYDUINO)
|
|
||||||
|
|
||||||
#if defined(__MK66FX1M0__)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy 3.6"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(__MK64FX512__)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy 3.5"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(__MK20DX256__)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy 3.2/3.1"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(__MK20DX128__)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy 3.0"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#elif defined(__MKL26Z64__)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy LC"
|
|
||||||
#define BLYNK_BUFFERS_SIZE 512
|
|
||||||
#elif defined(ARDUINO_ARCH_AVR)
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy 2.0"
|
|
||||||
#else
|
|
||||||
#define BLYNK_INFO_DEVICE "Teensy"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(ARDUINO)
|
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_SAMD) || defined(ESP32) || defined(ESP8266)
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Arduino AVR */
|
|
||||||
#if defined(ARDUINO_AVR_NANO)
|
|
||||||
#define BLYNK_INFO_DEVICE "Arduino Nano"
|
|
||||||
|
|
||||||
/* ESP8266 */
|
|
||||||
#elif defined(ARDUINO_ESP8266_ESP01)
|
|
||||||
#define BLYNK_INFO_DEVICE "ESP8266"
|
|
||||||
#elif defined(ARDUINO_ESP8266_ESP12)
|
|
||||||
#define BLYNK_INFO_DEVICE "ESP-12"
|
|
||||||
#elif defined(ARDUINO_ESP8266_NODEMCU)
|
|
||||||
#define BLYNK_INFO_DEVICE "NodeMCU"
|
|
||||||
#elif defined(ARDUINO_ESP8266_THING)
|
|
||||||
#define BLYNK_INFO_DEVICE "Esp Thing"
|
|
||||||
#elif defined(ARDUINO_ESP8266_THING_DEV)
|
|
||||||
#define BLYNK_INFO_DEVICE "Esp Thing Dev"
|
|
||||||
|
|
||||||
/* ESP32 */
|
|
||||||
#elif defined(ARDUINO_ESP32_DEV)
|
|
||||||
#define BLYNK_INFO_DEVICE "ESP32"
|
|
||||||
#elif defined(ARDUINO_ESP320)
|
|
||||||
#define BLYNK_INFO_DEVICE "SweetPeas ESP320"
|
|
||||||
#elif defined(ARDUINO_NANO32)
|
|
||||||
#define BLYNK_INFO_DEVICE "ESP32 Nano32"
|
|
||||||
#elif defined(ARDUINO_LoLin32)
|
|
||||||
#define BLYNK_INFO_DEVICE "LoLin32"
|
|
||||||
#elif defined(ARDUINO_ESPea32)
|
|
||||||
#define BLYNK_INFO_DEVICE "ESPea32"
|
|
||||||
#elif defined(ARDUINO_QUANTUM)
|
|
||||||
#define BLYNK_INFO_DEVICE "Noduino Quantum"
|
|
||||||
|
|
||||||
#else
|
|
||||||
#if defined(BLYNK_DEBUG_ALL)
|
|
||||||
#warning "Cannot detect board type"
|
|
||||||
#endif
|
|
||||||
#define BLYNK_INFO_DEVICE "Arduino"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(TI_CC3220)
|
|
||||||
#define BLYNK_INFO_DEVICE "TI CC3220"
|
|
||||||
#define BLYNK_USE_128_VPINS
|
|
||||||
#define BLYNK_BUFFERS_SIZE 1024
|
|
||||||
|
|
||||||
#define BLYNK_USE_INTERNAL_DTOSTRF
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define BLYNK_INFO_DEVICE "Custom platform"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(BLYNK_MAX_READBYTES) && defined(BLYNK_BUFFERS_SIZE)
|
|
||||||
#define BLYNK_MAX_READBYTES BLYNK_BUFFERS_SIZE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(BLYNK_MAX_SENDBYTES) && defined(BLYNK_BUFFERS_SIZE)
|
|
||||||
#define BLYNK_MAX_SENDBYTES BLYNK_BUFFERS_SIZE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Print diagnostics
|
|
||||||
|
|
||||||
#if defined(BLYNK_DEBUG_ALL)
|
|
||||||
#if defined(BLYNK_INFO_DEVICE)
|
|
||||||
#pragma message ("BLYNK_INFO_DEVICE=" BLYNK_TOSTRING(BLYNK_INFO_DEVICE))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(BLYNK_INFO_CPU)
|
|
||||||
#pragma message ("BLYNK_INFO_CPU=" BLYNK_TOSTRING(BLYNK_INFO_CPU))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(BLYNK_BUFFERS_SIZE)
|
|
||||||
#pragma message ("BLYNK_BUFFERS_SIZE=" BLYNK_TOSTRING(BLYNK_BUFFERS_SIZE))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,69 +0,0 @@
|
|||||||
|
|
||||||
#ifndef BLYNKEVERYN_H
|
|
||||||
#define BLYNKEVERYN_H
|
|
||||||
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
|
|
||||||
millis_time_t blynk_count_millis() {
|
|
||||||
const millis_time_t ms = BlynkMillis();
|
|
||||||
return ms;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t blynk_count_seconds16() {
|
|
||||||
const millis_time_t ms = BlynkMillis();
|
|
||||||
return (ms / 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t blynk_count_minutes16()
|
|
||||||
{
|
|
||||||
const millis_time_t ms = BlynkMillis();
|
|
||||||
return (ms / (60000L)) & 0xFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t blynk_count_hours8()
|
|
||||||
{
|
|
||||||
const millis_time_t ms = BlynkMillis();
|
|
||||||
return (ms / (3600000L)) & 0xFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T, T (*timeGetter)()>
|
|
||||||
class BlynkPeriodic {
|
|
||||||
public:
|
|
||||||
T mPrev;
|
|
||||||
T mPeriod;
|
|
||||||
|
|
||||||
BlynkPeriodic() { reset(); mPeriod = 1; };
|
|
||||||
BlynkPeriodic(T period) { reset(); setPeriod(period); };
|
|
||||||
void setPeriod( T period) { mPeriod = period; };
|
|
||||||
T getTime() { return (T)(timeGetter()); };
|
|
||||||
T getPeriod() { return mPeriod; };
|
|
||||||
T getElapsed() { return getTime() - mPrev; }
|
|
||||||
T getRemaining() { return mPeriod - getElapsed(); }
|
|
||||||
T getLastTriggerTime() { return mPrev; }
|
|
||||||
bool ready() {
|
|
||||||
bool isReady = (getElapsed() >= mPeriod);
|
|
||||||
if( isReady ) { reset(); }
|
|
||||||
return isReady;
|
|
||||||
}
|
|
||||||
void reset() { mPrev = getTime(); };
|
|
||||||
void trigger() { mPrev = getTime() - mPeriod; };
|
|
||||||
|
|
||||||
operator bool() { return ready(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef BlynkPeriodic<millis_time_t,blynk_count_millis> BlynkEveryNMillis;
|
|
||||||
typedef BlynkPeriodic<uint16_t,blynk_count_seconds16> BlynkEveryNSeconds;
|
|
||||||
typedef BlynkPeriodic<uint16_t,blynk_count_minutes16> BlynkEveryNMinutes;
|
|
||||||
typedef BlynkPeriodic<uint8_t,blynk_count_hours8> BlynkEveryNHours;
|
|
||||||
|
|
||||||
#define BLYNK_EVERY_N_MILLIS_I(NAME,N) static BlynkEveryNMillis NAME(N); if(NAME)
|
|
||||||
#define BLYNK_EVERY_N_SECONDS_I(NAME,N) static BlynkEveryNSeconds NAME(N); if(NAME)
|
|
||||||
#define BLYNK_EVERY_N_MINUTES_I(NAME,N) static BlynkEveryNMinutes NAME(N); if(NAME)
|
|
||||||
#define BLYNK_EVERY_N_HOURS_I(NAME,N) static BlynkEveryNHours NAME(N); if(NAME)
|
|
||||||
|
|
||||||
#define BLYNK_EVERY_N_MILLIS(N) BLYNK_EVERY_N_MILLIS_I(BLYNK_CONCAT2(PER, __COUNTER__),N)
|
|
||||||
#define BLYNK_EVERY_N_SECONDS(N) BLYNK_EVERY_N_SECONDS_I(BLYNK_CONCAT2(PER, __COUNTER__),N)
|
|
||||||
#define BLYNK_EVERY_N_MINUTES(N) BLYNK_EVERY_N_MINUTES_I(BLYNK_CONCAT2(PER, __COUNTER__),N)
|
|
||||||
#define BLYNK_EVERY_N_HOURS(N) BLYNK_EVERY_N_HOURS_I(BLYNK_CONCAT2(PER, __COUNTER__),N)
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,158 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkFifo.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Feb 2015
|
|
||||||
* @brief FIFO implementation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkFifo_h
|
|
||||||
#define BlynkFifo_h
|
|
||||||
|
|
||||||
#include "BlynkUtility.h"
|
|
||||||
|
|
||||||
template <class T, unsigned N>
|
|
||||||
class BlynkFifo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BlynkFifo()
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void clear()
|
|
||||||
{
|
|
||||||
_r = 0;
|
|
||||||
_w = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
~BlynkFifo(void)
|
|
||||||
{}
|
|
||||||
|
|
||||||
// writing thread/context API
|
|
||||||
//-------------------------------------------------------------
|
|
||||||
|
|
||||||
bool writeable(void)
|
|
||||||
{
|
|
||||||
return free() > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int free(void)
|
|
||||||
{
|
|
||||||
int s = _r - _w;
|
|
||||||
if (s <= 0)
|
|
||||||
s += N;
|
|
||||||
return s - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
T put(const T& c)
|
|
||||||
{
|
|
||||||
int i = _w;
|
|
||||||
int j = i;
|
|
||||||
i = _inc(i);
|
|
||||||
while (i == _r) // = !writeable()
|
|
||||||
/* nothing / just wait */;
|
|
||||||
_b[j] = c;
|
|
||||||
_w = i;
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
int put(const T* p, int n, bool blocking = false)
|
|
||||||
{
|
|
||||||
int c = n;
|
|
||||||
while (c)
|
|
||||||
{
|
|
||||||
int f;
|
|
||||||
while ((f = free()) == 0) // wait for space
|
|
||||||
{
|
|
||||||
if (!blocking) return n - c; // no more space and not blocking
|
|
||||||
/* nothing / just wait */;
|
|
||||||
}
|
|
||||||
// check free space
|
|
||||||
if (c < f) f = c;
|
|
||||||
int w = _w;
|
|
||||||
int m = N - w;
|
|
||||||
// check wrap
|
|
||||||
if (f > m) f = m;
|
|
||||||
memcpy(&_b[w], p, f);
|
|
||||||
_w = _inc(w, f);
|
|
||||||
c -= f;
|
|
||||||
p += f;
|
|
||||||
}
|
|
||||||
return n - c;
|
|
||||||
}
|
|
||||||
|
|
||||||
// reading thread/context API
|
|
||||||
// --------------------------------------------------------
|
|
||||||
|
|
||||||
bool readable(void)
|
|
||||||
{
|
|
||||||
return (_r != _w);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t size(void)
|
|
||||||
{
|
|
||||||
int s = _w - _r;
|
|
||||||
if (s < 0)
|
|
||||||
s += N;
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
T get(void)
|
|
||||||
{
|
|
||||||
int r = _r;
|
|
||||||
while (r == _w) // = !readable()
|
|
||||||
/* nothing / just wait */;
|
|
||||||
T t = _b[r];
|
|
||||||
_r = _inc(r);
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
T peek(void)
|
|
||||||
{
|
|
||||||
int r = _r;
|
|
||||||
while (r == _w);
|
|
||||||
return _b[r];
|
|
||||||
}
|
|
||||||
|
|
||||||
int get(T* p, int n, bool blocking = false)
|
|
||||||
{
|
|
||||||
int c = n;
|
|
||||||
while (c)
|
|
||||||
{
|
|
||||||
int f;
|
|
||||||
for (;;) // wait for data
|
|
||||||
{
|
|
||||||
f = size();
|
|
||||||
if (f) break; // free space
|
|
||||||
if (!blocking) return n - c; // no space and not blocking
|
|
||||||
/* nothing / just wait */;
|
|
||||||
}
|
|
||||||
// check available data
|
|
||||||
if (c < f) f = c;
|
|
||||||
int r = _r;
|
|
||||||
int m = N - r;
|
|
||||||
// check wrap
|
|
||||||
if (f > m) f = m;
|
|
||||||
memcpy(p, &_b[r], f);
|
|
||||||
_r = _inc(r, f);
|
|
||||||
c -= f;
|
|
||||||
p += f;
|
|
||||||
}
|
|
||||||
return n - c;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
int _inc(int i, int n = 1)
|
|
||||||
{
|
|
||||||
return (i + n) % N;
|
|
||||||
}
|
|
||||||
|
|
||||||
T _b[N];
|
|
||||||
volatile int _w;
|
|
||||||
volatile int _r;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,402 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkHandlers.cpp
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Virtual pin utilities
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "BlynkConfig.h"
|
|
||||||
#include "BlynkHandlers.h"
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
|
|
||||||
void BlynkNoOpCbk()
|
|
||||||
{}
|
|
||||||
|
|
||||||
void BlynkWidgetRead(BlynkReq BLYNK_UNUSED &request)
|
|
||||||
{
|
|
||||||
BLYNK_LOG2(BLYNK_F("No handler for reading from pin "), request.pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlynkWidgetWrite(BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED ¶m)
|
|
||||||
{
|
|
||||||
BLYNK_LOG2(BLYNK_F("No handler for writing to pin "), request.pin);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define BLYNK_ON_READ_IMPL(pin) void BlynkWidgetRead ## pin (BlynkReq BLYNK_UNUSED &req) \
|
|
||||||
__attribute__((weak, alias("BlynkWidgetRead")))
|
|
||||||
|
|
||||||
#define BLYNK_ON_WRITE_IMPL(pin) void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &req, const BlynkParam BLYNK_UNUSED ¶m) \
|
|
||||||
__attribute__((weak, alias("BlynkWidgetWrite")))
|
|
||||||
|
|
||||||
BLYNK_CONNECTED() __attribute__((weak, alias("BlynkNoOpCbk")));
|
|
||||||
BLYNK_DISCONNECTED() __attribute__((weak, alias("BlynkNoOpCbk")));
|
|
||||||
|
|
||||||
// Internal Virtual Pins
|
|
||||||
BLYNK_ON_WRITE_IMPL(InternalPinACON);
|
|
||||||
BLYNK_ON_WRITE_IMPL(InternalPinADIS);
|
|
||||||
BLYNK_ON_WRITE_IMPL(InternalPinRTC);
|
|
||||||
BLYNK_ON_WRITE_IMPL(InternalPinOTA);
|
|
||||||
|
|
||||||
// Regular Virtual Pins
|
|
||||||
BLYNK_ON_READ_IMPL(Default);
|
|
||||||
BLYNK_ON_WRITE_IMPL(Default);
|
|
||||||
|
|
||||||
BLYNK_ON_READ_IMPL(0 );
|
|
||||||
BLYNK_ON_READ_IMPL(1 );
|
|
||||||
BLYNK_ON_READ_IMPL(2 );
|
|
||||||
BLYNK_ON_READ_IMPL(3 );
|
|
||||||
BLYNK_ON_READ_IMPL(4 );
|
|
||||||
BLYNK_ON_READ_IMPL(5 );
|
|
||||||
BLYNK_ON_READ_IMPL(6 );
|
|
||||||
BLYNK_ON_READ_IMPL(7 );
|
|
||||||
BLYNK_ON_READ_IMPL(8 );
|
|
||||||
BLYNK_ON_READ_IMPL(9 );
|
|
||||||
BLYNK_ON_READ_IMPL(10);
|
|
||||||
BLYNK_ON_READ_IMPL(11);
|
|
||||||
BLYNK_ON_READ_IMPL(12);
|
|
||||||
BLYNK_ON_READ_IMPL(13);
|
|
||||||
BLYNK_ON_READ_IMPL(14);
|
|
||||||
BLYNK_ON_READ_IMPL(15);
|
|
||||||
BLYNK_ON_READ_IMPL(16);
|
|
||||||
BLYNK_ON_READ_IMPL(17);
|
|
||||||
BLYNK_ON_READ_IMPL(18);
|
|
||||||
BLYNK_ON_READ_IMPL(19);
|
|
||||||
BLYNK_ON_READ_IMPL(20);
|
|
||||||
BLYNK_ON_READ_IMPL(21);
|
|
||||||
BLYNK_ON_READ_IMPL(22);
|
|
||||||
BLYNK_ON_READ_IMPL(23);
|
|
||||||
BLYNK_ON_READ_IMPL(24);
|
|
||||||
BLYNK_ON_READ_IMPL(25);
|
|
||||||
BLYNK_ON_READ_IMPL(26);
|
|
||||||
BLYNK_ON_READ_IMPL(27);
|
|
||||||
BLYNK_ON_READ_IMPL(28);
|
|
||||||
BLYNK_ON_READ_IMPL(29);
|
|
||||||
BLYNK_ON_READ_IMPL(30);
|
|
||||||
BLYNK_ON_READ_IMPL(31);
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BLYNK_ON_READ_IMPL(32);
|
|
||||||
BLYNK_ON_READ_IMPL(33);
|
|
||||||
BLYNK_ON_READ_IMPL(34);
|
|
||||||
BLYNK_ON_READ_IMPL(35);
|
|
||||||
BLYNK_ON_READ_IMPL(36);
|
|
||||||
BLYNK_ON_READ_IMPL(37);
|
|
||||||
BLYNK_ON_READ_IMPL(38);
|
|
||||||
BLYNK_ON_READ_IMPL(39);
|
|
||||||
BLYNK_ON_READ_IMPL(40);
|
|
||||||
BLYNK_ON_READ_IMPL(41);
|
|
||||||
BLYNK_ON_READ_IMPL(42);
|
|
||||||
BLYNK_ON_READ_IMPL(43);
|
|
||||||
BLYNK_ON_READ_IMPL(44);
|
|
||||||
BLYNK_ON_READ_IMPL(45);
|
|
||||||
BLYNK_ON_READ_IMPL(46);
|
|
||||||
BLYNK_ON_READ_IMPL(47);
|
|
||||||
BLYNK_ON_READ_IMPL(48);
|
|
||||||
BLYNK_ON_READ_IMPL(49);
|
|
||||||
BLYNK_ON_READ_IMPL(50);
|
|
||||||
BLYNK_ON_READ_IMPL(51);
|
|
||||||
BLYNK_ON_READ_IMPL(52);
|
|
||||||
BLYNK_ON_READ_IMPL(53);
|
|
||||||
BLYNK_ON_READ_IMPL(54);
|
|
||||||
BLYNK_ON_READ_IMPL(55);
|
|
||||||
BLYNK_ON_READ_IMPL(56);
|
|
||||||
BLYNK_ON_READ_IMPL(57);
|
|
||||||
BLYNK_ON_READ_IMPL(58);
|
|
||||||
BLYNK_ON_READ_IMPL(59);
|
|
||||||
BLYNK_ON_READ_IMPL(60);
|
|
||||||
BLYNK_ON_READ_IMPL(61);
|
|
||||||
BLYNK_ON_READ_IMPL(62);
|
|
||||||
BLYNK_ON_READ_IMPL(63);
|
|
||||||
BLYNK_ON_READ_IMPL(64);
|
|
||||||
BLYNK_ON_READ_IMPL(65);
|
|
||||||
BLYNK_ON_READ_IMPL(66);
|
|
||||||
BLYNK_ON_READ_IMPL(67);
|
|
||||||
BLYNK_ON_READ_IMPL(68);
|
|
||||||
BLYNK_ON_READ_IMPL(69);
|
|
||||||
BLYNK_ON_READ_IMPL(70);
|
|
||||||
BLYNK_ON_READ_IMPL(71);
|
|
||||||
BLYNK_ON_READ_IMPL(72);
|
|
||||||
BLYNK_ON_READ_IMPL(73);
|
|
||||||
BLYNK_ON_READ_IMPL(74);
|
|
||||||
BLYNK_ON_READ_IMPL(75);
|
|
||||||
BLYNK_ON_READ_IMPL(76);
|
|
||||||
BLYNK_ON_READ_IMPL(77);
|
|
||||||
BLYNK_ON_READ_IMPL(78);
|
|
||||||
BLYNK_ON_READ_IMPL(79);
|
|
||||||
BLYNK_ON_READ_IMPL(80);
|
|
||||||
BLYNK_ON_READ_IMPL(81);
|
|
||||||
BLYNK_ON_READ_IMPL(82);
|
|
||||||
BLYNK_ON_READ_IMPL(83);
|
|
||||||
BLYNK_ON_READ_IMPL(84);
|
|
||||||
BLYNK_ON_READ_IMPL(85);
|
|
||||||
BLYNK_ON_READ_IMPL(86);
|
|
||||||
BLYNK_ON_READ_IMPL(87);
|
|
||||||
BLYNK_ON_READ_IMPL(88);
|
|
||||||
BLYNK_ON_READ_IMPL(89);
|
|
||||||
BLYNK_ON_READ_IMPL(90);
|
|
||||||
BLYNK_ON_READ_IMPL(91);
|
|
||||||
BLYNK_ON_READ_IMPL(92);
|
|
||||||
BLYNK_ON_READ_IMPL(93);
|
|
||||||
BLYNK_ON_READ_IMPL(94);
|
|
||||||
BLYNK_ON_READ_IMPL(95);
|
|
||||||
BLYNK_ON_READ_IMPL(96);
|
|
||||||
BLYNK_ON_READ_IMPL(97);
|
|
||||||
BLYNK_ON_READ_IMPL(98);
|
|
||||||
BLYNK_ON_READ_IMPL(99);
|
|
||||||
BLYNK_ON_READ_IMPL(100);
|
|
||||||
BLYNK_ON_READ_IMPL(101);
|
|
||||||
BLYNK_ON_READ_IMPL(102);
|
|
||||||
BLYNK_ON_READ_IMPL(103);
|
|
||||||
BLYNK_ON_READ_IMPL(104);
|
|
||||||
BLYNK_ON_READ_IMPL(105);
|
|
||||||
BLYNK_ON_READ_IMPL(106);
|
|
||||||
BLYNK_ON_READ_IMPL(107);
|
|
||||||
BLYNK_ON_READ_IMPL(108);
|
|
||||||
BLYNK_ON_READ_IMPL(109);
|
|
||||||
BLYNK_ON_READ_IMPL(110);
|
|
||||||
BLYNK_ON_READ_IMPL(111);
|
|
||||||
BLYNK_ON_READ_IMPL(112);
|
|
||||||
BLYNK_ON_READ_IMPL(113);
|
|
||||||
BLYNK_ON_READ_IMPL(114);
|
|
||||||
BLYNK_ON_READ_IMPL(115);
|
|
||||||
BLYNK_ON_READ_IMPL(116);
|
|
||||||
BLYNK_ON_READ_IMPL(117);
|
|
||||||
BLYNK_ON_READ_IMPL(118);
|
|
||||||
BLYNK_ON_READ_IMPL(119);
|
|
||||||
BLYNK_ON_READ_IMPL(120);
|
|
||||||
BLYNK_ON_READ_IMPL(121);
|
|
||||||
BLYNK_ON_READ_IMPL(122);
|
|
||||||
BLYNK_ON_READ_IMPL(123);
|
|
||||||
BLYNK_ON_READ_IMPL(124);
|
|
||||||
BLYNK_ON_READ_IMPL(125);
|
|
||||||
BLYNK_ON_READ_IMPL(126);
|
|
||||||
BLYNK_ON_READ_IMPL(127);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BLYNK_ON_WRITE_IMPL(0 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(1 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(2 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(3 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(4 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(5 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(6 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(7 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(8 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(9 );
|
|
||||||
BLYNK_ON_WRITE_IMPL(10);
|
|
||||||
BLYNK_ON_WRITE_IMPL(11);
|
|
||||||
BLYNK_ON_WRITE_IMPL(12);
|
|
||||||
BLYNK_ON_WRITE_IMPL(13);
|
|
||||||
BLYNK_ON_WRITE_IMPL(14);
|
|
||||||
BLYNK_ON_WRITE_IMPL(15);
|
|
||||||
BLYNK_ON_WRITE_IMPL(16);
|
|
||||||
BLYNK_ON_WRITE_IMPL(17);
|
|
||||||
BLYNK_ON_WRITE_IMPL(18);
|
|
||||||
BLYNK_ON_WRITE_IMPL(19);
|
|
||||||
BLYNK_ON_WRITE_IMPL(20);
|
|
||||||
BLYNK_ON_WRITE_IMPL(21);
|
|
||||||
BLYNK_ON_WRITE_IMPL(22);
|
|
||||||
BLYNK_ON_WRITE_IMPL(23);
|
|
||||||
BLYNK_ON_WRITE_IMPL(24);
|
|
||||||
BLYNK_ON_WRITE_IMPL(25);
|
|
||||||
BLYNK_ON_WRITE_IMPL(26);
|
|
||||||
BLYNK_ON_WRITE_IMPL(27);
|
|
||||||
BLYNK_ON_WRITE_IMPL(28);
|
|
||||||
BLYNK_ON_WRITE_IMPL(29);
|
|
||||||
BLYNK_ON_WRITE_IMPL(30);
|
|
||||||
BLYNK_ON_WRITE_IMPL(31);
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BLYNK_ON_WRITE_IMPL(32);
|
|
||||||
BLYNK_ON_WRITE_IMPL(33);
|
|
||||||
BLYNK_ON_WRITE_IMPL(34);
|
|
||||||
BLYNK_ON_WRITE_IMPL(35);
|
|
||||||
BLYNK_ON_WRITE_IMPL(36);
|
|
||||||
BLYNK_ON_WRITE_IMPL(37);
|
|
||||||
BLYNK_ON_WRITE_IMPL(38);
|
|
||||||
BLYNK_ON_WRITE_IMPL(39);
|
|
||||||
BLYNK_ON_WRITE_IMPL(40);
|
|
||||||
BLYNK_ON_WRITE_IMPL(41);
|
|
||||||
BLYNK_ON_WRITE_IMPL(42);
|
|
||||||
BLYNK_ON_WRITE_IMPL(43);
|
|
||||||
BLYNK_ON_WRITE_IMPL(44);
|
|
||||||
BLYNK_ON_WRITE_IMPL(45);
|
|
||||||
BLYNK_ON_WRITE_IMPL(46);
|
|
||||||
BLYNK_ON_WRITE_IMPL(47);
|
|
||||||
BLYNK_ON_WRITE_IMPL(48);
|
|
||||||
BLYNK_ON_WRITE_IMPL(49);
|
|
||||||
BLYNK_ON_WRITE_IMPL(50);
|
|
||||||
BLYNK_ON_WRITE_IMPL(51);
|
|
||||||
BLYNK_ON_WRITE_IMPL(52);
|
|
||||||
BLYNK_ON_WRITE_IMPL(53);
|
|
||||||
BLYNK_ON_WRITE_IMPL(54);
|
|
||||||
BLYNK_ON_WRITE_IMPL(55);
|
|
||||||
BLYNK_ON_WRITE_IMPL(56);
|
|
||||||
BLYNK_ON_WRITE_IMPL(57);
|
|
||||||
BLYNK_ON_WRITE_IMPL(58);
|
|
||||||
BLYNK_ON_WRITE_IMPL(59);
|
|
||||||
BLYNK_ON_WRITE_IMPL(60);
|
|
||||||
BLYNK_ON_WRITE_IMPL(61);
|
|
||||||
BLYNK_ON_WRITE_IMPL(62);
|
|
||||||
BLYNK_ON_WRITE_IMPL(63);
|
|
||||||
BLYNK_ON_WRITE_IMPL(64);
|
|
||||||
BLYNK_ON_WRITE_IMPL(65);
|
|
||||||
BLYNK_ON_WRITE_IMPL(66);
|
|
||||||
BLYNK_ON_WRITE_IMPL(67);
|
|
||||||
BLYNK_ON_WRITE_IMPL(68);
|
|
||||||
BLYNK_ON_WRITE_IMPL(69);
|
|
||||||
BLYNK_ON_WRITE_IMPL(70);
|
|
||||||
BLYNK_ON_WRITE_IMPL(71);
|
|
||||||
BLYNK_ON_WRITE_IMPL(72);
|
|
||||||
BLYNK_ON_WRITE_IMPL(73);
|
|
||||||
BLYNK_ON_WRITE_IMPL(74);
|
|
||||||
BLYNK_ON_WRITE_IMPL(75);
|
|
||||||
BLYNK_ON_WRITE_IMPL(76);
|
|
||||||
BLYNK_ON_WRITE_IMPL(77);
|
|
||||||
BLYNK_ON_WRITE_IMPL(78);
|
|
||||||
BLYNK_ON_WRITE_IMPL(79);
|
|
||||||
BLYNK_ON_WRITE_IMPL(80);
|
|
||||||
BLYNK_ON_WRITE_IMPL(81);
|
|
||||||
BLYNK_ON_WRITE_IMPL(82);
|
|
||||||
BLYNK_ON_WRITE_IMPL(83);
|
|
||||||
BLYNK_ON_WRITE_IMPL(84);
|
|
||||||
BLYNK_ON_WRITE_IMPL(85);
|
|
||||||
BLYNK_ON_WRITE_IMPL(86);
|
|
||||||
BLYNK_ON_WRITE_IMPL(87);
|
|
||||||
BLYNK_ON_WRITE_IMPL(88);
|
|
||||||
BLYNK_ON_WRITE_IMPL(89);
|
|
||||||
BLYNK_ON_WRITE_IMPL(90);
|
|
||||||
BLYNK_ON_WRITE_IMPL(91);
|
|
||||||
BLYNK_ON_WRITE_IMPL(92);
|
|
||||||
BLYNK_ON_WRITE_IMPL(93);
|
|
||||||
BLYNK_ON_WRITE_IMPL(94);
|
|
||||||
BLYNK_ON_WRITE_IMPL(95);
|
|
||||||
BLYNK_ON_WRITE_IMPL(96);
|
|
||||||
BLYNK_ON_WRITE_IMPL(97);
|
|
||||||
BLYNK_ON_WRITE_IMPL(98);
|
|
||||||
BLYNK_ON_WRITE_IMPL(99);
|
|
||||||
BLYNK_ON_WRITE_IMPL(100);
|
|
||||||
BLYNK_ON_WRITE_IMPL(101);
|
|
||||||
BLYNK_ON_WRITE_IMPL(102);
|
|
||||||
BLYNK_ON_WRITE_IMPL(103);
|
|
||||||
BLYNK_ON_WRITE_IMPL(104);
|
|
||||||
BLYNK_ON_WRITE_IMPL(105);
|
|
||||||
BLYNK_ON_WRITE_IMPL(106);
|
|
||||||
BLYNK_ON_WRITE_IMPL(107);
|
|
||||||
BLYNK_ON_WRITE_IMPL(108);
|
|
||||||
BLYNK_ON_WRITE_IMPL(109);
|
|
||||||
BLYNK_ON_WRITE_IMPL(110);
|
|
||||||
BLYNK_ON_WRITE_IMPL(111);
|
|
||||||
BLYNK_ON_WRITE_IMPL(112);
|
|
||||||
BLYNK_ON_WRITE_IMPL(113);
|
|
||||||
BLYNK_ON_WRITE_IMPL(114);
|
|
||||||
BLYNK_ON_WRITE_IMPL(115);
|
|
||||||
BLYNK_ON_WRITE_IMPL(116);
|
|
||||||
BLYNK_ON_WRITE_IMPL(117);
|
|
||||||
BLYNK_ON_WRITE_IMPL(118);
|
|
||||||
BLYNK_ON_WRITE_IMPL(119);
|
|
||||||
BLYNK_ON_WRITE_IMPL(120);
|
|
||||||
BLYNK_ON_WRITE_IMPL(121);
|
|
||||||
BLYNK_ON_WRITE_IMPL(122);
|
|
||||||
BLYNK_ON_WRITE_IMPL(123);
|
|
||||||
BLYNK_ON_WRITE_IMPL(124);
|
|
||||||
BLYNK_ON_WRITE_IMPL(125);
|
|
||||||
BLYNK_ON_WRITE_IMPL(126);
|
|
||||||
BLYNK_ON_WRITE_IMPL(127);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const WidgetReadHandler BlynkReadHandlerVector[] BLYNK_PROGMEM = {
|
|
||||||
BlynkWidgetRead0, BlynkWidgetRead1, BlynkWidgetRead2, BlynkWidgetRead3,
|
|
||||||
BlynkWidgetRead4, BlynkWidgetRead5, BlynkWidgetRead6, BlynkWidgetRead7,
|
|
||||||
BlynkWidgetRead8, BlynkWidgetRead9, BlynkWidgetRead10, BlynkWidgetRead11,
|
|
||||||
BlynkWidgetRead12, BlynkWidgetRead13, BlynkWidgetRead14, BlynkWidgetRead15,
|
|
||||||
BlynkWidgetRead16, BlynkWidgetRead17, BlynkWidgetRead18, BlynkWidgetRead19,
|
|
||||||
BlynkWidgetRead20, BlynkWidgetRead21, BlynkWidgetRead22, BlynkWidgetRead23,
|
|
||||||
BlynkWidgetRead24, BlynkWidgetRead25, BlynkWidgetRead26, BlynkWidgetRead27,
|
|
||||||
BlynkWidgetRead28, BlynkWidgetRead29, BlynkWidgetRead30, BlynkWidgetRead31,
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BlynkWidgetRead32, BlynkWidgetRead33, BlynkWidgetRead34, BlynkWidgetRead35,
|
|
||||||
BlynkWidgetRead36, BlynkWidgetRead37, BlynkWidgetRead38, BlynkWidgetRead39,
|
|
||||||
BlynkWidgetRead40, BlynkWidgetRead41, BlynkWidgetRead42, BlynkWidgetRead43,
|
|
||||||
BlynkWidgetRead44, BlynkWidgetRead45, BlynkWidgetRead46, BlynkWidgetRead47,
|
|
||||||
BlynkWidgetRead48, BlynkWidgetRead49, BlynkWidgetRead50, BlynkWidgetRead51,
|
|
||||||
BlynkWidgetRead52, BlynkWidgetRead53, BlynkWidgetRead54, BlynkWidgetRead55,
|
|
||||||
BlynkWidgetRead56, BlynkWidgetRead57, BlynkWidgetRead58, BlynkWidgetRead59,
|
|
||||||
BlynkWidgetRead60, BlynkWidgetRead61, BlynkWidgetRead62, BlynkWidgetRead63,
|
|
||||||
BlynkWidgetRead64, BlynkWidgetRead65, BlynkWidgetRead66, BlynkWidgetRead67,
|
|
||||||
BlynkWidgetRead68, BlynkWidgetRead69, BlynkWidgetRead70, BlynkWidgetRead71,
|
|
||||||
BlynkWidgetRead72, BlynkWidgetRead73, BlynkWidgetRead74, BlynkWidgetRead75,
|
|
||||||
BlynkWidgetRead76, BlynkWidgetRead77, BlynkWidgetRead78, BlynkWidgetRead79,
|
|
||||||
BlynkWidgetRead80, BlynkWidgetRead81, BlynkWidgetRead82, BlynkWidgetRead83,
|
|
||||||
BlynkWidgetRead84, BlynkWidgetRead85, BlynkWidgetRead86, BlynkWidgetRead87,
|
|
||||||
BlynkWidgetRead88, BlynkWidgetRead89, BlynkWidgetRead90, BlynkWidgetRead91,
|
|
||||||
BlynkWidgetRead92, BlynkWidgetRead93, BlynkWidgetRead94, BlynkWidgetRead95,
|
|
||||||
BlynkWidgetRead96, BlynkWidgetRead97, BlynkWidgetRead98, BlynkWidgetRead99,
|
|
||||||
BlynkWidgetRead100, BlynkWidgetRead101, BlynkWidgetRead102, BlynkWidgetRead103,
|
|
||||||
BlynkWidgetRead104, BlynkWidgetRead105, BlynkWidgetRead106, BlynkWidgetRead107,
|
|
||||||
BlynkWidgetRead108, BlynkWidgetRead109, BlynkWidgetRead110, BlynkWidgetRead111,
|
|
||||||
BlynkWidgetRead112, BlynkWidgetRead113, BlynkWidgetRead114, BlynkWidgetRead115,
|
|
||||||
BlynkWidgetRead116, BlynkWidgetRead117, BlynkWidgetRead118, BlynkWidgetRead119,
|
|
||||||
BlynkWidgetRead120, BlynkWidgetRead121, BlynkWidgetRead122, BlynkWidgetRead123,
|
|
||||||
BlynkWidgetRead124, BlynkWidgetRead125, BlynkWidgetRead126, BlynkWidgetRead127,
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
static const WidgetWriteHandler BlynkWriteHandlerVector[] BLYNK_PROGMEM = {
|
|
||||||
BlynkWidgetWrite0, BlynkWidgetWrite1, BlynkWidgetWrite2, BlynkWidgetWrite3,
|
|
||||||
BlynkWidgetWrite4, BlynkWidgetWrite5, BlynkWidgetWrite6, BlynkWidgetWrite7,
|
|
||||||
BlynkWidgetWrite8, BlynkWidgetWrite9, BlynkWidgetWrite10, BlynkWidgetWrite11,
|
|
||||||
BlynkWidgetWrite12, BlynkWidgetWrite13, BlynkWidgetWrite14, BlynkWidgetWrite15,
|
|
||||||
BlynkWidgetWrite16, BlynkWidgetWrite17, BlynkWidgetWrite18, BlynkWidgetWrite19,
|
|
||||||
BlynkWidgetWrite20, BlynkWidgetWrite21, BlynkWidgetWrite22, BlynkWidgetWrite23,
|
|
||||||
BlynkWidgetWrite24, BlynkWidgetWrite25, BlynkWidgetWrite26, BlynkWidgetWrite27,
|
|
||||||
BlynkWidgetWrite28, BlynkWidgetWrite29, BlynkWidgetWrite30, BlynkWidgetWrite31,
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BlynkWidgetWrite32, BlynkWidgetWrite33, BlynkWidgetWrite34, BlynkWidgetWrite35,
|
|
||||||
BlynkWidgetWrite36, BlynkWidgetWrite37, BlynkWidgetWrite38, BlynkWidgetWrite39,
|
|
||||||
BlynkWidgetWrite40, BlynkWidgetWrite41, BlynkWidgetWrite42, BlynkWidgetWrite43,
|
|
||||||
BlynkWidgetWrite44, BlynkWidgetWrite45, BlynkWidgetWrite46, BlynkWidgetWrite47,
|
|
||||||
BlynkWidgetWrite48, BlynkWidgetWrite49, BlynkWidgetWrite50, BlynkWidgetWrite51,
|
|
||||||
BlynkWidgetWrite52, BlynkWidgetWrite53, BlynkWidgetWrite54, BlynkWidgetWrite55,
|
|
||||||
BlynkWidgetWrite56, BlynkWidgetWrite57, BlynkWidgetWrite58, BlynkWidgetWrite59,
|
|
||||||
BlynkWidgetWrite60, BlynkWidgetWrite61, BlynkWidgetWrite62, BlynkWidgetWrite63,
|
|
||||||
BlynkWidgetWrite64, BlynkWidgetWrite65, BlynkWidgetWrite66, BlynkWidgetWrite67,
|
|
||||||
BlynkWidgetWrite68, BlynkWidgetWrite69, BlynkWidgetWrite70, BlynkWidgetWrite71,
|
|
||||||
BlynkWidgetWrite72, BlynkWidgetWrite73, BlynkWidgetWrite74, BlynkWidgetWrite75,
|
|
||||||
BlynkWidgetWrite76, BlynkWidgetWrite77, BlynkWidgetWrite78, BlynkWidgetWrite79,
|
|
||||||
BlynkWidgetWrite80, BlynkWidgetWrite81, BlynkWidgetWrite82, BlynkWidgetWrite83,
|
|
||||||
BlynkWidgetWrite84, BlynkWidgetWrite85, BlynkWidgetWrite86, BlynkWidgetWrite87,
|
|
||||||
BlynkWidgetWrite88, BlynkWidgetWrite89, BlynkWidgetWrite90, BlynkWidgetWrite91,
|
|
||||||
BlynkWidgetWrite92, BlynkWidgetWrite93, BlynkWidgetWrite94, BlynkWidgetWrite95,
|
|
||||||
BlynkWidgetWrite96, BlynkWidgetWrite97, BlynkWidgetWrite98, BlynkWidgetWrite99,
|
|
||||||
BlynkWidgetWrite100, BlynkWidgetWrite101, BlynkWidgetWrite102, BlynkWidgetWrite103,
|
|
||||||
BlynkWidgetWrite104, BlynkWidgetWrite105, BlynkWidgetWrite106, BlynkWidgetWrite107,
|
|
||||||
BlynkWidgetWrite108, BlynkWidgetWrite109, BlynkWidgetWrite110, BlynkWidgetWrite111,
|
|
||||||
BlynkWidgetWrite112, BlynkWidgetWrite113, BlynkWidgetWrite114, BlynkWidgetWrite115,
|
|
||||||
BlynkWidgetWrite116, BlynkWidgetWrite117, BlynkWidgetWrite118, BlynkWidgetWrite119,
|
|
||||||
BlynkWidgetWrite120, BlynkWidgetWrite121, BlynkWidgetWrite122, BlynkWidgetWrite123,
|
|
||||||
BlynkWidgetWrite124, BlynkWidgetWrite125, BlynkWidgetWrite126, BlynkWidgetWrite127,
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
WidgetReadHandler GetReadHandler(uint8_t pin)
|
|
||||||
{
|
|
||||||
if (pin >= BLYNK_COUNT_OF(BlynkReadHandlerVector))
|
|
||||||
return NULL;
|
|
||||||
#ifdef BLYNK_HAS_PROGMEM
|
|
||||||
return (WidgetReadHandler)pgm_read_word(&BlynkReadHandlerVector[pin]);
|
|
||||||
#else
|
|
||||||
return BlynkReadHandlerVector[pin];
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
WidgetWriteHandler GetWriteHandler(uint8_t pin)
|
|
||||||
{
|
|
||||||
if (pin >= BLYNK_COUNT_OF(BlynkWriteHandlerVector))
|
|
||||||
return NULL;
|
|
||||||
#ifdef BLYNK_HAS_PROGMEM
|
|
||||||
return (WidgetWriteHandler)pgm_read_word(&BlynkWriteHandlerVector[pin]);
|
|
||||||
#else
|
|
||||||
return BlynkWriteHandlerVector[pin];
|
|
||||||
#endif
|
|
||||||
}
|
|
@ -1,511 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkHandlers.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Handlers for virtual pin operations
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkHandlers_h
|
|
||||||
#define BlynkHandlers_h
|
|
||||||
|
|
||||||
#include "BlynkConfig.h"
|
|
||||||
#include "BlynkParam.h"
|
|
||||||
|
|
||||||
// Helper macro
|
|
||||||
|
|
||||||
#define V0 0
|
|
||||||
#define V1 1
|
|
||||||
#define V2 2
|
|
||||||
#define V3 3
|
|
||||||
#define V4 4
|
|
||||||
#define V5 5
|
|
||||||
#define V6 6
|
|
||||||
#define V7 7
|
|
||||||
#define V8 8
|
|
||||||
#define V9 9
|
|
||||||
#define V10 10
|
|
||||||
#define V11 11
|
|
||||||
#define V12 12
|
|
||||||
#define V13 13
|
|
||||||
#define V14 14
|
|
||||||
#define V15 15
|
|
||||||
#define V16 16
|
|
||||||
#define V17 17
|
|
||||||
#define V18 18
|
|
||||||
#define V19 19
|
|
||||||
#define V20 20
|
|
||||||
#define V21 21
|
|
||||||
#define V22 22
|
|
||||||
#define V23 23
|
|
||||||
#define V24 24
|
|
||||||
#define V25 25
|
|
||||||
#define V26 26
|
|
||||||
#define V27 27
|
|
||||||
#define V28 28
|
|
||||||
#define V29 29
|
|
||||||
#define V30 30
|
|
||||||
#define V31 31
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
#define V32 32
|
|
||||||
#define V33 33
|
|
||||||
#define V34 34
|
|
||||||
#define V35 35
|
|
||||||
#define V36 36
|
|
||||||
#define V37 37
|
|
||||||
#define V38 38
|
|
||||||
#define V39 39
|
|
||||||
#define V40 40
|
|
||||||
#define V41 41
|
|
||||||
#define V42 42
|
|
||||||
#define V43 43
|
|
||||||
#define V44 44
|
|
||||||
#define V45 45
|
|
||||||
#define V46 46
|
|
||||||
#define V47 47
|
|
||||||
#define V48 48
|
|
||||||
#define V49 49
|
|
||||||
#define V50 50
|
|
||||||
#define V51 51
|
|
||||||
#define V52 52
|
|
||||||
#define V53 53
|
|
||||||
#define V54 54
|
|
||||||
#define V55 55
|
|
||||||
#define V56 56
|
|
||||||
#define V57 57
|
|
||||||
#define V58 58
|
|
||||||
#define V59 59
|
|
||||||
#define V60 60
|
|
||||||
#define V61 61
|
|
||||||
#define V62 62
|
|
||||||
#define V63 63
|
|
||||||
#define V64 64
|
|
||||||
#define V65 65
|
|
||||||
#define V66 66
|
|
||||||
#define V67 67
|
|
||||||
#define V68 68
|
|
||||||
#define V69 69
|
|
||||||
#define V70 70
|
|
||||||
#define V71 71
|
|
||||||
#define V72 72
|
|
||||||
#define V73 73
|
|
||||||
#define V74 74
|
|
||||||
#define V75 75
|
|
||||||
#define V76 76
|
|
||||||
#define V77 77
|
|
||||||
#define V78 78
|
|
||||||
#define V79 79
|
|
||||||
#define V80 80
|
|
||||||
#define V81 81
|
|
||||||
#define V82 82
|
|
||||||
#define V83 83
|
|
||||||
#define V84 84
|
|
||||||
#define V85 85
|
|
||||||
#define V86 86
|
|
||||||
#define V87 87
|
|
||||||
#define V88 88
|
|
||||||
#define V89 89
|
|
||||||
#define V90 90
|
|
||||||
#define V91 91
|
|
||||||
#define V92 92
|
|
||||||
#define V93 93
|
|
||||||
#define V94 94
|
|
||||||
#define V95 95
|
|
||||||
#define V96 96
|
|
||||||
#define V97 97
|
|
||||||
#define V98 98
|
|
||||||
#define V99 99
|
|
||||||
#define V100 100
|
|
||||||
#define V101 101
|
|
||||||
#define V102 102
|
|
||||||
#define V103 103
|
|
||||||
#define V104 104
|
|
||||||
#define V105 105
|
|
||||||
#define V106 106
|
|
||||||
#define V107 107
|
|
||||||
#define V108 108
|
|
||||||
#define V109 109
|
|
||||||
#define V110 110
|
|
||||||
#define V111 111
|
|
||||||
#define V112 112
|
|
||||||
#define V113 113
|
|
||||||
#define V114 114
|
|
||||||
#define V115 115
|
|
||||||
#define V116 116
|
|
||||||
#define V117 117
|
|
||||||
#define V118 118
|
|
||||||
#define V119 119
|
|
||||||
#define V120 120
|
|
||||||
#define V121 121
|
|
||||||
#define V122 122
|
|
||||||
#define V123 123
|
|
||||||
#define V124 124
|
|
||||||
#define V125 125
|
|
||||||
#define V126 126
|
|
||||||
#define V127 127
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Initial syntax:
|
|
||||||
#define BLYNK_WRITE_2(pin) \
|
|
||||||
void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED ¶m)
|
|
||||||
|
|
||||||
#define BLYNK_READ_2(pin) \
|
|
||||||
void BlynkWidgetRead ## pin (BlynkReq BLYNK_UNUSED &request)
|
|
||||||
|
|
||||||
#define BLYNK_WRITE_DEFAULT() BLYNK_WRITE_2(Default)
|
|
||||||
#define BLYNK_READ_DEFAULT() BLYNK_READ_2(Default)
|
|
||||||
|
|
||||||
#define BLYNK_WRITE(pin) BLYNK_WRITE_2(pin)
|
|
||||||
#define BLYNK_READ(pin) BLYNK_READ_2(pin)
|
|
||||||
|
|
||||||
// New, more readable syntax:
|
|
||||||
#define BLYNK_IN_2(pin) \
|
|
||||||
void BlynkWidgetWrite ## pin (BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED &getValue)
|
|
||||||
|
|
||||||
#define BLYNK_OUT_2(pin) \
|
|
||||||
void BlynkWidgetRead ## pin (BlynkReq BLYNK_UNUSED &request)
|
|
||||||
|
|
||||||
#define BLYNK_INPUT_DEFAULT() BLYNK_IN_2(Default)
|
|
||||||
#define BLYNK_OUTPUT_DEFAULT() BLYNK_OUT_2(Default)
|
|
||||||
|
|
||||||
#define BLYNK_INPUT(pin) BLYNK_IN_2(pin)
|
|
||||||
#define BLYNK_OUTPUT(pin) BLYNK_OUT_2(pin)
|
|
||||||
|
|
||||||
// Additional handlers
|
|
||||||
#define BLYNK_CONNECTED() void BlynkOnConnected()
|
|
||||||
#define BLYNK_DISCONNECTED() void BlynkOnDisconnected()
|
|
||||||
|
|
||||||
// Advanced functions
|
|
||||||
|
|
||||||
#define BLYNK_VAR_INT(name, pin) \
|
|
||||||
int name; \
|
|
||||||
BLYNK_WRITE(pin) { name = param.asInt(); } \
|
|
||||||
BLYNK_READ(pin) { Blynk.virtualWrite(pin, name); }
|
|
||||||
|
|
||||||
#define BLYNK_VAR_LONG(name, pin) \
|
|
||||||
long name; \
|
|
||||||
BLYNK_WRITE(pin) { name = param.asLong(); } \
|
|
||||||
BLYNK_READ(pin) { Blynk.virtualWrite(pin, name); }
|
|
||||||
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
#define BLYNK_VAR_DOUBLE(name, pin) \
|
|
||||||
double name; \
|
|
||||||
BLYNK_WRITE(pin) { name = param.asDouble(); } \
|
|
||||||
BLYNK_READ(pin) { Blynk.virtualWrite(pin, name); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ARDUINO
|
|
||||||
#define BLYNK_VAR_STRING(name, pin) \
|
|
||||||
String name; \
|
|
||||||
BLYNK_WRITE(pin) { name = param.asStr(); } \
|
|
||||||
BLYNK_READ(pin) { Blynk.virtualWrite(pin, name); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Default read/write handlers (you can redefine them in your code)
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct BlynkReq
|
|
||||||
{
|
|
||||||
uint8_t pin;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef void (*WidgetReadHandler)(BlynkReq BLYNK_UNUSED &request);
|
|
||||||
typedef void (*WidgetWriteHandler)(BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED ¶m);
|
|
||||||
|
|
||||||
WidgetReadHandler GetReadHandler(uint8_t pin);
|
|
||||||
WidgetWriteHandler GetWriteHandler(uint8_t pin);
|
|
||||||
|
|
||||||
// Declare placeholders
|
|
||||||
BLYNK_READ();
|
|
||||||
BLYNK_WRITE();
|
|
||||||
void BlynkNoOpCbk();
|
|
||||||
|
|
||||||
// Declare all pin handlers (you can redefine them in your code)
|
|
||||||
BLYNK_CONNECTED();
|
|
||||||
BLYNK_DISCONNECTED();
|
|
||||||
|
|
||||||
// Internal Virtual Pins
|
|
||||||
BLYNK_WRITE(InternalPinACON);
|
|
||||||
BLYNK_WRITE(InternalPinADIS);
|
|
||||||
BLYNK_WRITE(InternalPinRTC);
|
|
||||||
BLYNK_WRITE(InternalPinOTA);
|
|
||||||
|
|
||||||
// Aliases
|
|
||||||
#define BLYNK_APP_CONNECTED() BLYNK_WRITE(InternalPinACON)
|
|
||||||
#define BLYNK_APP_DISCONNECTED() BLYNK_WRITE(InternalPinADIS)
|
|
||||||
|
|
||||||
// Regular Virtual Pins
|
|
||||||
BLYNK_READ_DEFAULT();
|
|
||||||
BLYNK_WRITE_DEFAULT();
|
|
||||||
|
|
||||||
BLYNK_READ(0 );
|
|
||||||
BLYNK_READ(1 );
|
|
||||||
BLYNK_READ(2 );
|
|
||||||
BLYNK_READ(3 );
|
|
||||||
BLYNK_READ(4 );
|
|
||||||
BLYNK_READ(5 );
|
|
||||||
BLYNK_READ(6 );
|
|
||||||
BLYNK_READ(7 );
|
|
||||||
BLYNK_READ(8 );
|
|
||||||
BLYNK_READ(9 );
|
|
||||||
BLYNK_READ(10);
|
|
||||||
BLYNK_READ(11);
|
|
||||||
BLYNK_READ(12);
|
|
||||||
BLYNK_READ(13);
|
|
||||||
BLYNK_READ(14);
|
|
||||||
BLYNK_READ(15);
|
|
||||||
BLYNK_READ(16);
|
|
||||||
BLYNK_READ(17);
|
|
||||||
BLYNK_READ(18);
|
|
||||||
BLYNK_READ(19);
|
|
||||||
BLYNK_READ(20);
|
|
||||||
BLYNK_READ(21);
|
|
||||||
BLYNK_READ(22);
|
|
||||||
BLYNK_READ(23);
|
|
||||||
BLYNK_READ(24);
|
|
||||||
BLYNK_READ(25);
|
|
||||||
BLYNK_READ(26);
|
|
||||||
BLYNK_READ(27);
|
|
||||||
BLYNK_READ(28);
|
|
||||||
BLYNK_READ(29);
|
|
||||||
BLYNK_READ(30);
|
|
||||||
BLYNK_READ(31);
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BLYNK_READ(32);
|
|
||||||
BLYNK_READ(33);
|
|
||||||
BLYNK_READ(34);
|
|
||||||
BLYNK_READ(35);
|
|
||||||
BLYNK_READ(36);
|
|
||||||
BLYNK_READ(37);
|
|
||||||
BLYNK_READ(38);
|
|
||||||
BLYNK_READ(39);
|
|
||||||
BLYNK_READ(40);
|
|
||||||
BLYNK_READ(41);
|
|
||||||
BLYNK_READ(42);
|
|
||||||
BLYNK_READ(43);
|
|
||||||
BLYNK_READ(44);
|
|
||||||
BLYNK_READ(45);
|
|
||||||
BLYNK_READ(46);
|
|
||||||
BLYNK_READ(47);
|
|
||||||
BLYNK_READ(48);
|
|
||||||
BLYNK_READ(49);
|
|
||||||
BLYNK_READ(50);
|
|
||||||
BLYNK_READ(51);
|
|
||||||
BLYNK_READ(52);
|
|
||||||
BLYNK_READ(53);
|
|
||||||
BLYNK_READ(54);
|
|
||||||
BLYNK_READ(55);
|
|
||||||
BLYNK_READ(56);
|
|
||||||
BLYNK_READ(57);
|
|
||||||
BLYNK_READ(58);
|
|
||||||
BLYNK_READ(59);
|
|
||||||
BLYNK_READ(60);
|
|
||||||
BLYNK_READ(61);
|
|
||||||
BLYNK_READ(62);
|
|
||||||
BLYNK_READ(63);
|
|
||||||
BLYNK_READ(64);
|
|
||||||
BLYNK_READ(65);
|
|
||||||
BLYNK_READ(66);
|
|
||||||
BLYNK_READ(67);
|
|
||||||
BLYNK_READ(68);
|
|
||||||
BLYNK_READ(69);
|
|
||||||
BLYNK_READ(70);
|
|
||||||
BLYNK_READ(71);
|
|
||||||
BLYNK_READ(72);
|
|
||||||
BLYNK_READ(73);
|
|
||||||
BLYNK_READ(74);
|
|
||||||
BLYNK_READ(75);
|
|
||||||
BLYNK_READ(76);
|
|
||||||
BLYNK_READ(77);
|
|
||||||
BLYNK_READ(78);
|
|
||||||
BLYNK_READ(79);
|
|
||||||
BLYNK_READ(80);
|
|
||||||
BLYNK_READ(81);
|
|
||||||
BLYNK_READ(82);
|
|
||||||
BLYNK_READ(83);
|
|
||||||
BLYNK_READ(84);
|
|
||||||
BLYNK_READ(85);
|
|
||||||
BLYNK_READ(86);
|
|
||||||
BLYNK_READ(87);
|
|
||||||
BLYNK_READ(88);
|
|
||||||
BLYNK_READ(89);
|
|
||||||
BLYNK_READ(90);
|
|
||||||
BLYNK_READ(91);
|
|
||||||
BLYNK_READ(92);
|
|
||||||
BLYNK_READ(93);
|
|
||||||
BLYNK_READ(94);
|
|
||||||
BLYNK_READ(95);
|
|
||||||
BLYNK_READ(96);
|
|
||||||
BLYNK_READ(97);
|
|
||||||
BLYNK_READ(98);
|
|
||||||
BLYNK_READ(99);
|
|
||||||
BLYNK_READ(100);
|
|
||||||
BLYNK_READ(101);
|
|
||||||
BLYNK_READ(102);
|
|
||||||
BLYNK_READ(103);
|
|
||||||
BLYNK_READ(104);
|
|
||||||
BLYNK_READ(105);
|
|
||||||
BLYNK_READ(106);
|
|
||||||
BLYNK_READ(107);
|
|
||||||
BLYNK_READ(108);
|
|
||||||
BLYNK_READ(109);
|
|
||||||
BLYNK_READ(110);
|
|
||||||
BLYNK_READ(111);
|
|
||||||
BLYNK_READ(112);
|
|
||||||
BLYNK_READ(113);
|
|
||||||
BLYNK_READ(114);
|
|
||||||
BLYNK_READ(115);
|
|
||||||
BLYNK_READ(116);
|
|
||||||
BLYNK_READ(117);
|
|
||||||
BLYNK_READ(118);
|
|
||||||
BLYNK_READ(119);
|
|
||||||
BLYNK_READ(120);
|
|
||||||
BLYNK_READ(121);
|
|
||||||
BLYNK_READ(122);
|
|
||||||
BLYNK_READ(123);
|
|
||||||
BLYNK_READ(124);
|
|
||||||
BLYNK_READ(125);
|
|
||||||
BLYNK_READ(126);
|
|
||||||
BLYNK_READ(127);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BLYNK_WRITE(0 );
|
|
||||||
BLYNK_WRITE(1 );
|
|
||||||
BLYNK_WRITE(2 );
|
|
||||||
BLYNK_WRITE(3 );
|
|
||||||
BLYNK_WRITE(4 );
|
|
||||||
BLYNK_WRITE(5 );
|
|
||||||
BLYNK_WRITE(6 );
|
|
||||||
BLYNK_WRITE(7 );
|
|
||||||
BLYNK_WRITE(8 );
|
|
||||||
BLYNK_WRITE(9 );
|
|
||||||
BLYNK_WRITE(10);
|
|
||||||
BLYNK_WRITE(11);
|
|
||||||
BLYNK_WRITE(12);
|
|
||||||
BLYNK_WRITE(13);
|
|
||||||
BLYNK_WRITE(14);
|
|
||||||
BLYNK_WRITE(15);
|
|
||||||
BLYNK_WRITE(16);
|
|
||||||
BLYNK_WRITE(17);
|
|
||||||
BLYNK_WRITE(18);
|
|
||||||
BLYNK_WRITE(19);
|
|
||||||
BLYNK_WRITE(20);
|
|
||||||
BLYNK_WRITE(21);
|
|
||||||
BLYNK_WRITE(22);
|
|
||||||
BLYNK_WRITE(23);
|
|
||||||
BLYNK_WRITE(24);
|
|
||||||
BLYNK_WRITE(25);
|
|
||||||
BLYNK_WRITE(26);
|
|
||||||
BLYNK_WRITE(27);
|
|
||||||
BLYNK_WRITE(28);
|
|
||||||
BLYNK_WRITE(29);
|
|
||||||
BLYNK_WRITE(30);
|
|
||||||
BLYNK_WRITE(31);
|
|
||||||
#ifdef BLYNK_USE_128_VPINS
|
|
||||||
BLYNK_WRITE(32);
|
|
||||||
BLYNK_WRITE(33);
|
|
||||||
BLYNK_WRITE(34);
|
|
||||||
BLYNK_WRITE(35);
|
|
||||||
BLYNK_WRITE(36);
|
|
||||||
BLYNK_WRITE(37);
|
|
||||||
BLYNK_WRITE(38);
|
|
||||||
BLYNK_WRITE(39);
|
|
||||||
BLYNK_WRITE(40);
|
|
||||||
BLYNK_WRITE(41);
|
|
||||||
BLYNK_WRITE(42);
|
|
||||||
BLYNK_WRITE(43);
|
|
||||||
BLYNK_WRITE(44);
|
|
||||||
BLYNK_WRITE(45);
|
|
||||||
BLYNK_WRITE(46);
|
|
||||||
BLYNK_WRITE(47);
|
|
||||||
BLYNK_WRITE(48);
|
|
||||||
BLYNK_WRITE(49);
|
|
||||||
BLYNK_WRITE(50);
|
|
||||||
BLYNK_WRITE(51);
|
|
||||||
BLYNK_WRITE(52);
|
|
||||||
BLYNK_WRITE(53);
|
|
||||||
BLYNK_WRITE(54);
|
|
||||||
BLYNK_WRITE(55);
|
|
||||||
BLYNK_WRITE(56);
|
|
||||||
BLYNK_WRITE(57);
|
|
||||||
BLYNK_WRITE(58);
|
|
||||||
BLYNK_WRITE(59);
|
|
||||||
BLYNK_WRITE(60);
|
|
||||||
BLYNK_WRITE(61);
|
|
||||||
BLYNK_WRITE(62);
|
|
||||||
BLYNK_WRITE(63);
|
|
||||||
BLYNK_WRITE(64);
|
|
||||||
BLYNK_WRITE(65);
|
|
||||||
BLYNK_WRITE(66);
|
|
||||||
BLYNK_WRITE(67);
|
|
||||||
BLYNK_WRITE(68);
|
|
||||||
BLYNK_WRITE(69);
|
|
||||||
BLYNK_WRITE(70);
|
|
||||||
BLYNK_WRITE(71);
|
|
||||||
BLYNK_WRITE(72);
|
|
||||||
BLYNK_WRITE(73);
|
|
||||||
BLYNK_WRITE(74);
|
|
||||||
BLYNK_WRITE(75);
|
|
||||||
BLYNK_WRITE(76);
|
|
||||||
BLYNK_WRITE(77);
|
|
||||||
BLYNK_WRITE(78);
|
|
||||||
BLYNK_WRITE(79);
|
|
||||||
BLYNK_WRITE(80);
|
|
||||||
BLYNK_WRITE(81);
|
|
||||||
BLYNK_WRITE(82);
|
|
||||||
BLYNK_WRITE(83);
|
|
||||||
BLYNK_WRITE(84);
|
|
||||||
BLYNK_WRITE(85);
|
|
||||||
BLYNK_WRITE(86);
|
|
||||||
BLYNK_WRITE(87);
|
|
||||||
BLYNK_WRITE(88);
|
|
||||||
BLYNK_WRITE(89);
|
|
||||||
BLYNK_WRITE(90);
|
|
||||||
BLYNK_WRITE(91);
|
|
||||||
BLYNK_WRITE(92);
|
|
||||||
BLYNK_WRITE(93);
|
|
||||||
BLYNK_WRITE(94);
|
|
||||||
BLYNK_WRITE(95);
|
|
||||||
BLYNK_WRITE(96);
|
|
||||||
BLYNK_WRITE(97);
|
|
||||||
BLYNK_WRITE(98);
|
|
||||||
BLYNK_WRITE(99);
|
|
||||||
BLYNK_WRITE(100);
|
|
||||||
BLYNK_WRITE(101);
|
|
||||||
BLYNK_WRITE(102);
|
|
||||||
BLYNK_WRITE(103);
|
|
||||||
BLYNK_WRITE(104);
|
|
||||||
BLYNK_WRITE(105);
|
|
||||||
BLYNK_WRITE(106);
|
|
||||||
BLYNK_WRITE(107);
|
|
||||||
BLYNK_WRITE(108);
|
|
||||||
BLYNK_WRITE(109);
|
|
||||||
BLYNK_WRITE(110);
|
|
||||||
BLYNK_WRITE(111);
|
|
||||||
BLYNK_WRITE(112);
|
|
||||||
BLYNK_WRITE(113);
|
|
||||||
BLYNK_WRITE(114);
|
|
||||||
BLYNK_WRITE(115);
|
|
||||||
BLYNK_WRITE(116);
|
|
||||||
BLYNK_WRITE(117);
|
|
||||||
BLYNK_WRITE(118);
|
|
||||||
BLYNK_WRITE(119);
|
|
||||||
BLYNK_WRITE(120);
|
|
||||||
BLYNK_WRITE(121);
|
|
||||||
BLYNK_WRITE(122);
|
|
||||||
BLYNK_WRITE(123);
|
|
||||||
BLYNK_WRITE(124);
|
|
||||||
BLYNK_WRITE(125);
|
|
||||||
BLYNK_WRITE(126);
|
|
||||||
BLYNK_WRITE(127);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,379 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkParam.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Container for handler parameters
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkParam_h
|
|
||||||
#define BlynkParam_h
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "BlynkConfig.h"
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
|
|
||||||
#define BLYNK_PARAM_KV(k, v) k "\0" v "\0"
|
|
||||||
|
|
||||||
class BlynkParam
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
class iterator
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
iterator(const char* c, const char* l) : ptr(c), limit(l) {}
|
|
||||||
static iterator invalid() { return iterator(NULL, NULL); }
|
|
||||||
|
|
||||||
operator const char* () const { return asStr(); }
|
|
||||||
operator int () const { return asInt(); }
|
|
||||||
const char* asStr() const { return ptr; }
|
|
||||||
const char* asString() const { return ptr; }
|
|
||||||
int asInt() const { if(!isValid()) return 0; return atoi(ptr); }
|
|
||||||
long asLong() const { if(!isValid()) return 0; return atol(ptr); }
|
|
||||||
//long long asLongLong() const { return atoll(ptr); }
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
double asDouble() const { if(!isValid()) return 0; return atof(ptr); }
|
|
||||||
float asFloat() const { if(!isValid()) return 0; return atof(ptr); }
|
|
||||||
#endif
|
|
||||||
bool isValid() const { return ptr != NULL && ptr < limit; }
|
|
||||||
bool isEmpty() const { if(!isValid()) return true; return *ptr == '\0'; }
|
|
||||||
|
|
||||||
bool operator < (const iterator& it) const { return ptr < it.ptr; }
|
|
||||||
bool operator >= (const iterator& it) const { return ptr >= it.ptr; }
|
|
||||||
|
|
||||||
iterator& operator ++() {
|
|
||||||
if(isValid()) {
|
|
||||||
ptr += strlen(ptr) + 1;
|
|
||||||
}
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
const char* ptr;
|
|
||||||
const char* limit;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit
|
|
||||||
BlynkParam(void* addr, size_t length)
|
|
||||||
: buff((char*)addr), len(length), buff_size(length)
|
|
||||||
{}
|
|
||||||
|
|
||||||
explicit
|
|
||||||
BlynkParam(void* addr, size_t length, size_t buffsize)
|
|
||||||
: buff((char*)addr), len(length), buff_size(buffsize)
|
|
||||||
{}
|
|
||||||
|
|
||||||
const char* asStr() const { return buff; }
|
|
||||||
const char* asString() const { return buff; }
|
|
||||||
int asInt() const { return atoi(buff); }
|
|
||||||
long asLong() const { return atol(buff); }
|
|
||||||
//long long asLongLong() const { return atoll(buff); }
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
double asDouble() const { return atof(buff); }
|
|
||||||
float asFloat() const { return atof(buff); }
|
|
||||||
#endif
|
|
||||||
bool isEmpty() const { return *buff == '\0'; }
|
|
||||||
|
|
||||||
iterator begin() const { return iterator(buff, buff+len); }
|
|
||||||
iterator end() const { return iterator(buff+len, buff+len); }
|
|
||||||
|
|
||||||
iterator operator[](int index) const;
|
|
||||||
iterator operator[](const char* key) const;
|
|
||||||
|
|
||||||
void* getBuffer() const { return (void*)buff; }
|
|
||||||
size_t getLength() const { return len; }
|
|
||||||
|
|
||||||
// Modification
|
|
||||||
void add(int value);
|
|
||||||
void add(unsigned int value);
|
|
||||||
void add(long value);
|
|
||||||
void add(unsigned long value);
|
|
||||||
void add(long long value);
|
|
||||||
void add(unsigned long long value);
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
void add(float value);
|
|
||||||
void add(double value);
|
|
||||||
#endif
|
|
||||||
void add(const char* str);
|
|
||||||
void add(const void* b, size_t l);
|
|
||||||
#if defined(ARDUINO) || defined(SPARK) || defined(PARTICLE)
|
|
||||||
void add(const String& str);
|
|
||||||
#if defined(BLYNK_HAS_PROGMEM)
|
|
||||||
void add(const __FlashStringHelper* str);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
|
||||||
void add_multi(T last) {
|
|
||||||
add(last);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
|
||||||
void add_multi(T head, Args... tail) {
|
|
||||||
add(head);
|
|
||||||
add_multi(tail...);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename TV>
|
|
||||||
void add_key(const char* key, const TV& val) {
|
|
||||||
add(key);
|
|
||||||
add(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
char* buff;
|
|
||||||
size_t len;
|
|
||||||
size_t buff_size;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class BlynkParamAllocated
|
|
||||||
: public BlynkParam
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BlynkParamAllocated(size_t size)
|
|
||||||
: BlynkParam(malloc(size), 0, size)
|
|
||||||
{}
|
|
||||||
~BlynkParamAllocated() {
|
|
||||||
free(buff);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline
|
|
||||||
BlynkParam::iterator BlynkParam::operator[](int index) const
|
|
||||||
{
|
|
||||||
const iterator e = end();
|
|
||||||
for (iterator it = begin(); it < e; ++it) {
|
|
||||||
if (!index--) {
|
|
||||||
return it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return iterator::invalid();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
BlynkParam::iterator BlynkParam::operator[](const char* key) const
|
|
||||||
{
|
|
||||||
const iterator e = end();
|
|
||||||
for (iterator it = begin(); it < e; ++it) {
|
|
||||||
if (!strcmp(it.asStr(), key)) {
|
|
||||||
return ++it;
|
|
||||||
}
|
|
||||||
++it;
|
|
||||||
if (it >= e) break;
|
|
||||||
}
|
|
||||||
return iterator::invalid();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(const void* b, size_t l)
|
|
||||||
{
|
|
||||||
if (len + l > buff_size)
|
|
||||||
return;
|
|
||||||
memcpy(buff+len, b, l);
|
|
||||||
len += l;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(const char* str)
|
|
||||||
{
|
|
||||||
if (str == NULL) {
|
|
||||||
buff[len++] = '\0';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
add(str, strlen(str)+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(ARDUINO) || defined(SPARK) || defined(PARTICLE)
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(const String& str)
|
|
||||||
{
|
|
||||||
#if defined(ARDUINO_AVR_DIGISPARK) \
|
|
||||||
|| defined(__ARDUINO_X86__) \
|
|
||||||
|| defined(__RFduino__)
|
|
||||||
|
|
||||||
size_t len = str.length()+1;
|
|
||||||
char buff[len];
|
|
||||||
const_cast<String&>(str).toCharArray(buff, len);
|
|
||||||
add(buff, len);
|
|
||||||
#else
|
|
||||||
add(str.c_str());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(BLYNK_HAS_PROGMEM)
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(const __FlashStringHelper* ifsh)
|
|
||||||
{
|
|
||||||
PGM_P p = reinterpret_cast<PGM_P>(ifsh);
|
|
||||||
size_t l = strlen_P(p) + 1;
|
|
||||||
if (len + l > buff_size)
|
|
||||||
return;
|
|
||||||
memcpy_P(buff+len, p, l);
|
|
||||||
len += l;
|
|
||||||
buff[len] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__AVR__) || defined (ARDUINO_ARCH_ARC32)
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(int value)
|
|
||||||
{
|
|
||||||
char str[2 + 8 * sizeof(value)];
|
|
||||||
itoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned int value)
|
|
||||||
{
|
|
||||||
char str[1 + 8 * sizeof(value)];
|
|
||||||
utoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(long value)
|
|
||||||
{
|
|
||||||
char str[2 + 8 * sizeof(value)];
|
|
||||||
ltoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned long value)
|
|
||||||
{
|
|
||||||
char str[1 + 8 * sizeof(value)];
|
|
||||||
ultoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(long long value) // TODO: this currently adds just a long
|
|
||||||
{
|
|
||||||
char str[2 + 8 * sizeof(value)];
|
|
||||||
ltoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned long long value) // TODO: this currently adds just a long
|
|
||||||
{
|
|
||||||
char str[1 + 8 * sizeof(value)];
|
|
||||||
ultoa(value, str, 10);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(float value)
|
|
||||||
{
|
|
||||||
char str[33];
|
|
||||||
dtostrf(value, 5, 3, str);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(double value)
|
|
||||||
{
|
|
||||||
char str[33];
|
|
||||||
dtostrf(value, 5, 7, str);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(int value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%i", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned int value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%u", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(long value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%li", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned long value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%lu", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(long long value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%lli", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(unsigned long long value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%llu", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef BLYNK_NO_FLOAT
|
|
||||||
|
|
||||||
#if defined(BLYNK_USE_INTERNAL_DTOSTRF)
|
|
||||||
|
|
||||||
extern char* dtostrf_internal(double number, signed char width, unsigned char prec, char *s);
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(float value)
|
|
||||||
{
|
|
||||||
char str[33];
|
|
||||||
dtostrf_internal(value, 5, 3, str);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(double value)
|
|
||||||
{
|
|
||||||
char str[33];
|
|
||||||
dtostrf_internal(value, 5, 7, str);
|
|
||||||
add(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(float value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%2.3f", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
void BlynkParam::add(double value)
|
|
||||||
{
|
|
||||||
len += snprintf(buff+len, buff_size-len, "%2.7f", value)+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,535 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkProtocol.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Blynk protocol implementation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkProtocol_h
|
|
||||||
#define BlynkProtocol_h
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
#include "BlynkProtocolDefs.h"
|
|
||||||
#include "BlynkApi.h"
|
|
||||||
#include "BlynkUtility.h"
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
class BlynkProtocol
|
|
||||||
: public BlynkApi< BlynkProtocol<Transp> >
|
|
||||||
{
|
|
||||||
friend class BlynkApi< BlynkProtocol<Transp> >;
|
|
||||||
public:
|
|
||||||
enum BlynkState {
|
|
||||||
CONNECTING,
|
|
||||||
CONNECTED,
|
|
||||||
DISCONNECTED,
|
|
||||||
};
|
|
||||||
|
|
||||||
BlynkProtocol(Transp& transp)
|
|
||||||
: conn(transp)
|
|
||||||
, authkey(NULL)
|
|
||||||
, redir_serv(NULL)
|
|
||||||
, lastActivityIn(0)
|
|
||||||
, lastActivityOut(0)
|
|
||||||
, lastHeartbeat(0)
|
|
||||||
, msgIdOut(0)
|
|
||||||
, msgIdOutOverride(0)
|
|
||||||
, nesting(0)
|
|
||||||
, state(CONNECTING)
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool connected() { return state == CONNECTED; }
|
|
||||||
|
|
||||||
bool connect(uint32_t timeout = BLYNK_TIMEOUT_MS*3) {
|
|
||||||
conn.disconnect();
|
|
||||||
state = CONNECTING;
|
|
||||||
millis_time_t started = BlynkMillis();
|
|
||||||
while ((state != CONNECTED) &&
|
|
||||||
(BlynkMillis() - started < timeout))
|
|
||||||
{
|
|
||||||
run();
|
|
||||||
}
|
|
||||||
return state == CONNECTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
void disconnect() {
|
|
||||||
conn.disconnect();
|
|
||||||
state = DISCONNECTED;
|
|
||||||
BLYNK_LOG1(BLYNK_F("Disconnected"));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool run(bool avail = false);
|
|
||||||
|
|
||||||
// TODO: Fixme
|
|
||||||
void startSession() {
|
|
||||||
conn.connect();
|
|
||||||
state = CONNECTING;
|
|
||||||
msgIdOut = 0;
|
|
||||||
lastHeartbeat = lastActivityIn = lastActivityOut = (BlynkMillis() - 5000UL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void sendCmd(uint8_t cmd, uint16_t id = 0, const void* data = NULL, size_t length = 0, const void* data2 = NULL, size_t length2 = 0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void internalReconnect() {
|
|
||||||
state = CONNECTING;
|
|
||||||
conn.disconnect();
|
|
||||||
BlynkOnDisconnected();
|
|
||||||
}
|
|
||||||
|
|
||||||
int readHeader(BlynkHeader& hdr);
|
|
||||||
uint16_t getNextMsgId();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void begin(const char* auth) {
|
|
||||||
this->authkey = auth;
|
|
||||||
lastHeartbeat = lastActivityIn = lastActivityOut = (BlynkMillis() - 5000UL);
|
|
||||||
|
|
||||||
#if defined(BLYNK_NO_FANCY_LOGO)
|
|
||||||
BLYNK_LOG1(BLYNK_F("Blynk v" BLYNK_VERSION " on " BLYNK_INFO_DEVICE));
|
|
||||||
#else
|
|
||||||
BLYNK_LOG1(BLYNK_F(BLYNK_NEWLINE
|
|
||||||
" ___ __ __" BLYNK_NEWLINE
|
|
||||||
" / _ )/ /_ _____ / /__" BLYNK_NEWLINE
|
|
||||||
" / _ / / // / _ \\/ '_/" BLYNK_NEWLINE
|
|
||||||
" /____/_/\\_, /_//_/_/\\_\\" BLYNK_NEWLINE
|
|
||||||
" /___/ v" BLYNK_VERSION " on " BLYNK_INFO_DEVICE BLYNK_NEWLINE
|
|
||||||
BLYNK_NEWLINE
|
|
||||||
" Give Blynk a Github star! => https://github.com/blynkkk/blynk-library" BLYNK_NEWLINE
|
|
||||||
));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
bool processInput(void);
|
|
||||||
|
|
||||||
Transp& conn;
|
|
||||||
|
|
||||||
private:
|
|
||||||
const char* authkey;
|
|
||||||
char* redir_serv;
|
|
||||||
millis_time_t lastActivityIn;
|
|
||||||
millis_time_t lastActivityOut;
|
|
||||||
union {
|
|
||||||
millis_time_t lastHeartbeat;
|
|
||||||
millis_time_t lastLogin;
|
|
||||||
};
|
|
||||||
uint16_t msgIdOut;
|
|
||||||
uint16_t msgIdOutOverride;
|
|
||||||
uint8_t nesting;
|
|
||||||
protected:
|
|
||||||
BlynkState state;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
bool BlynkProtocol<Transp>::run(bool avail)
|
|
||||||
{
|
|
||||||
BLYNK_RUN_YIELD();
|
|
||||||
|
|
||||||
if (state == DISCONNECTED) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Detect nesting
|
|
||||||
BlynkHelperAutoInc guard(nesting);
|
|
||||||
if (msgIdOutOverride || nesting > 2) {
|
|
||||||
//BLYNK_LOG1(BLYNK_F("Nested run() skipped"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (conn.connected()) {
|
|
||||||
while (avail || conn.available() > 0) {
|
|
||||||
//BLYNK_LOG2(BLYNK_F("Available: "), conn.available());
|
|
||||||
//const unsigned long t = micros();
|
|
||||||
if (!processInput()) {
|
|
||||||
conn.disconnect();
|
|
||||||
// TODO: Only when in direct mode?
|
|
||||||
#ifdef BLYNK_USE_DIRECT_CONNECT
|
|
||||||
state = CONNECTING;
|
|
||||||
#endif
|
|
||||||
BlynkOnDisconnected();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
avail = false;
|
|
||||||
//BLYNK_LOG2(BLYNK_F("Proc time: "), micros() - t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const millis_time_t t = BlynkMillis();
|
|
||||||
|
|
||||||
// Update connection status after running commands
|
|
||||||
const bool tconn = conn.connected();
|
|
||||||
|
|
||||||
if (state == CONNECTED) {
|
|
||||||
if (!tconn) {
|
|
||||||
lastHeartbeat = t;
|
|
||||||
internalReconnect();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (t - lastActivityIn > (1000UL * BLYNK_HEARTBEAT + BLYNK_TIMEOUT_MS*3)) {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG6(BLYNK_F("Heartbeat timeout: "), t, BLYNK_F(", "), lastActivityIn, BLYNK_F(", "), lastHeartbeat);
|
|
||||||
#else
|
|
||||||
BLYNK_LOG1(BLYNK_F("Heartbeat timeout"));
|
|
||||||
#endif
|
|
||||||
internalReconnect();
|
|
||||||
return false;
|
|
||||||
} else if ((t - lastActivityIn > 1000UL * BLYNK_HEARTBEAT ||
|
|
||||||
t - lastActivityOut > 1000UL * BLYNK_HEARTBEAT) &&
|
|
||||||
t - lastHeartbeat > BLYNK_TIMEOUT_MS)
|
|
||||||
{
|
|
||||||
// Send ping if we didn't either send or receive something
|
|
||||||
// for BLYNK_HEARTBEAT seconds
|
|
||||||
sendCmd(BLYNK_CMD_PING);
|
|
||||||
lastHeartbeat = t;
|
|
||||||
}
|
|
||||||
} else if (state == CONNECTING) {
|
|
||||||
#ifdef BLYNK_USE_DIRECT_CONNECT
|
|
||||||
if (!tconn)
|
|
||||||
conn.connect();
|
|
||||||
#else
|
|
||||||
if (tconn && (t - lastLogin > BLYNK_TIMEOUT_MS)) {
|
|
||||||
BLYNK_LOG1(BLYNK_F("Login timeout"));
|
|
||||||
conn.disconnect();
|
|
||||||
state = CONNECTING;
|
|
||||||
return false;
|
|
||||||
} else if (!tconn && (t - lastLogin > 5000UL)) {
|
|
||||||
conn.disconnect();
|
|
||||||
if (!conn.connect()) {
|
|
||||||
lastLogin = t;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
msgIdOut = 1;
|
|
||||||
sendCmd(BLYNK_CMD_LOGIN, 1, authkey, strlen(authkey));
|
|
||||||
lastLogin = lastActivityOut;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
BLYNK_FORCE_INLINE
|
|
||||||
bool BlynkProtocol<Transp>::processInput(void)
|
|
||||||
{
|
|
||||||
BlynkHeader hdr;
|
|
||||||
const int ret = readHeader(hdr);
|
|
||||||
|
|
||||||
if (ret == 0) {
|
|
||||||
return true; // Considered OK (no data on input)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret < 0 || hdr.msg_id == 0) {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG2(BLYNK_F("Bad hdr len: "), ret);
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hdr.type == BLYNK_CMD_RESPONSE) {
|
|
||||||
lastActivityIn = BlynkMillis();
|
|
||||||
|
|
||||||
#ifndef BLYNK_USE_DIRECT_CONNECT
|
|
||||||
if (state == CONNECTING && (1 == hdr.msg_id)) {
|
|
||||||
switch (hdr.length) {
|
|
||||||
case BLYNK_SUCCESS:
|
|
||||||
case BLYNK_ALREADY_REGISTERED:
|
|
||||||
BLYNK_LOG3(BLYNK_F("Ready (ping: "), lastActivityIn-lastHeartbeat, BLYNK_F("ms)."));
|
|
||||||
lastHeartbeat = lastActivityIn;
|
|
||||||
state = CONNECTED;
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
if (size_t ram = BlynkFreeRam()) {
|
|
||||||
BLYNK_LOG2(BLYNK_F("Free RAM: "), ram);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
this->sendInfo();
|
|
||||||
BLYNK_RUN_YIELD();
|
|
||||||
BlynkOnConnected();
|
|
||||||
return true;
|
|
||||||
case BLYNK_INVALID_TOKEN:
|
|
||||||
BLYNK_LOG1(BLYNK_F("Invalid auth token"));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
BLYNK_LOG2(BLYNK_F("Connect failed. code: "), hdr.length);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (BLYNK_NOT_AUTHENTICATED == hdr.length) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// TODO: return code may indicate App presence
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hdr.length > BLYNK_MAX_READBYTES) {
|
|
||||||
BLYNK_LOG2(BLYNK_F("Packet too big: "), hdr.length);
|
|
||||||
// TODO: Flush
|
|
||||||
internalReconnect();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t inputBuffer[hdr.length+1]; // Add 1 to zero-terminate
|
|
||||||
if (hdr.length != conn.read(inputBuffer, hdr.length)) {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG1(BLYNK_F("Can't read body"));
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
inputBuffer[hdr.length] = '\0';
|
|
||||||
|
|
||||||
BLYNK_DBG_DUMP(">", inputBuffer, hdr.length);
|
|
||||||
|
|
||||||
lastActivityIn = BlynkMillis();
|
|
||||||
|
|
||||||
switch (hdr.type)
|
|
||||||
{
|
|
||||||
case BLYNK_CMD_LOGIN: {
|
|
||||||
#ifdef BLYNK_USE_DIRECT_CONNECT
|
|
||||||
if (strncmp(authkey, (char*)inputBuffer, 32)) {
|
|
||||||
BLYNK_LOG1(BLYNK_F("Invalid token"));
|
|
||||||
sendCmd(BLYNK_CMD_RESPONSE, hdr.msg_id, NULL, BLYNK_INVALID_TOKEN);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (state == CONNECTING) {
|
|
||||||
BLYNK_LOG1(BLYNK_F("Ready"));
|
|
||||||
state = CONNECTED;
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
if (size_t ram = BlynkFreeRam()) {
|
|
||||||
BLYNK_LOG2(BLYNK_F("Free RAM: "), ram);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
this->sendInfo();
|
|
||||||
BLYNK_RUN_YIELD();
|
|
||||||
BlynkOnConnected();
|
|
||||||
}
|
|
||||||
sendCmd(BLYNK_CMD_RESPONSE, hdr.msg_id, NULL, BLYNK_SUCCESS);
|
|
||||||
} break;
|
|
||||||
case BLYNK_CMD_PING: {
|
|
||||||
sendCmd(BLYNK_CMD_RESPONSE, hdr.msg_id, NULL, BLYNK_SUCCESS);
|
|
||||||
} break;
|
|
||||||
case BLYNK_CMD_REDIRECT: {
|
|
||||||
if (!redir_serv) {
|
|
||||||
redir_serv = (char*)malloc(32);
|
|
||||||
}
|
|
||||||
BlynkParam param(inputBuffer, hdr.length);
|
|
||||||
uint16_t redir_port = BLYNK_DEFAULT_PORT; // TODO: Fixit
|
|
||||||
|
|
||||||
BlynkParam::iterator it = param.begin();
|
|
||||||
if (it >= param.end())
|
|
||||||
return false;
|
|
||||||
strncpy(redir_serv, it.asStr(), 32);
|
|
||||||
if (++it < param.end())
|
|
||||||
redir_port = it.asLong();
|
|
||||||
BLYNK_LOG4(BLYNK_F("Redirecting to "), redir_serv, ':', redir_port);
|
|
||||||
conn.disconnect();
|
|
||||||
conn.begin(redir_serv, redir_port);
|
|
||||||
state = CONNECTING;
|
|
||||||
lastHeartbeat = lastActivityIn = lastActivityOut = (BlynkMillis() - 5000UL);
|
|
||||||
} break;
|
|
||||||
case BLYNK_CMD_HARDWARE:
|
|
||||||
case BLYNK_CMD_BRIDGE: {
|
|
||||||
msgIdOutOverride = hdr.msg_id;
|
|
||||||
this->processCmd(inputBuffer, hdr.length);
|
|
||||||
msgIdOutOverride = 0;
|
|
||||||
} break;
|
|
||||||
case BLYNK_CMD_INTERNAL: {
|
|
||||||
BlynkReq req = { 0 };
|
|
||||||
BlynkParam param(inputBuffer, hdr.length);
|
|
||||||
BlynkParam::iterator it = param.begin();
|
|
||||||
if (it >= param.end())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
uint32_t cmd32;
|
|
||||||
memcpy(&cmd32, it.asStr(), sizeof(cmd32));
|
|
||||||
|
|
||||||
++it;
|
|
||||||
char* start = (char*)(it).asStr();
|
|
||||||
unsigned length = hdr.length - (start - (char*)inputBuffer);
|
|
||||||
BlynkParam param2(start, length);
|
|
||||||
|
|
||||||
switch (cmd32) {
|
|
||||||
case BLYNK_INT_RTC: BlynkWidgetWriteInternalPinRTC(req, param2); break;
|
|
||||||
case BLYNK_INT_OTA: BlynkWidgetWriteInternalPinOTA(req, param2); break;
|
|
||||||
case BLYNK_INT_ACON: BlynkWidgetWriteInternalPinACON(req, param2); break;
|
|
||||||
case BLYNK_INT_ADIS: BlynkWidgetWriteInternalPinADIS(req, param2); break;
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
default: BLYNK_LOG2(BLYNK_F("Invalid internal cmd:"), param.asStr());
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
case BLYNK_CMD_DEBUG_PRINT: {
|
|
||||||
if (hdr.length) {
|
|
||||||
BLYNK_LOG2(BLYNK_F("Server: "), (char*)inputBuffer);
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
default: {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG2(BLYNK_F("Invalid header type: "), hdr.type);
|
|
||||||
#endif
|
|
||||||
// TODO: Flush
|
|
||||||
internalReconnect();
|
|
||||||
} break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
int BlynkProtocol<Transp>::readHeader(BlynkHeader& hdr)
|
|
||||||
{
|
|
||||||
size_t rlen = conn.read(&hdr, sizeof(hdr));
|
|
||||||
if (rlen == 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sizeof(hdr) != rlen) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
BLYNK_DBG_DUMP(">", &hdr, sizeof(BlynkHeader));
|
|
||||||
|
|
||||||
hdr.msg_id = ntohs(hdr.msg_id);
|
|
||||||
hdr.length = ntohs(hdr.length);
|
|
||||||
|
|
||||||
return rlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef BLYNK_SEND_THROTTLE
|
|
||||||
#define BLYNK_SEND_THROTTLE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BLYNK_SEND_CHUNK
|
|
||||||
#define BLYNK_SEND_CHUNK 1024 // Just a big number
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
void BlynkProtocol<Transp>::sendCmd(uint8_t cmd, uint16_t id, const void* data, size_t length, const void* data2, size_t length2)
|
|
||||||
{
|
|
||||||
if (!conn.connected() || (cmd != BLYNK_CMD_RESPONSE && cmd != BLYNK_CMD_PING && cmd != BLYNK_CMD_LOGIN && state != CONNECTED) ) {
|
|
||||||
#ifdef BLYNK_DEBUG_ALL
|
|
||||||
BLYNK_LOG2(BLYNK_F("Cmd skipped:"), cmd);
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == id) {
|
|
||||||
id = getNextMsgId();
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(BLYNK_MSG_LIMIT) && BLYNK_MSG_LIMIT > 0
|
|
||||||
if (cmd >= BLYNK_CMD_TWEET && cmd <= BLYNK_CMD_HARDWARE) {
|
|
||||||
const millis_time_t allowed_time = BlynkMax(lastActivityOut, lastActivityIn) + 1000/BLYNK_MSG_LIMIT;
|
|
||||||
int32_t wait_time = allowed_time - BlynkMillis();
|
|
||||||
if (wait_time >= 0) {
|
|
||||||
#ifdef BLYNK_DEBUG_ALL
|
|
||||||
BLYNK_LOG2(BLYNK_F("Waiting:"), wait_time);
|
|
||||||
#endif
|
|
||||||
while (wait_time >= 0) {
|
|
||||||
run();
|
|
||||||
wait_time = allowed_time - BlynkMillis();
|
|
||||||
}
|
|
||||||
} else if (nesting == 0) {
|
|
||||||
run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const size_t full_length = (sizeof(BlynkHeader)) +
|
|
||||||
(data ? length : 0) +
|
|
||||||
(data2 ? length2 : 0);
|
|
||||||
|
|
||||||
#if defined(BLYNK_SEND_ATOMIC) || defined(ESP8266) || defined(ESP32) || defined(SPARK) || defined(PARTICLE) || defined(ENERGIA)
|
|
||||||
// Those have more RAM and like single write at a time...
|
|
||||||
|
|
||||||
uint8_t buff[full_length];
|
|
||||||
|
|
||||||
BlynkHeader* hdr = (BlynkHeader*)buff;
|
|
||||||
hdr->type = cmd;
|
|
||||||
hdr->msg_id = htons(id);
|
|
||||||
hdr->length = htons(length+length2);
|
|
||||||
|
|
||||||
size_t pos = sizeof(BlynkHeader);
|
|
||||||
if (data && length) {
|
|
||||||
memcpy(buff + pos, data, length);
|
|
||||||
pos += length;
|
|
||||||
}
|
|
||||||
if (data2 && length2) {
|
|
||||||
memcpy(buff + pos, data2, length2);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t wlen = 0;
|
|
||||||
while (wlen < full_length) {
|
|
||||||
const size_t chunk = BlynkMin(size_t(BLYNK_SEND_CHUNK), full_length - wlen);
|
|
||||||
BLYNK_DBG_DUMP("<", buff + wlen, chunk);
|
|
||||||
const size_t w = conn.write(buff + wlen, chunk);
|
|
||||||
BlynkDelay(BLYNK_SEND_THROTTLE);
|
|
||||||
if (w == 0) {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG1(BLYNK_F("Cmd error"));
|
|
||||||
#endif
|
|
||||||
conn.disconnect();
|
|
||||||
state = CONNECTING;
|
|
||||||
BlynkOnDisconnected();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wlen += w;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
BlynkHeader hdr;
|
|
||||||
hdr.type = cmd;
|
|
||||||
hdr.msg_id = htons(id);
|
|
||||||
hdr.length = htons(length+length2);
|
|
||||||
|
|
||||||
BLYNK_DBG_DUMP("<", &hdr, sizeof(hdr));
|
|
||||||
size_t wlen = conn.write(&hdr, sizeof(hdr));
|
|
||||||
BlynkDelay(BLYNK_SEND_THROTTLE);
|
|
||||||
|
|
||||||
if (cmd != BLYNK_CMD_RESPONSE) {
|
|
||||||
if (length) {
|
|
||||||
BLYNK_DBG_DUMP("<", data, length);
|
|
||||||
wlen += conn.write(data, length);
|
|
||||||
BlynkDelay(BLYNK_SEND_THROTTLE);
|
|
||||||
}
|
|
||||||
if (length2) {
|
|
||||||
BLYNK_DBG_DUMP("<", data2, length2);
|
|
||||||
wlen += conn.write(data2, length2);
|
|
||||||
BlynkDelay(BLYNK_SEND_THROTTLE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (wlen != full_length) {
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG4(BLYNK_F("Sent "), wlen, '/', full_length);
|
|
||||||
#endif
|
|
||||||
internalReconnect();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
lastActivityOut = BlynkMillis();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Transp>
|
|
||||||
uint16_t BlynkProtocol<Transp>::getNextMsgId()
|
|
||||||
{
|
|
||||||
if (msgIdOutOverride != 0)
|
|
||||||
return msgIdOutOverride;
|
|
||||||
if (++msgIdOut == 0)
|
|
||||||
msgIdOut = 1;
|
|
||||||
return msgIdOut;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,140 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkProtocolDefs.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief Blynk protocol definitions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkProtocolDefs_h
|
|
||||||
#define BlynkProtocolDefs_h
|
|
||||||
|
|
||||||
enum BlynkCmd
|
|
||||||
{
|
|
||||||
BLYNK_CMD_RESPONSE = 0,
|
|
||||||
BLYNK_CMD_REGISTER = 1,
|
|
||||||
BLYNK_CMD_LOGIN = 2,
|
|
||||||
BLYNK_CMD_SAVE_PROF = 3,
|
|
||||||
BLYNK_CMD_LOAD_PROF = 4,
|
|
||||||
BLYNK_CMD_GET_TOKEN = 5,
|
|
||||||
BLYNK_CMD_PING = 6,
|
|
||||||
BLYNK_CMD_ACTIVATE = 7,
|
|
||||||
BLYNK_CMD_DEACTIVATE = 8,
|
|
||||||
BLYNK_CMD_REFRESH = 9,
|
|
||||||
BLYNK_CMD_GET_GRAPH_DATA = 10,
|
|
||||||
BLYNK_CMD_GET_GRAPH_DATA_RESPONSE = 11,
|
|
||||||
|
|
||||||
BLYNK_CMD_TWEET = 12,
|
|
||||||
BLYNK_CMD_EMAIL = 13,
|
|
||||||
BLYNK_CMD_NOTIFY = 14,
|
|
||||||
BLYNK_CMD_BRIDGE = 15,
|
|
||||||
BLYNK_CMD_HARDWARE_SYNC = 16,
|
|
||||||
BLYNK_CMD_INTERNAL = 17,
|
|
||||||
BLYNK_CMD_SMS = 18,
|
|
||||||
BLYNK_CMD_PROPERTY = 19,
|
|
||||||
BLYNK_CMD_HARDWARE = 20,
|
|
||||||
|
|
||||||
BLYNK_CMD_CREATE_DASH = 21,
|
|
||||||
BLYNK_CMD_SAVE_DASH = 22,
|
|
||||||
BLYNK_CMD_DELETE_DASH = 23,
|
|
||||||
BLYNK_CMD_LOAD_PROF_GZ = 24,
|
|
||||||
BLYNK_CMD_SYNC = 25,
|
|
||||||
BLYNK_CMD_SHARING = 26,
|
|
||||||
BLYNK_CMD_ADD_PUSH_TOKEN = 27,
|
|
||||||
|
|
||||||
//sharing commands
|
|
||||||
BLYNK_CMD_GET_SHARED_DASH = 29,
|
|
||||||
BLYNK_CMD_GET_SHARE_TOKEN = 30,
|
|
||||||
BLYNK_CMD_REFRESH_SHARE_TOKEN = 31,
|
|
||||||
BLYNK_CMD_SHARE_LOGIN = 32,
|
|
||||||
|
|
||||||
BLYNK_CMD_REDIRECT = 41,
|
|
||||||
|
|
||||||
BLYNK_CMD_DEBUG_PRINT = 55,
|
|
||||||
|
|
||||||
BLYNK_CMD_EVENT_LOG = 64
|
|
||||||
};
|
|
||||||
|
|
||||||
enum BlynkStatus
|
|
||||||
{
|
|
||||||
BLYNK_SUCCESS = 200,
|
|
||||||
BLYNK_QUOTA_LIMIT_EXCEPTION = 1,
|
|
||||||
BLYNK_ILLEGAL_COMMAND = 2,
|
|
||||||
BLYNK_NOT_REGISTERED = 3,
|
|
||||||
BLYNK_ALREADY_REGISTERED = 4,
|
|
||||||
BLYNK_NOT_AUTHENTICATED = 5,
|
|
||||||
BLYNK_NOT_ALLOWED = 6,
|
|
||||||
BLYNK_DEVICE_NOT_IN_NETWORK = 7,
|
|
||||||
BLYNK_NO_ACTIVE_DASHBOARD = 8,
|
|
||||||
BLYNK_INVALID_TOKEN = 9,
|
|
||||||
BLYNK_ILLEGAL_COMMAND_BODY = 11,
|
|
||||||
BLYNK_GET_GRAPH_DATA_EXCEPTION = 12,
|
|
||||||
BLYNK_NO_DATA_EXCEPTION = 17,
|
|
||||||
BLYNK_DEVICE_WENT_OFFLINE = 18,
|
|
||||||
BLYNK_SERVER_EXCEPTION = 19,
|
|
||||||
|
|
||||||
BLYNK_NTF_INVALID_BODY = 13,
|
|
||||||
BLYNK_NTF_NOT_AUTHORIZED = 14,
|
|
||||||
BLYNK_NTF_ECXEPTION = 15,
|
|
||||||
|
|
||||||
BLYNK_TIMEOUT = 16,
|
|
||||||
|
|
||||||
BLYNK_NOT_SUPPORTED_VERSION = 20,
|
|
||||||
BLYNK_ENERGY_LIMIT = 21
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BlynkHeader
|
|
||||||
{
|
|
||||||
uint8_t type;
|
|
||||||
uint16_t msg_id;
|
|
||||||
uint16_t length;
|
|
||||||
}
|
|
||||||
BLYNK_ATTR_PACKED;
|
|
||||||
|
|
||||||
#if defined(ESP32)
|
|
||||||
#include <lwip/ip_addr.h>
|
|
||||||
#elif !defined(htons) && (defined(ARDUINO) || defined(ESP8266) || defined(PARTICLE) || defined(__MBED__))
|
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
||||||
#define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) )
|
|
||||||
#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
|
|
||||||
((x)<< 8 & 0x00FF0000UL) | \
|
|
||||||
((x)>> 8 & 0x0000FF00UL) | \
|
|
||||||
((x)>>24 & 0x000000FFUL) )
|
|
||||||
#define ntohs(x) htons(x)
|
|
||||||
#define ntohl(x) htonl(x)
|
|
||||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
||||||
#define htons(x) (x)
|
|
||||||
#define htonl(x) (x)
|
|
||||||
#define ntohs(x) (x)
|
|
||||||
#define ntohl(x) (x)
|
|
||||||
#else
|
|
||||||
#error byte order problem
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
||||||
#define BLYNK_STR_16(a,b) ((uint16_t(a) << 0) | (uint16_t(b) << 8))
|
|
||||||
#define BLYNK_STR_32(a,b,c,d) ((uint32_t(a) << 0) | (uint32_t(b) << 8) | (uint32_t(c) << 16) | (uint32_t(d) << 24))
|
|
||||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
||||||
#define BLYNK_STR_16(a,b) ((uint16_t(b) << 0) | (uint16_t(a) << 8))
|
|
||||||
#define BLYNK_STR_32(a,b,c,d) ((uint32_t(d) << 0) | (uint32_t(c) << 8) | (uint32_t(b) << 16) | (uint32_t(a) << 24))
|
|
||||||
#else
|
|
||||||
#error byte order problem
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BLYNK_HW_PM BLYNK_STR_16('p','m')
|
|
||||||
#define BLYNK_HW_DW BLYNK_STR_16('d','w')
|
|
||||||
#define BLYNK_HW_DR BLYNK_STR_16('d','r')
|
|
||||||
#define BLYNK_HW_AW BLYNK_STR_16('a','w')
|
|
||||||
#define BLYNK_HW_AR BLYNK_STR_16('a','r')
|
|
||||||
#define BLYNK_HW_VW BLYNK_STR_16('v','w')
|
|
||||||
#define BLYNK_HW_VR BLYNK_STR_16('v','r')
|
|
||||||
|
|
||||||
#define BLYNK_INT_RTC BLYNK_STR_32('r','t','c',0)
|
|
||||||
#define BLYNK_INT_OTA BLYNK_STR_32('o','t','a',0)
|
|
||||||
#define BLYNK_INT_ACON BLYNK_STR_32('a','c','o','n')
|
|
||||||
#define BLYNK_INT_ADIS BLYNK_STR_32('a','d','i','s')
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,47 +0,0 @@
|
|||||||
class BlynkStackOnly
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
BlynkStackOnly() {}
|
|
||||||
~BlynkStackOnly() {}
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// @brief Declared as private to prevent usage of dynamic memory
|
|
||||||
void* operator new(size_t size);
|
|
||||||
/// @brief Declared as private to prevent usage of dynamic memory
|
|
||||||
void operator delete(void *p);
|
|
||||||
};
|
|
||||||
|
|
||||||
class BlynkNonCopyable
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
BlynkNonCopyable(){}
|
|
||||||
~BlynkNonCopyable(){}
|
|
||||||
|
|
||||||
private:
|
|
||||||
/// @brief Declared as private to prevent usage of copy constructor
|
|
||||||
BlynkNonCopyable(const BlynkNonCopyable&);
|
|
||||||
/// @brief Declared as private to prevent usage of assignment operator
|
|
||||||
BlynkNonCopyable& operator=(const BlynkNonCopyable&);
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
class BlynkSingleton
|
|
||||||
: public BlynkNonCopyable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
/** @brief Returns the instance of the singleton type
|
|
||||||
When called for the first time, the singleton instance will be
|
|
||||||
created. All subsequent calls will return a reference to the
|
|
||||||
previously created instance.
|
|
||||||
@return The singleton instance
|
|
||||||
*/
|
|
||||||
static T* instance()
|
|
||||||
{
|
|
||||||
static T instance;
|
|
||||||
return &instance;
|
|
||||||
}
|
|
||||||
protected:
|
|
||||||
BlynkSingleton() {}
|
|
||||||
~BlynkSingleton() {}
|
|
||||||
};
|
|
||||||
|
|
@ -1,291 +0,0 @@
|
|||||||
/*
|
|
||||||
* SimpleTimer.cpp
|
|
||||||
*
|
|
||||||
* SimpleTimer - A timer library for Arduino.
|
|
||||||
* Author: mromani@ottotecnica.com
|
|
||||||
* Copyright (c) 2010 OTTOTECNICA Italy
|
|
||||||
*
|
|
||||||
* Callback function parameters added & compiler warnings
|
|
||||||
* removed by Bill Knight <billk@rosw.com> 20March2017
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser
|
|
||||||
* General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2.1 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will
|
|
||||||
* be useful, but WITHOUT ANY WARRANTY; without even the
|
|
||||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
||||||
* License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser
|
|
||||||
* General Public License along with this library; if not,
|
|
||||||
* write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "BlynkTimer.h"
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
// Select time function:
|
|
||||||
//static inline unsigned long elapsed() { return micros(); }
|
|
||||||
static inline unsigned long elapsed() { return BlynkMillis(); }
|
|
||||||
|
|
||||||
|
|
||||||
SimpleTimer::SimpleTimer()
|
|
||||||
: numTimers (-1)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleTimer::init() {
|
|
||||||
unsigned long current_millis = elapsed();
|
|
||||||
|
|
||||||
for (int i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
memset(&timer[i], 0, sizeof (timer_t));
|
|
||||||
timer[i].prev_millis = current_millis;
|
|
||||||
}
|
|
||||||
|
|
||||||
numTimers = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SimpleTimer::run() {
|
|
||||||
int i;
|
|
||||||
unsigned long current_millis;
|
|
||||||
|
|
||||||
// get current time
|
|
||||||
current_millis = elapsed();
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
|
|
||||||
timer[i].toBeCalled = DEFCALL_DONTRUN;
|
|
||||||
|
|
||||||
// no callback == no timer, i.e. jump over empty slots
|
|
||||||
if (timer[i].callback != NULL) {
|
|
||||||
|
|
||||||
// is it time to process this timer ?
|
|
||||||
// see http://arduino.cc/forum/index.php/topic,124048.msg932592.html#msg932592
|
|
||||||
|
|
||||||
if ((current_millis - timer[i].prev_millis) >= timer[i].delay) {
|
|
||||||
|
|
||||||
unsigned long skipTimes = (current_millis - timer[i].prev_millis) / timer[i].delay;
|
|
||||||
// update time
|
|
||||||
timer[i].prev_millis += timer[i].delay * skipTimes;
|
|
||||||
|
|
||||||
// check if the timer callback has to be executed
|
|
||||||
if (timer[i].enabled) {
|
|
||||||
|
|
||||||
// "run forever" timers must always be executed
|
|
||||||
if (timer[i].maxNumRuns == RUN_FOREVER) {
|
|
||||||
timer[i].toBeCalled = DEFCALL_RUNONLY;
|
|
||||||
}
|
|
||||||
// other timers get executed the specified number of times
|
|
||||||
else if (timer[i].numRuns < timer[i].maxNumRuns) {
|
|
||||||
timer[i].toBeCalled = DEFCALL_RUNONLY;
|
|
||||||
timer[i].numRuns++;
|
|
||||||
|
|
||||||
// after the last run, delete the timer
|
|
||||||
if (timer[i].numRuns >= timer[i].maxNumRuns) {
|
|
||||||
timer[i].toBeCalled = DEFCALL_RUNANDDEL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
if (timer[i].toBeCalled == DEFCALL_DONTRUN)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (timer[i].hasParam)
|
|
||||||
(*(timer_callback_p)timer[i].callback)(timer[i].param);
|
|
||||||
else
|
|
||||||
(*(timer_callback)timer[i].callback)();
|
|
||||||
|
|
||||||
if (timer[i].toBeCalled == DEFCALL_RUNANDDEL)
|
|
||||||
deleteTimer(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// find the first available slot
|
|
||||||
// return -1 if none found
|
|
||||||
int SimpleTimer::findFirstFreeSlot() {
|
|
||||||
// all slots are used
|
|
||||||
if (numTimers >= MAX_TIMERS) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return the first slot with no callback (i.e. free)
|
|
||||||
for (int i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
if (timer[i].callback == NULL) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// no free slots found
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int SimpleTimer::setupTimer(unsigned long d, void* f, void* p, bool h, unsigned n) {
|
|
||||||
int freeTimer;
|
|
||||||
|
|
||||||
if (numTimers < 0) {
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
freeTimer = findFirstFreeSlot();
|
|
||||||
if (freeTimer < 0) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (f == NULL) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
timer[freeTimer].delay = d;
|
|
||||||
timer[freeTimer].callback = f;
|
|
||||||
timer[freeTimer].param = p;
|
|
||||||
timer[freeTimer].hasParam = h;
|
|
||||||
timer[freeTimer].maxNumRuns = n;
|
|
||||||
timer[freeTimer].enabled = true;
|
|
||||||
timer[freeTimer].prev_millis = elapsed();
|
|
||||||
|
|
||||||
numTimers++;
|
|
||||||
|
|
||||||
return freeTimer;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int SimpleTimer::setTimer(unsigned long d, timer_callback f, unsigned n) {
|
|
||||||
return setupTimer(d, (void *)f, NULL, false, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
int SimpleTimer::setTimer(unsigned long d, timer_callback_p f, void* p, unsigned n) {
|
|
||||||
return setupTimer(d, (void *)f, p, true, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
int SimpleTimer::setInterval(unsigned long d, timer_callback f) {
|
|
||||||
return setupTimer(d, (void *)f, NULL, false, RUN_FOREVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
int SimpleTimer::setInterval(unsigned long d, timer_callback_p f, void* p) {
|
|
||||||
return setupTimer(d, (void *)f, p, true, RUN_FOREVER);
|
|
||||||
}
|
|
||||||
|
|
||||||
int SimpleTimer::setTimeout(unsigned long d, timer_callback f) {
|
|
||||||
return setupTimer(d, (void *)f, NULL, false, RUN_ONCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int SimpleTimer::setTimeout(unsigned long d, timer_callback_p f, void* p) {
|
|
||||||
return setupTimer(d, (void *)f, p, true, RUN_ONCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SimpleTimer::changeInterval(unsigned numTimer, unsigned long d) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Updates interval of existing specified timer
|
|
||||||
if (timer[numTimer].callback != NULL) {
|
|
||||||
timer[numTimer].delay = d;
|
|
||||||
timer[numTimer].prev_millis = elapsed();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// false return for non-used numTimer, no callback
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleTimer::deleteTimer(unsigned timerId) {
|
|
||||||
if (timerId >= MAX_TIMERS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// nothing to delete if no timers are in use
|
|
||||||
if (numTimers == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// don't decrease the number of timers if the
|
|
||||||
// specified slot is already empty
|
|
||||||
if (timer[timerId].callback != NULL) {
|
|
||||||
memset(&timer[timerId], 0, sizeof (timer_t));
|
|
||||||
timer[timerId].prev_millis = elapsed();
|
|
||||||
|
|
||||||
// update number of timers
|
|
||||||
numTimers--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// function contributed by code@rowansimms.com
|
|
||||||
void SimpleTimer::restartTimer(unsigned numTimer) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timer[numTimer].prev_millis = elapsed();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SimpleTimer::isEnabled(unsigned numTimer) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return timer[numTimer].enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SimpleTimer::enable(unsigned numTimer) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timer[numTimer].enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SimpleTimer::disable(unsigned numTimer) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timer[numTimer].enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleTimer::enableAll() {
|
|
||||||
// Enable all timers with a callback assigned (used)
|
|
||||||
for (int i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
if (timer[i].callback != NULL && timer[i].numRuns == RUN_FOREVER) {
|
|
||||||
timer[i].enabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleTimer::disableAll() {
|
|
||||||
// Disable all timers with a callback assigned (used)
|
|
||||||
for (int i = 0; i < MAX_TIMERS; i++) {
|
|
||||||
if (timer[i].callback != NULL && timer[i].numRuns == RUN_FOREVER) {
|
|
||||||
timer[i].enabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SimpleTimer::toggle(unsigned numTimer) {
|
|
||||||
if (numTimer >= MAX_TIMERS) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
timer[numTimer].enabled = !timer[numTimer].enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
unsigned SimpleTimer::getNumTimers() {
|
|
||||||
return numTimers;
|
|
||||||
}
|
|
@ -1,155 +0,0 @@
|
|||||||
/*
|
|
||||||
* SimpleTimer.h
|
|
||||||
*
|
|
||||||
* SimpleTimer - A timer library for Arduino.
|
|
||||||
* Author: mromani@ottotecnica.com
|
|
||||||
* Copyright (c) 2010 OTTOTECNICA Italy
|
|
||||||
*
|
|
||||||
* Modifications by Bill Knight <billk@rosw.com> 18March2017
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser
|
|
||||||
* General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2.1 of the License, or (at
|
|
||||||
* your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will
|
|
||||||
* be useful, but WITHOUT ANY WARRANTY; without even the
|
|
||||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
||||||
* License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser
|
|
||||||
* General Public License along with this library; if not,
|
|
||||||
* write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BLYNKTIMER_H
|
|
||||||
#define BLYNKTIMER_H
|
|
||||||
|
|
||||||
#include "BlynkDebug.h"
|
|
||||||
|
|
||||||
// Replace SimpleTimer
|
|
||||||
#define SIMPLETIMER_H
|
|
||||||
#define SimpleTimer BlynkTimer
|
|
||||||
|
|
||||||
typedef void (*timer_callback)(void);
|
|
||||||
typedef void (*timer_callback_p)(void *);
|
|
||||||
|
|
||||||
class SimpleTimer {
|
|
||||||
|
|
||||||
public:
|
|
||||||
// maximum number of timers
|
|
||||||
const static int MAX_TIMERS = 16;
|
|
||||||
|
|
||||||
// setTimer() constants
|
|
||||||
const static int RUN_FOREVER = 0;
|
|
||||||
const static int RUN_ONCE = 1;
|
|
||||||
|
|
||||||
// constructor
|
|
||||||
SimpleTimer();
|
|
||||||
|
|
||||||
void init();
|
|
||||||
|
|
||||||
// this function must be called inside loop()
|
|
||||||
void run();
|
|
||||||
|
|
||||||
// Timer will call function 'f' every 'd' milliseconds forever
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setInterval(unsigned long d, timer_callback f);
|
|
||||||
|
|
||||||
// Timer will call function 'f' with parameter 'p' every 'd' milliseconds forever
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setInterval(unsigned long d, timer_callback_p f, void* p);
|
|
||||||
|
|
||||||
// Timer will call function 'f' after 'd' milliseconds one time
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setTimeout(unsigned long d, timer_callback f);
|
|
||||||
|
|
||||||
// Timer will call function 'f' with parameter 'p' after 'd' milliseconds one time
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setTimeout(unsigned long d, timer_callback_p f, void* p);
|
|
||||||
|
|
||||||
// Timer will call function 'f' every 'd' milliseconds 'n' times
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setTimer(unsigned long d, timer_callback f, unsigned n);
|
|
||||||
|
|
||||||
// Timer will call function 'f' with parameter 'p' every 'd' milliseconds 'n' times
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setTimer(unsigned long d, timer_callback_p f, void* p, unsigned n);
|
|
||||||
|
|
||||||
// updates interval of the specified timer
|
|
||||||
bool changeInterval(unsigned numTimer, unsigned long d);
|
|
||||||
|
|
||||||
// destroy the specified timer
|
|
||||||
void deleteTimer(unsigned numTimer);
|
|
||||||
|
|
||||||
// restart the specified timer
|
|
||||||
void restartTimer(unsigned numTimer);
|
|
||||||
|
|
||||||
// returns true if the specified timer is enabled
|
|
||||||
bool isEnabled(unsigned numTimer);
|
|
||||||
|
|
||||||
// enables the specified timer
|
|
||||||
void enable(unsigned numTimer);
|
|
||||||
|
|
||||||
// disables the specified timer
|
|
||||||
void disable(unsigned numTimer);
|
|
||||||
|
|
||||||
// enables all timers
|
|
||||||
void enableAll();
|
|
||||||
|
|
||||||
// disables all timers
|
|
||||||
void disableAll();
|
|
||||||
|
|
||||||
// enables the specified timer if it's currently disabled,
|
|
||||||
// and vice-versa
|
|
||||||
void toggle(unsigned numTimer);
|
|
||||||
|
|
||||||
// returns the number of used timers
|
|
||||||
unsigned getNumTimers();
|
|
||||||
|
|
||||||
// returns the number of available timers
|
|
||||||
unsigned getNumAvailableTimers() { return MAX_TIMERS - numTimers; };
|
|
||||||
|
|
||||||
private:
|
|
||||||
// deferred call constants
|
|
||||||
const static int DEFCALL_DONTRUN = 0; // don't call the callback function
|
|
||||||
const static int DEFCALL_RUNONLY = 1; // call the callback function but don't delete the timer
|
|
||||||
const static int DEFCALL_RUNANDDEL = 2; // call the callback function and delete the timer
|
|
||||||
|
|
||||||
// low level function to initialize and enable a new timer
|
|
||||||
// returns the timer number (numTimer) on success or
|
|
||||||
// -1 on failure (f == NULL) or no free timers
|
|
||||||
int setupTimer(unsigned long d, void* f, void* p, bool h, unsigned n);
|
|
||||||
|
|
||||||
// find the first available slot
|
|
||||||
int findFirstFreeSlot();
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned long prev_millis; // value returned by the millis() function in the previous run() call
|
|
||||||
void* callback; // pointer to the callback function
|
|
||||||
void* param; // function parameter
|
|
||||||
bool hasParam; // true if callback takes a parameter
|
|
||||||
unsigned long delay; // delay value
|
|
||||||
unsigned maxNumRuns; // number of runs to be executed
|
|
||||||
unsigned numRuns; // number of executed runs
|
|
||||||
bool enabled; // true if enabled
|
|
||||||
unsigned toBeCalled; // deferred function call (sort of) - N.B.: only used in run()
|
|
||||||
} timer_t;
|
|
||||||
|
|
||||||
timer_t timer[MAX_TIMERS];
|
|
||||||
|
|
||||||
// actual number of timers in use (-1 means uninitialized)
|
|
||||||
int numTimers;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,64 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkUtility.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jun 2015
|
|
||||||
* @brief Utility functions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkUtility_h
|
|
||||||
#define BlynkUtility_h
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
const T& BlynkMin(const T& a, const T& b)
|
|
||||||
{
|
|
||||||
return (b < a) ? b : a;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
const T& BlynkMax(const T& a, const T& b)
|
|
||||||
{
|
|
||||||
return (b < a) ? a : b;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
T BlynkMathMap(T x, T in_min, T in_max, T out_min, T out_max)
|
|
||||||
{
|
|
||||||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
T BlynkMathClamp(T val, T low, T high)
|
|
||||||
{
|
|
||||||
return (val < low) ? low : ((val > high) ? high : val);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <unsigned WSIZE, typename T>
|
|
||||||
void BlynkAverageSample (T& avg, const T& input) {
|
|
||||||
avg -= avg/WSIZE;
|
|
||||||
const T add = input/WSIZE;
|
|
||||||
// Fix for shorter delays
|
|
||||||
if (add > 0)
|
|
||||||
avg += add;
|
|
||||||
else
|
|
||||||
avg -= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
class BlynkHelperAutoInc {
|
|
||||||
public:
|
|
||||||
BlynkHelperAutoInc(uint8_t& counter) : c(counter) { ++c; }
|
|
||||||
~BlynkHelperAutoInc() { --c; }
|
|
||||||
private:
|
|
||||||
uint8_t& c;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BlynkBitSet(value, bit) ((value) |= (1UL << (bit)))
|
|
||||||
#define BlynkBitClear(value, bit) ((value) &= ~(1UL << (bit)))
|
|
||||||
#define BlynkBitRead(value, bit) (((value) >> (bit)) & 0x01)
|
|
||||||
#define BlynkBitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,102 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkWiFiCommon.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Jan 2015
|
|
||||||
* @brief
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkWiFiCommon_h
|
|
||||||
#define BlynkWiFiCommon_h
|
|
||||||
|
|
||||||
#ifndef BLYNK_INFO_CONNECTION
|
|
||||||
#define BLYNK_INFO_CONNECTION "WiFi"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "BlynkApiArduino.h"
|
|
||||||
#include "BlynkProtocol.h"
|
|
||||||
#include "BlynkArduinoClient.h"
|
|
||||||
|
|
||||||
class BlynkWifiCommon
|
|
||||||
: public BlynkProtocol<BlynkArduinoClient>
|
|
||||||
{
|
|
||||||
typedef BlynkProtocol<BlynkArduinoClient> Base;
|
|
||||||
public:
|
|
||||||
BlynkWifiCommon(BlynkArduinoClient& transp)
|
|
||||||
: Base(transp)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void connectWiFi(const char* ssid, const char* pass)
|
|
||||||
{
|
|
||||||
int status = WL_IDLE_STATUS;
|
|
||||||
// check for the presence of the shield:
|
|
||||||
if (WiFi.status() == WL_NO_SHIELD) {
|
|
||||||
BLYNK_FATAL("WiFi shield not present");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef BLYNK_DEBUG
|
|
||||||
BLYNK_LOG2(BLYNK_F("WiFi firmware: "), WiFi.firmwareVersion());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// attempt to connect to Wifi network:
|
|
||||||
while (true) {
|
|
||||||
BLYNK_LOG2(BLYNK_F("Connecting to "), ssid);
|
|
||||||
if (pass && strlen(pass)) {
|
|
||||||
status = WiFi.begin((char*)ssid, (char*)pass);
|
|
||||||
} else {
|
|
||||||
status = WiFi.begin((char*)ssid);
|
|
||||||
}
|
|
||||||
if (status == WL_CONNECTED) {
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
BlynkDelay(5000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IPAddress myip = WiFi.localIP();
|
|
||||||
BLYNK_LOG_IP("IP: ", myip);
|
|
||||||
}
|
|
||||||
|
|
||||||
void config(const char* auth,
|
|
||||||
const char* domain = BLYNK_DEFAULT_DOMAIN,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
Base::begin(auth);
|
|
||||||
this->conn.begin(domain, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void config(const char* auth,
|
|
||||||
IPAddress ip,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
Base::begin(auth);
|
|
||||||
this->conn.begin(ip, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(const char* auth,
|
|
||||||
const char* ssid,
|
|
||||||
const char* pass,
|
|
||||||
const char* domain = BLYNK_DEFAULT_DOMAIN,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
connectWiFi(ssid, pass);
|
|
||||||
config(auth, domain, port);
|
|
||||||
while(this->connect() != true) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(const char* auth,
|
|
||||||
const char* ssid,
|
|
||||||
const char* pass,
|
|
||||||
IPAddress ip,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
connectWiFi(ssid, pass);
|
|
||||||
config(auth, ip, port);
|
|
||||||
while(this->connect() != true) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,62 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkWidgetBase.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2016 Volodymyr Shymanskyy
|
|
||||||
* @date Nov 2016
|
|
||||||
* @brief
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkWidgetBase_h
|
|
||||||
#define BlynkWidgetBase_h
|
|
||||||
|
|
||||||
#include "BlynkApi.h"
|
|
||||||
|
|
||||||
class BlynkWidgetBase
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
BlynkWidgetBase(uint8_t vPin) : mPin(vPin) {}
|
|
||||||
void setVPin(uint8_t vPin) { mPin = vPin; }
|
|
||||||
|
|
||||||
void onWrite(BlynkReq BLYNK_UNUSED &request, const BlynkParam BLYNK_UNUSED ¶m) {
|
|
||||||
BLYNK_LOG1(BLYNK_F("BlynkWidgetBase::onWrite should not be called"));
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
void setLabel(Args... args) {
|
|
||||||
Blynk.setProperty(mPin, "label", args...);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
void setColor(Args... args) {
|
|
||||||
Blynk.setProperty(mPin, "color", args...);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
void setMin(Args... args) {
|
|
||||||
Blynk.setProperty(mPin, "min", args...);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
void setMax(Args... args) {
|
|
||||||
Blynk.setProperty(mPin, "max", args...);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
uint8_t mPin;
|
|
||||||
};
|
|
||||||
|
|
||||||
class BlynkAttachWidgetHelper {
|
|
||||||
public:
|
|
||||||
template<typename T>
|
|
||||||
explicit BlynkAttachWidgetHelper(T& widget, uint8_t vPin) {
|
|
||||||
widget.setVPin(vPin);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Could use __attribute__ ((constructor)), but hope for better portability
|
|
||||||
#define BLYNK_ATTACH_WIDGET(widget, pin) \
|
|
||||||
BlynkAttachWidgetHelper BLYNK_CONCAT2(blnk_widget_helper_, __COUNTER__)((widget), (pin)); \
|
|
||||||
BLYNK_WRITE(pin) { (widget).onWrite(request, param); }
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,198 +0,0 @@
|
|||||||
#include "BlynkDebug.h"
|
|
||||||
#include "BlynkDateTime.h"
|
|
||||||
|
|
||||||
#if !defined(BLYNK_NO_FLOAT) && defined(BLYNK_USE_INTERNAL_DTOSTRF)
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
char* dtostrf_internal(double number, signed char BLYNK_UNUSED width, unsigned char prec, char *s) {
|
|
||||||
if(isnan(number)) {
|
|
||||||
strcpy(s, "nan");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
if(isinf(number)) {
|
|
||||||
strcpy(s, "inf");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(number > 4294967040.0 || number < -4294967040.0) {
|
|
||||||
strcpy(s, "ovf");
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
char* out = s;
|
|
||||||
// Handle negative numbers
|
|
||||||
if(number < 0.0) {
|
|
||||||
*out = '-';
|
|
||||||
++out;
|
|
||||||
number = -number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
|
||||||
double rounding = 0.5;
|
|
||||||
for(uint8_t i = 0; i < prec; ++i) {
|
|
||||||
rounding /= 10.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
number += rounding;
|
|
||||||
|
|
||||||
// Extract the integer part of the number and print it
|
|
||||||
unsigned long int_part = (unsigned long) number;
|
|
||||||
double remainder = number - (double) int_part;
|
|
||||||
out += sprintf(out, "%lu", int_part);
|
|
||||||
|
|
||||||
// Print the decimal point, but only if there are digits beyond
|
|
||||||
if(prec > 0) {
|
|
||||||
*out = '.';
|
|
||||||
++out;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(prec-- > 0) {
|
|
||||||
remainder *= 10.0;
|
|
||||||
if((int)remainder == 0) {
|
|
||||||
*out = '0';
|
|
||||||
++out;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sprintf(out, "%d", (int) remainder);
|
|
||||||
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define YEAR_0 1900
|
|
||||||
#define YEAR_EPOCH 1970
|
|
||||||
#define SECS_IN_DAY (24L * 60L * 60L)
|
|
||||||
#define IS_LEAP_YEAR(year) (!((year) % 4) && (((year) % 100) || !((year) % 400)))
|
|
||||||
#define YEAR_DAYS(year) (IS_LEAP_YEAR(year) ? 366 : 365)
|
|
||||||
|
|
||||||
#define TIME_MAX 2147483647L
|
|
||||||
|
|
||||||
static const int month_tab[2][12] = {
|
|
||||||
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
|
|
||||||
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct blynk_tm* blynk_gmtime_r(const blynk_time_t* t, struct blynk_tm *tm) {
|
|
||||||
blynk_time_t time = *t;
|
|
||||||
unsigned long dayclock, dayno;
|
|
||||||
int year = YEAR_EPOCH;
|
|
||||||
|
|
||||||
dayclock = (unsigned long) time % SECS_IN_DAY;
|
|
||||||
dayno = (unsigned long) time / SECS_IN_DAY;
|
|
||||||
|
|
||||||
tm->tm_sec = dayclock % 60;
|
|
||||||
tm->tm_min = (dayclock % 3600) / 60;
|
|
||||||
tm->tm_hour = dayclock / 3600;
|
|
||||||
tm->tm_wday = (dayno + 4) % 7;
|
|
||||||
while (dayno >= (unsigned long) YEAR_DAYS(year)) {
|
|
||||||
dayno -= YEAR_DAYS(year);
|
|
||||||
year++;
|
|
||||||
}
|
|
||||||
tm->tm_year = year - YEAR_0;
|
|
||||||
tm->tm_yday = dayno;
|
|
||||||
tm->tm_mon = 0;
|
|
||||||
while (dayno >= (unsigned long) month_tab[IS_LEAP_YEAR(year)][tm->tm_mon]) {
|
|
||||||
dayno -= month_tab[IS_LEAP_YEAR(year)][tm->tm_mon];
|
|
||||||
tm->tm_mon++;
|
|
||||||
}
|
|
||||||
tm->tm_mday = dayno + 1;
|
|
||||||
tm->tm_isdst = 0;
|
|
||||||
return tm;
|
|
||||||
}
|
|
||||||
|
|
||||||
blynk_time_t blynk_mk_gmtime(struct blynk_tm *tm) {
|
|
||||||
long day, year;
|
|
||||||
int tm_year;
|
|
||||||
int yday, month;
|
|
||||||
long seconds;
|
|
||||||
int overflow;
|
|
||||||
|
|
||||||
tm->tm_min += tm->tm_sec / 60;
|
|
||||||
tm->tm_sec %= 60;
|
|
||||||
if (tm->tm_sec < 0) {
|
|
||||||
tm->tm_sec += 60;
|
|
||||||
tm->tm_min--;
|
|
||||||
}
|
|
||||||
tm->tm_hour += tm->tm_min / 60;
|
|
||||||
tm->tm_min = tm->tm_min % 60;
|
|
||||||
if (tm->tm_min < 0) {
|
|
||||||
tm->tm_min += 60;
|
|
||||||
tm->tm_hour--;
|
|
||||||
}
|
|
||||||
day = tm->tm_hour / 24;
|
|
||||||
tm->tm_hour = tm->tm_hour % 24;
|
|
||||||
if (tm->tm_hour < 0) {
|
|
||||||
tm->tm_hour += 24;
|
|
||||||
day--;
|
|
||||||
}
|
|
||||||
tm->tm_year += tm->tm_mon / 12;
|
|
||||||
tm->tm_mon %= 12;
|
|
||||||
if (tm->tm_mon < 0) {
|
|
||||||
tm->tm_mon += 12;
|
|
||||||
tm->tm_year--;
|
|
||||||
}
|
|
||||||
day += (tm->tm_mday - 1);
|
|
||||||
while (day < 0) {
|
|
||||||
if (--tm->tm_mon < 0) {
|
|
||||||
tm->tm_year--;
|
|
||||||
tm->tm_mon = 11;
|
|
||||||
}
|
|
||||||
day += month_tab[IS_LEAP_YEAR(YEAR_0 + tm->tm_year)][tm->tm_mon];
|
|
||||||
}
|
|
||||||
while (day >= month_tab[IS_LEAP_YEAR(YEAR_0 + tm->tm_year)][tm->tm_mon]) {
|
|
||||||
day -= month_tab[IS_LEAP_YEAR(YEAR_0 + tm->tm_year)][tm->tm_mon];
|
|
||||||
if (++(tm->tm_mon) == 12) {
|
|
||||||
tm->tm_mon = 0;
|
|
||||||
tm->tm_year++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tm->tm_mday = day + 1;
|
|
||||||
year = YEAR_EPOCH;
|
|
||||||
if (tm->tm_year < year - YEAR_0)
|
|
||||||
return (blynk_time_t) -1;
|
|
||||||
seconds = 0;
|
|
||||||
day = 0;
|
|
||||||
overflow = 0;
|
|
||||||
|
|
||||||
tm_year = tm->tm_year + YEAR_0;
|
|
||||||
|
|
||||||
if (TIME_MAX / 365 < tm_year - year)
|
|
||||||
overflow++;
|
|
||||||
day = (tm_year - year) * 365;
|
|
||||||
if (TIME_MAX - day < (tm_year - year) / 4 + 1)
|
|
||||||
overflow++;
|
|
||||||
day += (tm_year - year) / 4 + ((tm_year % 4) && tm_year % 4 < year % 4);
|
|
||||||
day -= (tm_year - year) / 100
|
|
||||||
+ ((tm_year % 100) && tm_year % 100 < year % 100);
|
|
||||||
day += (tm_year - year) / 400
|
|
||||||
+ ((tm_year % 400) && tm_year % 400 < year % 400);
|
|
||||||
|
|
||||||
yday = month = 0;
|
|
||||||
while (month < tm->tm_mon) {
|
|
||||||
yday += month_tab[IS_LEAP_YEAR(tm_year)][month];
|
|
||||||
month++;
|
|
||||||
}
|
|
||||||
yday += (tm->tm_mday - 1);
|
|
||||||
if (day + yday < 0)
|
|
||||||
overflow++;
|
|
||||||
day += yday;
|
|
||||||
|
|
||||||
tm->tm_yday = yday;
|
|
||||||
tm->tm_wday = (day + 4) % 7;
|
|
||||||
|
|
||||||
seconds = ((tm->tm_hour * 60L) + tm->tm_min) * 60L + tm->tm_sec;
|
|
||||||
|
|
||||||
if ((TIME_MAX - seconds) / SECS_IN_DAY < day)
|
|
||||||
overflow++;
|
|
||||||
seconds += day * SECS_IN_DAY;
|
|
||||||
|
|
||||||
if (overflow)
|
|
||||||
return (blynk_time_t) -1;
|
|
||||||
|
|
||||||
if ((blynk_time_t) seconds != seconds)
|
|
||||||
return (blynk_time_t) -1;
|
|
||||||
return (blynk_time_t) seconds;
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
#include "BlynkSimpleEsp.h"
|
|
||||||
|
|
||||||
WiFiClient _blynkWifiClient;
|
|
||||||
BlynkArduinoClient _blynkTransport(_blynkWifiClient);
|
|
||||||
BlynkWifi Blynk(_blynkTransport);
|
|
@ -1,93 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file BlynkSimpleEsp32.h
|
|
||||||
* @author Volodymyr Shymanskyy
|
|
||||||
* @license This project is released under the MIT License (MIT)
|
|
||||||
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
* @date Oct 2016
|
|
||||||
* @brief
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BlynkSimpleEsp_h
|
|
||||||
#define BlynkSimpleEsp_h
|
|
||||||
|
|
||||||
#define BLYNK_SEND_ATOMIC
|
|
||||||
|
|
||||||
#include "Blynk/BlynkApiArduino.h"
|
|
||||||
#include "Blynk/BlynkProtocol.h"
|
|
||||||
#include "Blynk/BlynkArduinoClient.h"
|
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
|
||||||
#include <WiFi.h>
|
|
||||||
#else
|
|
||||||
#include <ESP8266WiFi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class BlynkWifi
|
|
||||||
: public BlynkProtocol<BlynkArduinoClient>
|
|
||||||
{
|
|
||||||
typedef BlynkProtocol<BlynkArduinoClient> Base;
|
|
||||||
public:
|
|
||||||
BlynkWifi(BlynkArduinoClient& transp)
|
|
||||||
: Base(transp)
|
|
||||||
{}
|
|
||||||
|
|
||||||
void connectWiFi(const char* ssid, const char* pass)
|
|
||||||
{
|
|
||||||
BLYNK_LOG2(BLYNK_F("Connecting to "), ssid);
|
|
||||||
WiFi.mode(WIFI_STA);
|
|
||||||
if (pass && strlen(pass)) {
|
|
||||||
WiFi.begin(ssid, pass);
|
|
||||||
} else {
|
|
||||||
WiFi.begin(ssid);
|
|
||||||
}
|
|
||||||
while (WiFi.status() != WL_CONNECTED) {
|
|
||||||
BlynkDelay(500);
|
|
||||||
}
|
|
||||||
BLYNK_LOG1(BLYNK_F("Connected to WiFi"));
|
|
||||||
|
|
||||||
BLYNK_LOG_IP("IP: ", WiFi.localIP());
|
|
||||||
}
|
|
||||||
|
|
||||||
void config(const char* auth,
|
|
||||||
const char* domain = BLYNK_DEFAULT_DOMAIN,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
Base::begin(auth);
|
|
||||||
this->conn.begin(domain, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void config(const char* auth,
|
|
||||||
IPAddress ip,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
Base::begin(auth);
|
|
||||||
this->conn.begin(ip, port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(const char* auth,
|
|
||||||
const char* ssid,
|
|
||||||
const char* pass,
|
|
||||||
const char* domain = BLYNK_DEFAULT_DOMAIN,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
connectWiFi(ssid, pass);
|
|
||||||
config(auth, domain, port);
|
|
||||||
while(this->connect() != true) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
void begin(const char* auth,
|
|
||||||
const char* ssid,
|
|
||||||
const char* pass,
|
|
||||||
IPAddress ip,
|
|
||||||
uint16_t port = BLYNK_DEFAULT_PORT)
|
|
||||||
{
|
|
||||||
connectWiFi(ssid, pass);
|
|
||||||
config(auth, ip, port);
|
|
||||||
while(this->connect() != true) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
extern BlynkWifi Blynk;
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015 Volodymyr Shymanskyy
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
@ -23,7 +23,6 @@ void notify(byte callMode, bool followUp)
|
|||||||
case CALL_MODE_NIGHTLIGHT: if (!notifyDirect) return; break;
|
case CALL_MODE_NIGHTLIGHT: if (!notifyDirect) return; break;
|
||||||
case CALL_MODE_HUE: if (!notifyHue) return; break;
|
case CALL_MODE_HUE: if (!notifyHue) return; break;
|
||||||
case CALL_MODE_PRESET_CYCLE: if (!notifyDirect) return; break;
|
case CALL_MODE_PRESET_CYCLE: if (!notifyDirect) return; break;
|
||||||
case CALL_MODE_BLYNK: if (!notifyDirect) return; break;
|
|
||||||
case CALL_MODE_ALEXA: if (!notifyAlexa) return; break;
|
case CALL_MODE_ALEXA: if (!notifyAlexa) return; break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
|
@ -100,11 +100,6 @@ void WLED::loop()
|
|||||||
yield();
|
yield();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
handleBlynk();
|
|
||||||
yield();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
handlePresets();
|
handlePresets();
|
||||||
yield();
|
yield();
|
||||||
|
|
||||||
@ -718,9 +713,6 @@ void WLED::initInterfaces()
|
|||||||
if (ntpEnabled)
|
if (ntpEnabled)
|
||||||
ntpConnected = ntpUdp.begin(ntpLocalPort);
|
ntpConnected = ntpUdp.begin(ntpLocalPort);
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
initBlynk(blynkApiKey, blynkHost, blynkPort);
|
|
||||||
#endif
|
|
||||||
e131.begin(e131Multicast, e131Port, e131Universe, E131_MAX_UNIVERSE_COUNT);
|
e131.begin(e131Multicast, e131Port, e131Universe, E131_MAX_UNIVERSE_COUNT);
|
||||||
ddp.begin(false, DDP_DEFAULT_PORT);
|
ddp.begin(false, DDP_DEFAULT_PORT);
|
||||||
reconnectHue();
|
reconnectHue();
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
// You can choose some of these features to disable:
|
// You can choose some of these features to disable:
|
||||||
//#define WLED_DISABLE_ALEXA // saves 11kb
|
//#define WLED_DISABLE_ALEXA // saves 11kb
|
||||||
//#define WLED_DISABLE_BLYNK // saves 6kb
|
|
||||||
//#define WLED_DISABLE_HUESYNC // saves 4kb
|
//#define WLED_DISABLE_HUESYNC // saves 4kb
|
||||||
//#define WLED_DISABLE_INFRARED // saves 12kb, there is no pin left for this on ESP8266-01
|
//#define WLED_DISABLE_INFRARED // saves 12kb, there is no pin left for this on ESP8266-01
|
||||||
#ifndef WLED_DISABLE_MQTT
|
#ifndef WLED_DISABLE_MQTT
|
||||||
@ -119,9 +118,6 @@
|
|||||||
#include "src/dependencies/espalexa/Espalexa.h"
|
#include "src/dependencies/espalexa/Espalexa.h"
|
||||||
#include "src/dependencies/espalexa/EspalexaDevice.h"
|
#include "src/dependencies/espalexa/EspalexaDevice.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
#include "src/dependencies/blynk/BlynkSimpleEsp.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
@ -378,12 +374,6 @@ WLED_GLOBAL bool alexaEnabled _INIT(false); // enable devi
|
|||||||
WLED_GLOBAL char alexaInvocationName[33] _INIT("Light"); // speech control name of device. Choose something voice-to-text can understand
|
WLED_GLOBAL char alexaInvocationName[33] _INIT("Light"); // speech control name of device. Choose something voice-to-text can understand
|
||||||
WLED_GLOBAL byte alexaNumPresets _INIT(0); // number of presets to expose to Alexa, starting from preset 1, up to 9
|
WLED_GLOBAL byte alexaNumPresets _INIT(0); // number of presets to expose to Alexa, starting from preset 1, up to 9
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
WLED_GLOBAL char blynkApiKey[36] _INIT(""); // Auth token for Blynk server. If empty, no connection will be made
|
|
||||||
WLED_GLOBAL char blynkHost[33] _INIT("blynk-cloud.com"); // Default Blynk host
|
|
||||||
WLED_GLOBAL uint16_t blynkPort _INIT(80); // Default Blynk port
|
|
||||||
#endif
|
|
||||||
|
|
||||||
WLED_GLOBAL uint16_t realtimeTimeoutMs _INIT(2500); // ms timeout of realtime mode before returning to normal mode
|
WLED_GLOBAL uint16_t realtimeTimeoutMs _INIT(2500); // ms timeout of realtime mode before returning to normal mode
|
||||||
WLED_GLOBAL int arlsOffset _INIT(0); // realtime LED offset
|
WLED_GLOBAL int arlsOffset _INIT(0); // realtime LED offset
|
||||||
WLED_GLOBAL bool receiveDirect _INIT(true); // receive UDP realtime
|
WLED_GLOBAL bool receiveDirect _INIT(true); // receive UDP realtime
|
||||||
@ -577,9 +567,6 @@ WLED_GLOBAL byte timerMonth[] _INIT_N(({28,28,28,28,28,28,28,28}));
|
|||||||
WLED_GLOBAL byte timerDay[] _INIT_N(({1,1,1,1,1,1,1,1}));
|
WLED_GLOBAL byte timerDay[] _INIT_N(({1,1,1,1,1,1,1,1}));
|
||||||
WLED_GLOBAL byte timerDayEnd[] _INIT_N(({31,31,31,31,31,31,31,31}));
|
WLED_GLOBAL byte timerDayEnd[] _INIT_N(({31,31,31,31,31,31,31,31}));
|
||||||
|
|
||||||
// blynk
|
|
||||||
WLED_GLOBAL bool blynkEnabled _INIT(false);
|
|
||||||
|
|
||||||
//improv
|
//improv
|
||||||
WLED_GLOBAL byte improvActive _INIT(0); //0: no improv packet received, 1: improv active, 2: provisioning
|
WLED_GLOBAL byte improvActive _INIT(0); //0: no improv packet received, 1: improv active, 2: provisioning
|
||||||
WLED_GLOBAL byte improvError _INIT(0);
|
WLED_GLOBAL byte improvError _INIT(0);
|
||||||
|
@ -339,11 +339,6 @@ void loadSettingsFromEEPROM()
|
|||||||
//custom macro memory (16 slots/ each 64byte)
|
//custom macro memory (16 slots/ each 64byte)
|
||||||
//1024-2047 reserved
|
//1024-2047 reserved
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
readStringFromEEPROM(2220, blynkApiKey, 35);
|
|
||||||
if (strlen(blynkApiKey) < 25) blynkApiKey[0] = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
// DMX (2530 - 2549)2535
|
// DMX (2530 - 2549)2535
|
||||||
DMXChannels = EEPROM.read(2530);
|
DMXChannels = EEPROM.read(2530);
|
||||||
|
@ -522,13 +522,6 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
#ifdef WLED_DISABLE_ALEXA
|
#ifdef WLED_DISABLE_ALEXA
|
||||||
oappend(SET_F("toggle('Alexa');")); // hide Alexa settings
|
oappend(SET_F("toggle('Alexa');")); // hide Alexa settings
|
||||||
#endif
|
#endif
|
||||||
sappends('s',SET_F("BK"),(char*)((blynkEnabled)?SET_F("Hidden"):""));
|
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
|
||||||
sappends('s',SET_F("BH"),blynkHost);
|
|
||||||
sappend('v',SET_F("BP"),blynkPort);
|
|
||||||
#else
|
|
||||||
oappend(SET_F("toggle('Blynk');")); // hide BLYNK settings
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_MQTT
|
#ifdef WLED_ENABLE_MQTT
|
||||||
sappend('c',SET_F("MQ"),mqttEnabled);
|
sappend('c',SET_F("MQ"),mqttEnabled);
|
||||||
|
Loading…
Reference in New Issue
Block a user