Fix for ESP8266

This commit is contained in:
fvanroie 2020-05-02 15:19:16 +02:00
parent 11e4d77d9f
commit 0bb0f9875d
3 changed files with 10 additions and 5 deletions

View File

@ -48,7 +48,7 @@
#include "hasp_spiffs.h"
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
//#include "lv_zifont.h"
#include "lv_zifont.h"
#endif
#endif

View File

@ -107,6 +107,7 @@ void gpioSetup()
aceButtonSetup();
//gpioConfig[0] = PD15 * 256 + 5 + (INPUT << 3);
gpioAddButton(D1, INPUT_PULLUP, HIGH, 1);
for(uint8_t i = 0; i < HASP_NUM_GPIO_CONFIG; i++) {
uint8_t pin = (gpioConfig[i] >> 8) & 0xFF;
@ -134,7 +135,7 @@ void gpioSetup()
switch(gpiotype) {
case HASP_GPIO_SWITCH:
case HASP_GPIO_BUTTON:
gpioAddButton(pin, input_mode, default_state, channel);
// gpioAddButton(pin, input_mode, default_state, channel);
break;
case HASP_GPIO_RELAY:

View File

@ -1,6 +1,8 @@
/*********************
* INCLUDES
*********************/
#if HASP_USE_SLAVE>0
#include "hasp_slave.h"
#include <Arduino.h>
#include "ArduinoJson.h"
@ -130,11 +132,11 @@ void TASMO_EVERY_SECOND(void)
{
if (ledstate) {
ledstate = false;
digitalWrite(HASP_OUTPUT_PIN, 1);
//digitalWrite(HASP_OUTPUT_PIN, 1);
// Log.verbose(F("LED OFF"));
} else {
ledstate = true;
digitalWrite(HASP_OUTPUT_PIN, 0);
//digitalWrite(HASP_OUTPUT_PIN, 0);
// Log.verbose(F("LED ON"));
}
}
@ -159,3 +161,5 @@ void slaveLoop(void)
// }
}
#endif