Skip to content

Commit 376b39f

Browse files
authored
Update wifi_heap_sticker to use new gc_heap and gc_time
1 parent 62be8b9 commit 376b39f

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

raw/Wifi_Heap_Sticker/autoexec.be

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# rm Wifi_Heap_Sticker.tapp; zip -j -0 Wifi_Heap_Sticker.tapp Wifi_Heap_Sticker/autoexec.be Wifi_Heap_Sticker/wifi_memory_sticker.be Wifi_Heap_Sticker/manifest.json
1+
# rm Wifi_Heap_Sticker.tapp; zip -j -0 Wifi_Heap_Sticker.tapp Wifi_Heap_Sticker/autoexec.be Wifi_Heap_Sticker/wifi_heap_sticker.be Wifi_Heap_Sticker/manifest.json
22
do # embed in `do` so we don't add anything to global namespace
33
import introspect
4-
var wifi_memory_sticker = introspect.module('wifi_memory_sticker', true) # load module but don't cache
5-
tasmota.add_extension(wifi_memory_sticker)
4+
var wifi_heap_sticker = introspect.module('wifi_heap_sticker', true) # load module but don't cache
5+
tasmota.add_extension(wifi_heap_sticker)
66
end
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "Wifi Heap Sticker",
3-
"version": "0x19090100",
3+
"version": "0x190A0100",
44
"description": "Display top left sticker with Wifi strength and memory heap",
55
"author": "Stephan Hadinger",
6-
"min_tasmota": "0x0F000100",
6+
"min_tasmota": "0x0F010001",
77
"features": ""
8-
}
8+
}

raw/Wifi_Heap_Sticker/wifi_memory_sticker.be renamed to raw/Wifi_Heap_Sticker/wifi_heap_sticker.be

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#######################################################################
2-
# Wifi Memory Sticker
2+
# Wifi Heap Sticker
33
#
44
# Sticker to show realtime wifi strengh and memory (top left of main page)
55

66
#################################################################################
7-
# Wifi_Memory_Sticker
7+
# Wifi_Heap_Sticker
88
#################################################################################
9-
class Wifi_Memory_Sticker
9+
class Wifi_Heap_Sticker
1010

1111
static var HTTP_HEAD_STYLE_WIFI =
1212
"<style>"
@@ -43,8 +43,14 @@ class Wifi_Memory_Sticker
4343
rssi >= -85 ? "active" : ""))
4444
end
4545
# display free heap
46-
webserver.content_send(f"<span>&nbsp;{tasmota.memory('heap_free')}k</span>")
46+
var gc_time = tasmota.memory('gc_time')
47+
var gc_heap = tasmota.memory('gc_heap')
48+
if (gc_time != nil) && (gc_heap != nil)
49+
webserver.content_send(f"<span>&nbsp;{tasmota.memory('heap_free')}-{gc_heap}k [{gc_time}ms]</span>")
50+
else
51+
webserver.content_send(f"<span>&nbsp;{tasmota.memory('heap_free')}k</span>")
52+
end
4753
end
4854
end
4955

50-
return Wifi_Memory_Sticker()
56+
return Wifi_Heap_Sticker()

0 commit comments

Comments
 (0)