Skip to content

Commit

Permalink
Feature request 45 (#67)
Browse files Browse the repository at this point in the history
- ***Breaking changes***: requires `Firefly Luciferin` (v2.16.3)
- [Initial setup](https://github.com/sblantipodi/firefly_luciferin/wiki/Quick-start#install-firefly-luciferin-java-fast-screen-capture-software-on-your-pc) has been simplified by automatically using the right settings for Full/Light firmware. 
- [Web installer](https://sblantipodi.github.io/glow_worm_luciferin/) improvements on newer ESP devices.
- [Power saving](https://github.com/sblantipodi/firefly_luciferin/wiki/Power-saving-features) feature is now enabled by default.
- Fixed an issue that prevented the user to select the preferred capture method.
- Fixed an issue that prevented LilyGO-T-POE-Pro and ESP32-POE-WROVER from connecting to Ethernet correctly.
- It took too long to start the device [reset process](https://github.com/sblantipodi/firefly_luciferin/wiki/Device-reset) when MQTT server is not available. Fixed.
- Tray icon was unable to load all settings relative to a profile. Fixed.
- Technicalities: Switched to the new ZGC Generational.
- [Arduino Bootstrapper](https://github.com/sblantipodi/arduino_bootstrapper/releases) update (v.1.18.1).
  • Loading branch information
sblantipodi authored Aug 2, 2024
1 parent 28bb51a commit 898bc55
Show file tree
Hide file tree
Showing 12 changed files with 254 additions and 231 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ jobs:
name: GlowWormLuciferinFULL_ESP8266_firmware.bin
path: /home/runner/work/glow_worm_luciferin/glow_worm_luciferin/.pio/build/glowwormluciferinfull_esp8266/firmware.bin

- name: Saving version files
uses: actions/upload-artifact@v4
with:
name: version
path: /home/runner/work/glow_worm_luciferin/glow_worm_luciferin/version

- name: Saving Version.h files
uses: actions/upload-artifact@v4
with:
name: Version.h
path: /home/runner/work/glow_worm_luciferin/glow_worm_luciferin/include/Version.h



build_esp8266_firmware_light:
Expand Down Expand Up @@ -423,6 +435,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp -rf ci_artifacts/Version.h/Version.h ./currentbranch/include/Version.h
cp -rf ci_artifacts/version/version ./currentbranch/version
cp -rf ci_artifacts/GlowWormLuciferinFULL_ESP8266_firmware.bin/firmware.bin ./currentbranch/docs/static/firmware_build/GlowWormLuciferinFULL_ESP8266_firmware.bin
cp -rf ci_artifacts/GlowWormLuciferinLIGHT_ESP8266_firmware.bin/firmware.bin ./currentbranch/docs/static/firmware_build/GlowWormLuciferinLIGHT_ESP8266_firmware.bin
Expand Down Expand Up @@ -450,6 +465,8 @@ jobs:
ls ./docs/static/firmware_build/;
git config --global user.email "[email protected]";
git config --global user.name "Davide Perini";
git add ./version;
git add ./include/Version.h;
git add ./docs/static/firmware_build/*;
git add ./docs/static/firmware_build_previous/*;
cat /home/runner/work/glow_worm_luciferin/glow_worm_luciferin/currentbranch/docs/static/firmware_build/manifest_full.json;
Expand Down
2 changes: 1 addition & 1 deletion arduino_bootstrapper
11 changes: 9 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ <h1>Glow Worm Luciferin</h1><a href="https://github.com/sblantipodi/firefly_luci
var light_manifest = full_manifest;
light_manifest = light_manifest.replace("manifest_full.json", "manifest_light.json");
if (full_manifest.includes("beta")) {
document.getElementById("firefly-download").innerHTML = "<b>Firefly Luciferin <u>beta version</u> can be downloaded <a href=\"https://github.com/sblantipodi/firefly_luciferin/actions\">here</a><br>NOTE: Using Glow Worm Luciferin beta version requires the latest Firefly Luciferin beta version. Please prefer the latest stable version unless you know exactly what you are doing.</b>";
document.getElementById("firefly-download").innerHTML = "<b>Firefly Luciferin <u>beta version</u> can be downloaded <a href=\"https://github.com/sblantipodi/firefly_luciferin/actions/workflows/build.yml\">here</a><br>NOTE: Using Glow Worm Luciferin beta version requires the latest Firefly Luciferin beta version. Please prefer the latest stable version unless you know exactly what you are doing.</b>";
} else if (full_manifest.includes("prev")) {
document.getElementById("firefly-download").innerHTML = "<b>Firefly Luciferin <u>previous stable version</u> can be downloaded <a href=\"https://github.com/sblantipodi/firefly_luciferin/releases\">here</a></b>";
} else {
Expand All @@ -479,7 +479,14 @@ <h1>Glow Worm Luciferin</h1><a href="https://github.com/sblantipodi/firefly_luci
<li>The device is now into DFU mode, you can now click the install button.</li>
</ul>
NOTE: If you are installing the FULL firmware and you don't see the option to configure WiFi after installation is complete,
hit the reset button and try again by clicking the install button, you should now see the option to set up WiFi.
hit the reset button on your device and try again by clicking the install button on this page, you should now see the option to "Connect to WiFi".
<br/><br/>
<div style="text-align: center"><img style="width: 50%;" src="https://sblantipodi.github.io/glow_worm_luciferin/static/logos/connect.png" /></div>
<br/><br/>
If you want to access the web interface, you can do it by repeating the reset/install procedure, you should now see the "Visit Device" option.
<br/><br/>
<div style="text-align: center"><img style="width: 50%;" src="https://sblantipodi.github.io/glow_worm_luciferin/static/logos/visit.png" /></div>
<br/><br/>
`;
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/static/firmware_build/manifest_full.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Glow Worm Luciferin FULL","version":"5.14.5","new_install_improv_wait_time":20,"builds":[{"chipFamily":"ESP8266","parts":[{"path":"GlowWormLuciferinFULL_ESP8266_firmware.bin","offset":0}]},{"chipFamily":"ESP32","parts":[{"path":"GlowWormLuciferinFULL_ESP32_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-C3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_C3_CDC_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S2","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S2_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S3_CDC_firmware-factory.bin","offset":0}]}],"funding_url":"https://www.paypal.com/donate?hosted_button_id=ZEJM8ZLQW5E4A"}
{"name":"Glow Worm Luciferin FULL","version":"5.14.5","new_install_improv_wait_time":20,"builds":[{"chipFamily":"ESP8266","parts":[{"path":"GlowWormLuciferinFULL_ESP8266_firmware.bin","offset":0}]},{"chipFamily":"ESP32","parts":[{"path":"GlowWormLuciferinFULL_ESP32_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-C3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_C3_CDC_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S2","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S2_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S3_firmware-factory.bin","offset":0}]}],"funding_url":"https://www.paypal.com/donate?hosted_button_id=ZEJM8ZLQW5E4A"}
2 changes: 1 addition & 1 deletion docs/static/firmware_build_previous/manifest_full.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Glow Worm Luciferin FULL","version":"5.13.2","new_install_improv_wait_time":20,"builds":[{"chipFamily":"ESP8266","parts":[{"path":"GlowWormLuciferinFULL_ESP8266_firmware.bin","offset":0}]},{"chipFamily":"ESP32","parts":[{"path":"GlowWormLuciferinFULL_ESP32_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-C3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_C3_CDC_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S2","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S2_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S3_CDC_firmware-factory.bin","offset":0}]}],"funding_url":"https://www.paypal.com/donate?hosted_button_id=ZEJM8ZLQW5E4A"}
{"name":"Glow Worm Luciferin FULL","version":"5.13.2","new_install_improv_wait_time":20,"builds":[{"chipFamily":"ESP8266","parts":[{"path":"GlowWormLuciferinFULL_ESP8266_firmware.bin","offset":0}]},{"chipFamily":"ESP32","parts":[{"path":"GlowWormLuciferinFULL_ESP32_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-C3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_C3_CDC_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S2","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S2_firmware-factory.bin","offset":0}]},{"chipFamily":"ESP32-S3","parts":[{"path":"GlowWormLuciferinFULL_ESP32_S3_firmware-factory.bin","offset":0}]}],"funding_url":"https://www.paypal.com/donate?hosted_button_id=ZEJM8ZLQW5E4A"}
6 changes: 4 additions & 2 deletions include/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#if defined(ARDUINO_ARCH_ESP32)
#define LDR_DIVIDER 4096
#endif
#define SERIAL_SIZE_RX 2048
#define SERIAL_SIZE_RX 1500
#define CONFIG_NUM_PARAMS 20
#define CONFIG_PREFIX_LENGTH 6
// This value must meet the one in Firefly Luciferin
Expand Down Expand Up @@ -103,6 +103,9 @@ extern int ldrDivider;
extern const unsigned int LDR_RECOVER_TIME;
extern unsigned long previousMillisLDR;
extern unsigned long lastUdpMsgReceived;
extern unsigned long disconnectionTime;
extern bool disconnectionResetEnable;
extern unsigned long secondsBeforeReset;

extern unsigned long currentMillisCheckConn;
extern unsigned long prevMillisCheckConn1;
Expand All @@ -119,7 +122,6 @@ extern uint8_t baudRateInUse;
extern bool relayState;
extern bool breakLoop;
extern bool apFileRead;
extern int disconnectionCounter;

class Globals {

Expand Down
4 changes: 2 additions & 2 deletions include/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
#define VERSION "5.14.5"
#endif
#ifndef BUILD_TIMESTAMP
#define BUILD_TIMESTAMP "2024-07-01 15:43:12.200559"
#define BUILD_TIMESTAMP "2024-07-30 16:07:09.795032"
#endif


20 changes: 10 additions & 10 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platform_esp8266 = [email protected]
f_cpu_esp8266 = 160000000L
monitor_filters_esp8266 = esp8266_exception_decoder

platform_esp32 = espressif32@6.7.0
platform_esp32 = espressif32@6.8.1
monitor_filters_esp32 = esp32_exception_decoder

framework = arduino
Expand Down Expand Up @@ -49,7 +49,7 @@ monitor_filters = ${common_env_data.monitor_filters_esp8266}
board_build.f_cpu = ${common_env_data.f_cpu_esp8266}
;build_type = debug
monitor_port = COM4
;upload_port = COM9
;upload_port = COM4
upload_protocol = espota
upload_port = 192.168.1.11
upload_flags =
Expand Down Expand Up @@ -126,7 +126,7 @@ board_build.f_cpu = 240000000L
monitor_port = COM9
;upload_port = COM9
upload_protocol = espota
upload_port = 192.168.1.106
upload_port = 192.168.1.8
upload_flags =
--port=8379
--auth=${secrets.ota_password}
Expand Down Expand Up @@ -368,13 +368,13 @@ upload_speed = ${common_env_data.upload_speed}
board_build.filesystem = littlefs
monitor_filters = ${common_env_data.monitor_filters_esp32}
;build_type = debug
monitor_port = COM11
upload_port = COM11
;upload_protocol = espota
;upload_port = 192.168.1.82
;upload_flags =
; --port=8379
; --auth=${secrets.ota_password}
monitor_port = COM5
;upload_port = COM6
upload_protocol = espota
upload_port = 192.168.1.10
upload_flags =
--port=8386
--auth=${secrets.ota_password}
lib_deps = ${common_env_data.lib_deps}
lib_ldf_mode = deep
extra_scripts = post:platformio_version_increment/esp32_create_factory_bin_post.py
Expand Down
8 changes: 6 additions & 2 deletions src/Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ int ldrDivider = LDR_DIVIDER;
const unsigned int LDR_RECOVER_TIME = 4000;
unsigned long previousMillisLDR = 0;
unsigned long lastUdpMsgReceived;
unsigned long disconnectionTime;
bool disconnectionResetEnable;
// after three minutes, start device reset
unsigned long secondsBeforeReset = 180000;
bool apFileRead;
int disconnectionCounter;

unsigned long currentMillisCheckConn = 0;
unsigned long prevMillisCheckConn1 = 0;
Expand Down Expand Up @@ -241,7 +244,7 @@ void Globals::sendSerialInfo() {
if (currentMillisSendSerial > lastUdpMsgReceived + DELAY_1000) {
framerateSerial = framerateCounterSerial > 0 ? framerateCounterSerial / 10 : 0;
framerateCounterSerial = 0;
Serial.printf("framerate:%s\n", (String((framerateSerial > 0.5 ? framerateSerial : 0),1)).c_str());
Serial.printf("framerate:%f\n", (framerateSerial > 0.5 ? framerateSerial : 0));
#ifdef TARGET_GLOWWORMLUCIFERINLIGHT
Serial.printf("firmware:%s\n", "LIGHT");
#else
Expand Down Expand Up @@ -280,6 +283,7 @@ void Globals::sendSerialInfo() {
Serial.printf("relayPin:%d\n", relayPin);
Serial.printf("sbPin:%d\n", sbPin);
Serial.printf("ldrPin:%d\n", ldrPin);
Serial.flush();
}
}
}
Expand Down
Loading

0 comments on commit 898bc55

Please sign in to comment.