bottombarupdate in case of a new mqtt message

This commit is contained in:
root 2023-08-02 13:14:49 +02:00
parent ed1be6be48
commit b178d6ce27

View File

@ -1,3 +1,4 @@
import bottombar as bb
import argparse import argparse
from console_bottombar import BottomBar from console_bottombar import BottomBar
import getpass import getpass
@ -53,6 +54,7 @@ def rx_mqtt(mc, userdata, message):
logfile = open('mqtt_sniffer.log', 'w') logfile = open('mqtt_sniffer.log', 'w')
logfile.write("%9.04f::%s::%s\n" % (ts, message.topic, data)) logfile.write("%9.04f::%s::%s\n" % (ts, message.topic, data))
logfile.flush() logfile.flush()
bb.redraw()
if __name__ == "__main__": if __name__ == "__main__":