Skip to content

Commit e922297

Browse files
committed
Add puling effect for firmware update
1 parent bb695fa commit e922297

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

docs/user-guide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
- [Signing out](#signing-out)
1717

1818
## LED indicator colors
19-
| | Color | Lamp mode |
20-
|--------------------------------------------------------|------------------------|---------------------------------------|
21-
| <img src="indicators/dot-blue-pulse.svg" width='12'> | Blue pulsing | Bluetooth pairing mode |
22-
| <img src="indicators/dot-blue.svg" width='12'> | Blue solid | Bluetooth connected |
23-
| <img src="indicators/dot-amber-pulse.svg" width='12'> | Amber pulsing | Connecting to wifi |
24-
| <img src="indicators/dot-amber.svg" width='12'> | Amber solid | Connected to wifi |
25-
| <img src="indicators/dot-green-pulse.svg" width='12'> | Green pulsing | Connecting to server |
26-
| <img src="indicators/dot-green.svg" width='12'> | Green solid | Successfully set up |
27-
| <img src="indicators/dot-red.svg" width='12'> | Red solid | Error |
28-
| <img src="indicators/dot-white-pulse.svg" width='12'> | White pulsing | Factory resetting or firmware update |
19+
| | Color | Lamp mode |
20+
|--------------------------------------------------------|------------------------|--------------------------------------------------|
21+
| <img src="indicators/dot-blue-pulse.svg" width='12'> | Blue pulsing | Bluetooth pairing mode |
22+
| <img src="indicators/dot-blue.svg" width='12'> | Blue solid | Bluetooth connected |
23+
| <img src="indicators/dot-amber-pulse.svg" width='12'> | Amber pulsing | Connecting to wifi |
24+
| <img src="indicators/dot-amber.svg" width='12'> | Amber solid | Connected to wifi |
25+
| <img src="indicators/dot-green-pulse.svg" width='12'> | Green pulsing | Connecting to server |
26+
| <img src="indicators/dot-green.svg" width='12'> | Green solid | Successfully set up |
27+
| <img src="indicators/dot-red.svg" width='12'> | Red solid | Error |
28+
| <img src="indicators/dot-white-pulse.svg" width='12'> | White pulsing | Factory resetting or installing firmware update |
2929

3030

3131

micro/app/ota/ota_updater.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os, gc
22
from .httpclient import HttpClient
3+
from app.led import pulse, set_gradient, get_color_gradient, rgb_to_hue
34

45
class OTAUpdater:
56
"""
@@ -77,6 +78,10 @@ def install_update_if_available(self) -> bool:
7778
(current_version, latest_version) = self._check_for_new_version()
7879
if latest_version > current_version:
7980
print('Updating to version {}...'.format(latest_version))
81+
hue = rgb_to_hue(255, 255, 255)
82+
set_gradient(get_color_gradient(223))
83+
pulse()
84+
8085
self._create_new_version_file(latest_version)
8186
self._download_new_version(latest_version)
8287
self._copy_secrets_file()

0 commit comments

Comments
 (0)