bitcoin trend symbol not showing.
This commit is contained in:
parent
f10caa3918
commit
3bf2e18f83
1 changed files with 5 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ def start(stop_event, args):
|
|||
trend = None
|
||||
image_buffer = lib.display.matrix.buffer()
|
||||
draw = ImageDraw.Draw(image_buffer)
|
||||
symbol = '⏶'
|
||||
#symbol = '⏶'
|
||||
while not stop_event.is_set():
|
||||
# All to black
|
||||
draw.rectangle( ((0,0),(lib.display.matrix.width-1,lib.display.matrix.height-1)), fill=(0,0,0) )
|
||||
|
|
@ -31,15 +31,16 @@ def start(stop_event, args):
|
|||
if last_price:
|
||||
if price > last_price:
|
||||
trend = 1
|
||||
symbol = "🡅"
|
||||
#symbol = "🡅"
|
||||
elif price < last_price:
|
||||
trend = -1
|
||||
symbol = "🡇"
|
||||
#symbol = "🡇"
|
||||
|
||||
#display.triangle(draw, 0, 0, trend, width=16, height=32)
|
||||
print(symbol)
|
||||
|
||||
text = f"{symbol} BTC: {price:.0f}€"
|
||||
#text = f"{symbol} BTC: {price:.0f}€"
|
||||
text = f"BTC: {price:.0f}€"
|
||||
|
||||
draw.text((20, 0), text, fill=(255, 255, 255), font=lib.display.matrix.large_font)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue