mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-01 18:21:39 +02:00
Hinzufügen vom 1,3"
This commit is contained in:
parent
27b3a9cd87
commit
94487641cc
4 changed files with 54 additions and 10 deletions
|
@ -74,7 +74,7 @@ void app::setup() {
|
||||||
mApi.setup(this, mSys, mWeb.getWebSrvPtr(), mConfig);
|
mApi.setup(this, mSys, mWeb.getWebSrvPtr(), mConfig);
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||||
mMonoDisplay.setup(mSys, &mTimestamp);
|
mMonoDisplay.setup(mSys, &mTimestamp);
|
||||||
everySec(std::bind(&MonoDisplayType::tickerSecond, &mMonoDisplay));
|
everySec(std::bind(&MonoDisplayType::tickerSecond, &mMonoDisplay));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,7 @@ typedef PubMqtt<HmSystemType> PubMqttType;
|
||||||
typedef PubSerial<HmSystemType> PubSerialType;
|
typedef PubSerial<HmSystemType> PubSerialType;
|
||||||
|
|
||||||
// PLUGINS
|
// PLUGINS
|
||||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||||
#include "plugins/MonochromeDisplay/MonochromeDisplay.h"
|
#include "plugins/MonochromeDisplay/MonochromeDisplay.h"
|
||||||
typedef MonochromeDisplay<HmSystemType> MonoDisplayType;
|
typedef MonochromeDisplay<HmSystemType> MonoDisplayType;
|
||||||
#endif
|
#endif
|
||||||
|
@ -180,7 +180,7 @@ class app : public IApp, public ah::Scheduler {
|
||||||
#if !defined(AP_ONLY)
|
#if !defined(AP_ONLY)
|
||||||
mMqtt.payloadEventListener(cmd);
|
mMqtt.payloadEventListener(cmd);
|
||||||
#endif
|
#endif
|
||||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||||
mMonoDisplay.payloadEventListener(cmd);
|
mMonoDisplay.payloadEventListener(cmd);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ class app : public IApp, public ah::Scheduler {
|
||||||
uint32_t mSunrise, mSunset;
|
uint32_t mSunrise, mSunset;
|
||||||
|
|
||||||
// plugins
|
// plugins
|
||||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||||
MonoDisplayType mMonoDisplay;
|
MonoDisplayType mMonoDisplay;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,6 +125,24 @@ lib_deps =
|
||||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||||
https://github.com/JChristensen/Timezone
|
https://github.com/JChristensen/Timezone
|
||||||
|
|
||||||
|
[env:esp8266-sh1106]
|
||||||
|
platform = espressif8266
|
||||||
|
board = esp12e
|
||||||
|
board_build.f_cpu = 80000000L
|
||||||
|
build_flags = -D RELEASE -DENA_SH1106
|
||||||
|
monitor_filters =
|
||||||
|
;default ; Remove typical terminal control codes from input
|
||||||
|
time ; Add timestamp with milliseconds for each new line
|
||||||
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/yubox-node-org/ESPAsyncWebServer
|
||||||
|
nrf24/RF24
|
||||||
|
paulstoffregen/Time
|
||||||
|
https://github.com/bertmelis/espMqttClient#v1.3.3
|
||||||
|
bblanchon/ArduinoJson
|
||||||
|
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||||
|
https://github.com/JChristensen/Timezone
|
||||||
|
|
||||||
[env:esp32-wroom32-release]
|
[env:esp32-wroom32-release]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = lolin_d32
|
board = lolin_d32
|
||||||
|
@ -181,3 +199,21 @@ lib_deps =
|
||||||
bblanchon/ArduinoJson
|
bblanchon/ArduinoJson
|
||||||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||||
https://github.com/JChristensen/Timezone
|
https://github.com/JChristensen/Timezone
|
||||||
|
|
||||||
|
[env:esp32-wroom32-sh1106]
|
||||||
|
platform = espressif32
|
||||||
|
board = lolin_d32
|
||||||
|
build_flags = -D RELEASE -std=gnu++14 -DENA_SH1106
|
||||||
|
build_unflags = -std=gnu++11
|
||||||
|
monitor_filters =
|
||||||
|
;default ; Remove typical terminal control codes from input
|
||||||
|
time ; Add timestamp with milliseconds for each new line
|
||||||
|
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||||
|
lib_deps =
|
||||||
|
https://github.com/yubox-node-org/ESPAsyncWebServer
|
||||||
|
nrf24/RF24
|
||||||
|
paulstoffregen/Time
|
||||||
|
https://github.com/bertmelis/espMqttClient#v1.3.3
|
||||||
|
bblanchon/ArduinoJson
|
||||||
|
https://github.com/ThingPulse/esp8266-oled-ssd1306.git
|
||||||
|
https://github.com/JChristensen/Timezone
|
|
@ -1,15 +1,19 @@
|
||||||
#ifndef __MONOCHROME_DISPLAY__
|
#ifndef __MONOCHROME_DISPLAY__
|
||||||
#define __MONOCHROME_DISPLAY__
|
#define __MONOCHROME_DISPLAY__
|
||||||
|
|
||||||
#if defined(ENA_NOKIA) || defined(ENA_SSD1306)
|
#if defined(ENA_NOKIA) || defined(ENA_SSD1306) || defined(ENA_SH1106)
|
||||||
#ifdef ENA_NOKIA
|
#ifdef ENA_NOKIA
|
||||||
#include <U8g2lib.h>
|
#include <U8g2lib.h>
|
||||||
#define DISP_PROGMEM U8X8_PROGMEM
|
#define DISP_PROGMEM U8X8_PROGMEM
|
||||||
#else // ENA_SSD1306
|
#else // ENA_SSD1306 || ENA_SH1106
|
||||||
/* esp8266 : SCL = 5, SDA = 4 */
|
/* esp8266 : SCL = 5, SDA = 4 */
|
||||||
/* ewsp32 : SCL = 22, SDA = 21 */
|
/* ewsp32 : SCL = 22, SDA = 21 */
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
#include <SSD1306Wire.h>
|
#ifdef ENA_SSD1306
|
||||||
|
#include <SSD1306Wire.h>
|
||||||
|
# else //ENA_SH1106
|
||||||
|
#include <SH1106Wire.h>
|
||||||
|
#endif
|
||||||
#define DISP_PROGMEM PROGMEM
|
#define DISP_PROGMEM PROGMEM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -34,7 +38,7 @@ class MonochromeDisplay {
|
||||||
mNewPayload = false;
|
mNewPayload = false;
|
||||||
mExtra = 0;
|
mExtra = 0;
|
||||||
}
|
}
|
||||||
#else // ENA_SSD1306
|
#else // ENA_SSD1306 || ENA_SH1106
|
||||||
MonochromeDisplay() : mDisplay(0x3c, SDA, SCL), mCE(CEST, CET) {
|
MonochromeDisplay() : mDisplay(0x3c, SDA, SCL), mCE(CEST, CET) {
|
||||||
mNewPayload = false;
|
mNewPayload = false;
|
||||||
mExtra = 0;
|
mExtra = 0;
|
||||||
|
@ -215,7 +219,7 @@ class MonochromeDisplay {
|
||||||
mDisplay.sendBuffer();
|
mDisplay.sendBuffer();
|
||||||
} while( mDisplay.nextPage() );
|
} while( mDisplay.nextPage() );
|
||||||
mExtra++;
|
mExtra++;
|
||||||
#else // ENA_SSD1306
|
#else // ENA_SSD1306 || ENA_SH1106
|
||||||
if(mUp) {
|
if(mUp) {
|
||||||
mRx += 2;
|
mRx += 2;
|
||||||
if(mRx >= 20)
|
if(mRx >= 20)
|
||||||
|
@ -289,7 +293,11 @@ class MonochromeDisplay {
|
||||||
#if defined(ENA_NOKIA)
|
#if defined(ENA_NOKIA)
|
||||||
U8G2_PCD8544_84X48_1_4W_HW_SPI mDisplay;
|
U8G2_PCD8544_84X48_1_4W_HW_SPI mDisplay;
|
||||||
#else // ENA_SSD1306
|
#else // ENA_SSD1306
|
||||||
SSD1306Wire mDisplay;
|
#ifdef ENA_SSD1306
|
||||||
|
SSD1306Wire mDisplay;
|
||||||
|
# else //ENA_SH1106
|
||||||
|
SH1106Wire mDisplay;
|
||||||
|
#endif
|
||||||
int mRx;
|
int mRx;
|
||||||
char mUp;
|
char mUp;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue