Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Transition styles #3633

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
d431aa4
Show 2D Config button by default
w00000dy Oct 25, 2023
34bed44
Hide 2D Configuration if 2D is not compiled in
w00000dy Oct 25, 2023
96700fe
Fix for udp sync (#3487)
blazoncek Oct 27, 2023
e5f6f8d
Twinklefox & Twinklecat fix
blazoncek Oct 28, 2023
284366e
fixed wrong power supply info
w00000dy Oct 29, 2023
ccc56d4
Merge pull request #3484 from WoodyLetsCode/settings-page
blazoncek Oct 31, 2023
e260b94
Bump build
blazoncek Oct 31, 2023
555d0d3
Npm & version comment
blazoncek Nov 1, 2023
4f5816f
Merge branch '0_14_1' into power-supply
blazoncek Nov 1, 2023
031526b
Correction
blazoncek Nov 1, 2023
fb6271e
Merge pull request #3496 from WoodyLetsCode/power-supply
blazoncek Nov 1, 2023
5b7b34a
Add LDR sensor dusk/dawn preset control Usermod
Nov 2, 2023
1543862
Merge pull request #3490 from JeffWDH/main
blazoncek Nov 2, 2023
9db8d44
Sort presets by ID
blazoncek Nov 4, 2023
7c121b8
Dissolve fix (#3502)
blazoncek Nov 8, 2023
51dfa9a
Implement front-end strategy to prevent caching
Moustachauve Nov 9, 2023
e67a210
Implement back-end strategy to prevent caching
Moustachauve Nov 9, 2023
7238ef4
Fix repeatable action for ir json
marcin20 Nov 13, 2023
c340a1d
Bugfix (#3526)
blazoncek Nov 15, 2023
44726c7
Changelog 0.14.1-b1
blazoncek Nov 16, 2023
eca3fb1
Revert "Implement front-end strategy to prevent caching"
Moustachauve Nov 17, 2023
a83d9a0
Merge pull request #3508 from Moustachauve/fix-settings-cache
blazoncek Nov 17, 2023
1661766
Bugfix (#3533)
blazoncek Nov 18, 2023
76a7f25
Merge pull request #3522 from martinez20m/fix_ir_repeat
blazoncek Nov 18, 2023
75f6a53
Fix (#3522)
blazoncek Nov 18, 2023
1e29d94
validate NTP responses (fixes #3515)
softhack007 Nov 20, 2023
80c67d3
bufix: ntp query when NTP gets enabled from UI
softhack007 Nov 20, 2023
d56cefd
indentation fix
softhack007 Nov 20, 2023
5fb891c
indentation fix2
softhack007 Nov 20, 2023
32e724e
Merge pull request #3536 from Aircoookie/ntp_errorchecking
softhack007 Nov 20, 2023
c3e937f
Fix for #3514
blazoncek Nov 27, 2023
ff82d36
Update readme.md
srg74 Nov 28, 2023
f66b343
Possible fix for #3541
blazoncek Nov 28, 2023
b0d0bb7
Merge pull request #3555 from srg74/patch-1
blazoncek Nov 29, 2023
4873031
Bugfix #3561
blazoncek Dec 1, 2023
7c108e5
Bugfix for SEGENV if defult map1D2D not defined
blazoncek Dec 1, 2023
26ab1bf
[Feat] Adds new esp32s3dev_16MB_PSRAM_opi dev board to work with Lily…
raymondhardy Dec 5, 2023
aeb9e2a
[fix] Removes additional default envs line
raymondhardy Dec 5, 2023
90d696d
fix(esp32c3-2mb): correct flash size for c3 board with only 2MB
drasch Dec 5, 2023
84802d9
[fix] Uses extends as per softhack007 comment
raymondhardy Dec 5, 2023
cb95a7d
Autowhite cleanup
blazoncek Dec 9, 2023
f513cae
code spell checking - part1 (core)
softhack007 Dec 14, 2023
9f79e64
code spell checking - part2 (dependencies)
softhack007 Dec 14, 2023
dbe8554
code spell checking - part3 (usermods)
softhack007 Dec 14, 2023
d6735be
comment clean-up (cosmetic)
softhack007 Dec 14, 2023
082d1ee
oappend robustness improvement
softhack007 Dec 14, 2023
1ec3a74
Manila Time is the same as CST (solves #3517)
softhack007 Dec 14, 2023
a8bd46c
bugfix - unusable pins on pico32 boards (#3573)
softhack007 Dec 14, 2023
6d28de7
npm run build
softhack007 Dec 14, 2023
da488f7
LDR_Dusk_Dawn: use pinManager, check ldrPin before use (quick-fix for…
softhack007 Dec 15, 2023
5c90a74
Fix for #3593
blazoncek Dec 17, 2023
7642c5a
Merge pull request #3529 from Aircoookie/0_14_1
blazoncek Dec 18, 2023
10faaaf
Build bump & changelog
blazoncek Dec 18, 2023
809a294
Fix Pixel Magic button.
blazoncek Dec 22, 2023
1900686
Bump
blazoncek Dec 22, 2023
5ab0121
workaround for #3601
softhack007 Dec 22, 2023
72e864b
sunrise/sunset: fix for ambiguous error value
softhack007 Dec 23, 2023
39e0a1f
Merge pull request #3612 from Aircoookie/sunset-fix
softhack007 Dec 23, 2023
5f62b4a
Fix for #2922
blazoncek Dec 23, 2023
d1b80aa
Beta2
blazoncek Dec 23, 2023
a3a5bff
Update readme.md
srg74 Dec 24, 2023
b743ca8
Merge pull request #3615 from srg74/patch-2
softhack007 Dec 24, 2023
5ebc345
Possible bugfix for #3609 #3616
blazoncek Dec 25, 2023
010c349
Make palette editor mobile friendly.
imeszaros Dec 26, 2023
e95629f
Remote preset cancles playlist
blazoncek Dec 27, 2023
662870b
Changlog update, b2 release
blazoncek Dec 29, 2023
955f6d9
Initial support for transition styles.
tkadauke Dec 30, 2023
2fbaf0f
Use transition styles when colors change
tkadauke Dec 30, 2023
92ff39e
Persist transition style if it's not changed by the API call
tkadauke Dec 30, 2023
e8b3c66
Merge pull request #3617 from imeszaros/cpal-mobile
blazoncek Dec 30, 2023
e5cb240
Fix crash when interrupting transition
tkadauke Jan 1, 2024
2066d26
"Fairy Dust" transitional effect that transitions pixels in random order
tkadauke Jan 1, 2024
aa9e578
Fix pixel indexes in transitions
tkadauke Jan 1, 2024
4f55be4
Bugfix #3632
blazoncek Jan 1, 2024
a48610a
Use transition styles when changing segment brightness
tkadauke Jan 1, 2024
85a6ebd
Add LED buffer for transitions
tkadauke Jan 3, 2024
330e76e
Push transition effects that make use of the buffer
tkadauke Jan 3, 2024
19ef2ee
Fix progress calculation for transitions if segments use grouping or …
tkadauke Jan 3, 2024
4e0f3e3
Update README.md
peterpociask Jan 3, 2024
06911e7
Merge pull request #3642 from peterpociask/patch-1
blazoncek Jan 3, 2024
3baff4e
Merge pull request #3572 from drasch/fix/esp32c3-2mb-flash-size
softhack007 Jan 3, 2024
51b3d7c
Merge pull request #3569 from raymondhardy/ESP32-S3-WROOM-1-N16R8
softhack007 Jan 3, 2024
ae53cc8
Don't use floating point arithmetic for transition styles
tkadauke Jan 5, 2024
cdc8640
Merge pull request #3648 from willmmiles/json-response-locking
blazoncek Jan 6, 2024
fcf190e
Get rid of buffer and calculate transition in setPixelColor
tkadauke Jan 6, 2024
8fb5f0e
Changelog update v0.14.1-b3
blazoncek Jan 6, 2024
9279368
Support transition styles for 2D effects
tkadauke Jan 6, 2024
3e6e25d
Double buffered transitions
tkadauke Jan 7, 2024
b38ea2e
Fix bug that left artifacts behind
tkadauke Jan 7, 2024
65405cf
Make sure that the buffer grows as the segment virtual length changes
tkadauke Jan 7, 2024
88b0c0a
Better random distribution for fairy dust transition style
tkadauke Jan 8, 2024
de44fce
Save pixels to both buffers at the beginning of a transition in order…
tkadauke Jan 8, 2024
0a63443
Fix transition style progress calculation
tkadauke Jan 8, 2024
6bcae63
Swipe/push up/down transition styles
tkadauke Jan 8, 2024
f6c5da0
Take palette changes into account when transitioning
tkadauke Jan 8, 2024
0ef387d
Guard everything behind compile flag
tkadauke Jan 8, 2024
9a334f5
Add JSON path for transition styles
tkadauke Jan 8, 2024
96c8862
Dynamically load transition styles from the UI
tkadauke Jan 8, 2024
9129fc2
Fix build when effect blending is disabled
tkadauke Jan 8, 2024
a220dfb
Merge branch 'main' into main
tkadauke Jan 8, 2024
fff116e
Make sure the build works with 2D disabled
tkadauke Jan 8, 2024
f5f455d
Changes based on review feedback
tkadauke Jan 8, 2024
95a4542
Merge remote-tracking branch 'aircoookie/0_15'
tkadauke Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
## WLED changelog

#### Build 2401060
- Version bump: 0.14.1-b3
- Global JSON buffer guarding (#3648 by @willmmiles, resolves #3641, #3312, #3367, #3637, #3646, #3447)
- Fix for #3632
- Custom palette editor mobile UI enhancement (#3617 by @imeszaros)
- changelog update

#### Build 2312290
- Fix for #3622, #3613, #3609
- Various tweaks and fixes
- changelog update

#### Build 2312230
- Version bump: 0.14.1-b2
- Fix for Pixel Magic button
- Fix for #2922 (option to force WiFi PHY mode to G on ESP8266)
- Fix for #3601, #3400 (incorrect sunrise/sunset, #3612 by @softhack007)

#### Build 2312180
- Bugfixes (#3593, #3490, #3573, #3517, #3561, #3555, #3541, #3536, #3515, #3522, #3533, #3508)
- Various other internal cleanups and optimisations

#### Build 2311160
- Version bump: 0.14.1-b1
- Bugfixes (#3526, #3502, #3496, #3484, #3487, #3445, #3466, #3296, #3382, #3312)
- New feature: Sort presets by ID
- New usermod: LDR sensor (#3490 by @JeffWDH)
- Effect: Twinklefox & Tinklecat metadata fix
- Effect: separate #HH and #MM for Scrolling Text (#3480)
- SSDR usermod enhancements (#3368)
- PWM fan usermod enhancements (#3414)

#### Build 2310010, build 2310130
- Release of WLED version 0.14.0 "Hoshi"
- Bugfixes for #3400, #3403, #3405
Expand Down Expand Up @@ -422,7 +454,7 @@

- Added application level pong websockets reply (#2139)
- Use AsyncTCP 1.0.3 as it mitigates the flickering issue from 0.13.0-b2
- Fixed transition manually updated in preset overriden by field value
- Fixed transition manually updated in preset overridden by field value

#### Build 2108050

Expand Down Expand Up @@ -951,7 +983,7 @@

#### Build 2011040

- Inversed Rain direction (fixes #1147)
- Inverted Rain direction (fixes #1147)

#### Build 2011010

Expand Down Expand Up @@ -1162,7 +1194,7 @@

- Added module info page to web UI
- Added realtime override functionality to web UI
- Added individial segment power and brightness to web UI
- Added individual segment power and brightness to web UI
- Added feature to one-click select single segment only by tapping segment name
- Removed palette jumping to default if color is changed

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "0.14.1-a1",
"version": "0.14.1-b3",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
10 changes: 9 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32d
; default_envs = esp32s2_saola
; default_envs = esp32c3dev
; default_envs = lolin_s2_mini
; default_envs = esp32s3dev_16MB_PSRAM_opi

src_dir = ./wled00
data_dir = ./wled00/data
Expand Down Expand Up @@ -524,6 +525,11 @@ board_build.f_flash = 80000000L
board_build.flash_mode = qio
monitor_filters = esp32_exception_decoder

[env:esp32s3dev_16MB_PSRAM_opi]
extends = env:esp32s3dev_8MB_PSRAM_opi
board_build.partitions = tools/WLED_ESP32_16MB.csv
board_upload.flash_size = 16MB

[env:esp32s3dev_8MB_PSRAM_qspi]
;; ESP32-TinyS3 development board, with 8MB FLASH and PSRAM (memory_type: qio_qspi)
extends = env:esp32s3dev_8MB_PSRAM_opi
Expand Down Expand Up @@ -642,6 +648,8 @@ upload_speed = 115200
lib_deps = ${esp32c3.lib_deps}
board_build.partitions = tools/WLED_ESP32_2MB_noOTA.csv
board_build.flash_mode = dio
board_upload.flash_size = 2MB
board_upload.maximum_size = 2097152

[env:wemos_shield_esp32]
board = esp32dev
Expand All @@ -654,7 +662,7 @@ build_flags = ${common.build_flags_esp32}
-D RLYPIN=19
-D BTNPIN=17
-D IRPIN=18
-D UWLED_USE_MY_CONFIG
-U WLED_USE_MY_CONFIG
-D USERMOD_DALLASTEMPERATURE
-D USERMOD_FOUR_LINE_DISPLAY
-D TEMPERATURE_PIN=23
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control
- Up to 250 user presets to save and load colors/effects easily, supports cycling through them.
- Presets can be used to automatically execute API calls
- Nightlight function (gradually dims down)
- Full OTA software updatability (HTTP + ArduinoOTA), password protectable
- Full OTA software updateability (HTTP + ArduinoOTA), password protectable
- Configurable analog clock (Cronixie, 7-segment and EleksTube IPS clock support via usermods)
- Configurable Auto Brightness limit for safe operation
- Filesystem-based config for easier backup of presets and settings
Expand Down
12 changes: 6 additions & 6 deletions usermods/Animated_Staircase/Animated_Staircase.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Animated_Staircase : public Usermod {
* received within this time, an object is detected
* and the function will return true.
*
* The speed of sound is 343 meters per second at 20 degress Celcius.
* The speed of sound is 343 meters per second at 20 degrees Celsius.
* Since the sound has to travel back and forth, the detection
* distance for the sensor in cm is (0.0343 * maxTimeUs) / 2.
*
Expand Down Expand Up @@ -259,7 +259,7 @@ class Animated_Staircase : public Usermod {
}
}

// send sesnor values to JSON API
// send sensor values to JSON API
void writeSensorsToJson(JsonObject& staircase) {
staircase[F("top-sensor")] = topSensorRead;
staircase[F("bottom-sensor")] = bottomSensorRead;
Expand Down Expand Up @@ -297,8 +297,8 @@ class Animated_Staircase : public Usermod {
offIndex = maxSegmentId = strip.getLastActiveSegmentId() + 1;

// shorten the strip transition time to be equal or shorter than segment delay
transitionDelayTemp = transitionDelay = segment_delay_ms;
strip.setTransition(segment_delay_ms/100);
transitionDelay = segment_delay_ms;
strip.setTransition(segment_delay_ms);
strip.trigger();
} else {
if (togglePower && !on && offMode) toggleOnOff(); // toggle power on if off
Expand All @@ -309,7 +309,7 @@ class Animated_Staircase : public Usermod {
seg.setOption(SEG_OPTION_ON, true);
}
strip.trigger(); // force strip update
stateChanged = true; // inform external dvices/UI of change
stateChanged = true; // inform external devices/UI of change
colorUpdated(CALL_MODE_DIRECT_CHANGE);
DEBUG_PRINTLN(F("Animated Staircase disabled."));
}
Expand Down Expand Up @@ -492,7 +492,7 @@ class Animated_Staircase : public Usermod {
bottomEchoPin = top[FPSTR(_bottomEcho_pin)] | bottomEchoPin;

topMaxDist = top[FPSTR(_topEchoCm)] | topMaxDist;
topMaxDist = min(150,max(30,(int)topMaxDist)); // max distnace ~1.5m (a lag of 9ms may be expected)
topMaxDist = min(150,max(30,(int)topMaxDist)); // max distance ~1.5m (a lag of 9ms may be expected)
bottomMaxDist = top[FPSTR(_bottomEchoCm)] | bottomMaxDist;
bottomMaxDist = min(150,max(30,(int)bottomMaxDist)); // max distance ~1.5m (a lag of 9ms may be expected)

Expand Down
6 changes: 3 additions & 3 deletions usermods/Animated_Staircase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Animated Staircase can be controlled by the WLED API. Change settings such a
speed, on/off time and distance by sending an HTTP request, see below.

## WLED integration
To include this usermod in your WLED setup, you have to be able to [compile WLED from source](https://github.com/Aircoookie/WLED/wiki/Compiling-WLED).
To include this usermod in your WLED setup, you have to be able to [compile WLED from source](https://kno.wled.ge/advanced/compiling-wled/).

Before compiling, you have to make the following modifications:

Expand All @@ -38,7 +38,7 @@ Maximum distance for ultrasonic sensor can be configured as the time needed for
You _may_ need to use 10k pull-down resistors on the selected PIR pins, depending on the sensor.

## WLED configuration
1. In the WLED UI, confgure a segment for each step. The lowest step of the stairs is the
1. In the WLED UI, configure a segment for each step. The lowest step of the stairs is the
lowest segment id.
2. Save your segments into a preset.
3. Ideally, add the preset in the config > LED setup menu to the "apply
Expand Down Expand Up @@ -91,7 +91,7 @@ To enable the usermod again, use `"enabled":true`.
Alternatively you can use _Usermod_ Settings page where you can change other parameters as well.

### Changing animation parameters and detection range of the ultrasonic HC-SR04 sensor
Using _Usermod_ Settings page you can define different usermod parameters, includng sensor pins, delay between segment activation etc.
Using _Usermod_ Settings page you can define different usermod parameters, including sensor pins, delay between segment activation etc.

When an ultrasonic sensor is enabled you can enter maximum detection distance in centimeters separately for top and bottom sensors.

Expand Down
2 changes: 1 addition & 1 deletion usermods/BH1750_v2/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The luminance is displayed in both the Info section of the web UI, as well as pu
- This must be added under `lib_deps` in your `platformio.ini` (or `platformio_override.ini`).
- Data is published over MQTT - make sure you've enabled the MQTT sync interface.

## Compiliation
## Compilation

To enable, compile with `USERMOD_BH1750` defined (e.g. in `platformio_override.ini`)
```ini
Expand Down
2 changes: 1 addition & 1 deletion usermods/BH1750_v2/usermod_bh1750.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define USERMOD_BH1750_FIRST_MEASUREMENT_AT 10000
#endif

// only report if differance grater than offset value
// only report if difference grater than offset value
#ifndef USERMOD_BH1750_OFFSET_VALUE
#define USERMOD_BH1750_OFFSET_VALUE 1
#endif
Expand Down
4 changes: 2 additions & 2 deletions usermods/BME280_v2/usermod_bme280.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class UsermodBME280 : public Usermod

// set the default pins based on the architecture, these get overridden by Usermod menu settings
#ifdef ESP8266
//uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
//uint8_t RST_PIN = 16; // Un-comment for Heltec WiFi-Kit-8
#endif
bool initDone = false;

Expand Down Expand Up @@ -78,7 +78,7 @@ class UsermodBME280 : public Usermod
static const char _name[];
static const char _enabled[];

// Read the BME280/BMP280 Sensor (which one runs depends on whether Celsius or Farenheit being set in Usermod Menu)
// Read the BME280/BMP280 Sensor (which one runs depends on whether Celsius or Fahrenheit being set in Usermod Menu)
void UpdateBME280Data(int SensorType)
{
float _temperature, _humidity, _pressure;
Expand Down
4 changes: 2 additions & 2 deletions usermods/Battery/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you have an ESP32 board, connect the positive side of the battery to ADC1 (GP
- 💯 Displays current battery voltage
- 🚥 Displays battery level
- 🚫 Auto-off with configurable Threshold
- 🚨 Low power indicator with many configuration posibilities
- 🚨 Low power indicator with many configuration possibilities

## 🎈 Installation

Expand All @@ -41,7 +41,7 @@ define `USERMOD_BATTERY` in `wled00/my_config.h`
| `USERMOD_BATTERY_MEASUREMENT_INTERVAL` | ms | battery check interval. defaults to 30 seconds |
| `USERMOD_BATTERY_MIN_VOLTAGE` | v | minimum battery voltage. default is 2.6 (18650 battery standard) |
| `USERMOD_BATTERY_MAX_VOLTAGE` | v | maximum battery voltage. default is 4.2 (18650 battery standard) |
| `USERMOD_BATTERY_TOTAL_CAPACITY` | mAh | the capacity of all cells in parralel sumed up |
| `USERMOD_BATTERY_TOTAL_CAPACITY` | mAh | the capacity of all cells in parallel summed up |
| `USERMOD_BATTERY_CALIBRATION` | | offset / calibration number, fine tune the measured voltage by the microcontroller |
| Auto-Off | --- | --- |
| `USERMOD_BATTERY_AUTO_OFF_ENABLED` | true/false | enables auto-off |
Expand Down
2 changes: 1 addition & 1 deletion usermods/DHT/usermod_dht.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#endif

// how many seconds after boot to take first measurement, 90 seconds
// 90 gives enough time to OTA update firmware if this crashses
// 90 gives enough time to OTA update firmware if this crashes
#ifndef USERMOD_DHT_FIRST_MEASUREMENT_AT
#define USERMOD_DHT_FIRST_MEASUREMENT_AT 90000
#endif
Expand Down
2 changes: 1 addition & 1 deletion usermods/EXAMPLE_v2/usermod_v2_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MyExampleUsermod : public Usermod {
static const char _enabled[];


// any private methods should go here (non-inline methosd should be defined out of class)
// any private methods should go here (non-inline method should be defined out of class)
void publishMqtt(const char* state, bool retain = false); // example for publishing MQTT message


Expand Down
14 changes: 7 additions & 7 deletions usermods/Enclosure_with_OLED_temp_ESP07/usermod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ OneWire oneWire(13);
DallasTemperature sensor(&oneWire);
long temptimer = millis();
long lastMeasure = 0;
#define Celsius // Show temperature mesaurement in Celcius otherwise is in Fahrenheit
#define Celsius // Show temperature measurement in Celsius otherwise is in Fahrenheit

// If display does not work or looks corrupted check the
// constructor reference:
// https://github.com/olikraus/u8g2/wiki/u8x8setupcpp
// or check the gallery:
// https://github.com/olikraus/u8g2/wiki/gallery
// --> First choise of cheap I2C OLED 128X32 0.91"
// --> First choice of cheap I2C OLED 128X32 0.91"
U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Second choise of cheap I2C OLED 128X64 0.96" or 1.3"
// --> Second choice of cheap I2C OLED 128X64 0.96" or 1.3"
//U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// gets called once at boot. Do all initialization that doesn't depend on
// network here
void userSetup() {
sensor.begin(); //Start Dallas temperature sensor
u8x8.begin();
//u8x8.setFlipMode(1); //Uncoment if using WLED Wemos shield
//u8x8.setFlipMode(1); //Un-comment if using WLED Wemos shield
u8x8.setPowerSave(0);
u8x8.setContrast(10); //Contrast setup will help to preserve OLED lifetime. In case OLED need to be brighter increase number up to 255
u8x8.setFont(u8x8_font_chroma48medium8_r);
Expand Down Expand Up @@ -71,7 +71,7 @@ void userLoop() {
if (mqtt != nullptr)
{
sensor.requestTemperatures();
//Gets prefered temperature scale based on selection in definitions section
//Gets preferred temperature scale based on selection in definitions section
#ifdef Celsius
float board_temperature = sensor.getTempCByIndex(0);
#else
Expand Down Expand Up @@ -138,11 +138,11 @@ void userLoop() {
// First row with Wifi name
u8x8.setCursor(1, 0);
u8x8.print(knownSsid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0));
// Print `~` char to indicate that SSID is longer, than owr dicplay
// Print `~` char to indicate that SSID is longer than our display
if (knownSsid.length() > u8x8.getCols())
u8x8.print("~");

// Second row with IP or Psssword
// Second row with IP or Password
u8x8.setCursor(1, 1);
// Print password in AP mode and if led is OFF.
if (apActive && bri == 0)
Expand Down
14 changes: 7 additions & 7 deletions usermods/Enclosure_with_OLED_temp_ESP07/usermod_bme280.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

void UpdateBME280Data();

#define Celsius // Show temperature mesaurement in Celcius otherwise is in Fahrenheit
#define Celsius // Show temperature measurement in Celsius otherwise is in Fahrenheit
BME280I2C bme; // Default : forced mode, standby time = 1000 ms
// Oversampling = pressure ×1, temperature ×1, humidity ×1, filter off,

Expand All @@ -20,14 +20,14 @@ uint8_t SDA_PIN = 21;
#else //ESP8266 boards
uint8_t SCL_PIN = 5;
uint8_t SDA_PIN = 4;
// uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
// uint8_t RST_PIN = 16; // Un-comment for Heltec WiFi-Kit-8
#endif

//The SCL and SDA pins are defined here.
//ESP8266 Wemos D1 mini board use SCL=5 SDA=4 while ESP32 Wemos32 mini board use SCL=22 SDA=21
#define U8X8_PIN_SCL SCL_PIN
#define U8X8_PIN_SDA SDA_PIN
//#define U8X8_PIN_RESET RST_PIN // Uncoment for Heltec WiFi-Kit-8
//#define U8X8_PIN_RESET RST_PIN // Un-comment for Heltec WiFi-Kit-8

// If display does not work or looks corrupted check the
// constructor reference:
Expand All @@ -36,9 +36,9 @@ uint8_t SDA_PIN = 4;
// https://github.com/olikraus/u8g2/wiki/gallery
// --> First choise of cheap I2C OLED 128X32 0.91"
U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Second choise of cheap I2C OLED 128X64 0.96" or 1.3"
// --> Second choice of cheap I2C OLED 128X64 0.96" or 1.3"
//U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Third choise of Heltec WiFi-Kit-8 OLED 128X32 0.91"
// --> Third choice of Heltec WiFi-Kit-8 OLED 128X32 0.91"
//U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_RESET, U8X8_PIN_SCL, U8X8_PIN_SDA); // Constructor for Heltec WiFi-Kit-8
// gets called once at boot. Do all initialization that doesn't depend on network here

Expand Down Expand Up @@ -181,11 +181,11 @@ void userLoop() {
// First row with Wifi name
u8x8.setCursor(1, 0);
u8x8.print(knownSsid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0));
// Print `~` char to indicate that SSID is longer, than owr dicplay
// Print `~` char to indicate that SSID is longer than our display
if (knownSsid.length() > u8x8.getCols())
u8x8.print("~");

// Second row with IP or Psssword
// Second row with IP or Password
u8x8.setCursor(1, 1);
// Print password in AP mode and if led is OFF.
if (apActive && bri == 0)
Expand Down
4 changes: 2 additions & 2 deletions usermods/Fix_unreachable_netservices_v2/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Attention: This usermod compiles only for ESP8266**

This usermod-v2 modification performs a ping request to a local IP address every 60 seconds. This ensures WLED net services remain accessible in some problematic WLAN environments.
This usermod-v2 modification performs a ping request to a local IP address every 60 seconds. This ensures WLED net services remain accessible in some problematic WiFi environments.

The modification works with static or DHCP IP address configuration.

Expand All @@ -24,7 +24,7 @@ The usermod supports the following state changes:

| JSON key | Value range | Description |
|-------------|------------------|---------------------------------|
| PingDelayMs | 5000 to 18000000 | Deactivdate/activate the sensor |
| PingDelayMs | 5000 to 18000000 | Deactivate/activate the sensor |

Changes also persist after a reboot.

Expand Down
Loading
Loading