File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed
Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 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
22do # 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 )
66end
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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> {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> {tasmota.memory('heap_free')}-{gc_heap}k [{gc_time}ms]</span>" )
50+ else
51+ webserver.content_send ( f"<span> {tasmota.memory('heap_free')}k</span>" )
52+ end
4753 end
4854end
4955
50- return Wifi_Memory_Sticker ()
56+ return Wifi_Heap_Sticker ()
You can’t perform that action at this time.
0 commit comments