Browse Source

Merge branch 'dev' of github.com:xoseperez/espurna into dev

sensors
Xose Pérez 5 years ago
parent
commit
ac80570170
2 changed files with 10 additions and 4 deletions
  1. +6
    -1
      code/espurna/ota.ino
  2. +4
    -3
      code/espurna/rfbridge.ino

+ 6
- 1
code/espurna/ota.ino View File

@ -28,7 +28,7 @@ void _otaLoop() {
// Terminal OTA
// -----------------------------------------------------------------------------
#if TERMINAL_SUPPORT
#if TERMINAL_SUPPORT || OTA_MQTT_SUPPORT
#include <ESPAsyncTCP.h>
AsyncClient * _ota_client;
@ -186,6 +186,11 @@ void _otaFrom(String url) {
}
#endif // TERMINAL_SUPPORT || OTA_MQTT_SUPPORT
#if TERMINAL_SUPPORT
void _otaInitCommands() {
terminalRegisterCommand(F("OTA"), [](Embedis* e) {


+ 4
- 3
code/espurna/rfbridge.ino View File

@ -152,9 +152,6 @@ void _rfbLearn() {
}
#if not RF_SUPPORT
/*
From an hexa char array ("A220EE...") to a byte array (half the size)
*/
@ -170,6 +167,8 @@ static int _rfbToArray(const char * in, byte * out, int length = RF_MESSAGE_SIZE
return n;
}
#if not RF_SUPPORT
void _rfbSendRaw(const byte *message, const unsigned char n = RF_MESSAGE_SIZE) {
for (unsigned char j=0; j<n; j++) {
Serial.write(message[j]);
@ -556,6 +555,7 @@ void _rfbMqttCallback(unsigned int type, const char * topic, const char * payloa
void _rfbAPISetup() {
#if not RF_SUPPORT
apiRegister(MQTT_TOPIC_RFOUT,
[](char * buffer, size_t len) {
snprintf_P(buffer, len, PSTR("OK"));
@ -564,6 +564,7 @@ void _rfbAPISetup() {
_rfbParseCode((char *) payload);
}
);
#endif // RF_SUPPORT
apiRegister(MQTT_TOPIC_RFLEARN,
[](char * buffer, size_t len) {


Loading…
Cancel
Save