fix: net leds values were reduced too much

This commit is contained in:
əlemi 2022-08-30 21:06:20 +02:00
parent ae1530c61c
commit 2ebd96d7b8
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -59,7 +59,7 @@ class State:
w_rx = min(int((d_rx - rx) / 4096), 255)
w_tx = min(int((d_tx - tx) / 4096), 255)
await self.packets.put(struct.pack("BBBBBB", 1, 4, *( int(((x/100) **2) * BAR_MAX_HEIGHT) for x in cpu_report )))
await self.packets.put(struct.pack("BBBB", 2, 2, min(int((d_tx - tx) / 1024), BAR_MAX_HEIGHT), min(int((d_rx - rx) / 1024), 255)))
await self.packets.put(struct.pack("BBBB", 2, 2, min(p_tx, 255), min(p_rx, 255)))
await self.packets.put(struct.pack("BBBBBBBBBB", 3, 8, *( int((x/100) * BAR_MAX_HEIGHT) for x in cpu_report ), p_tx, p_rx, w_tx, w_rx))
rx = d_rx
tx = d_tx