Merge pull request #4 from fin-tic/dev

Dev
This commit is contained in:
Neythen Treloar 2022-02-22 12:43:19 +00:00 committed by GitHub
commit dd9ad2dd2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View File

@ -206,14 +206,14 @@ def stop():
ticker.sendline('K')
if not displaying_screensaver:
time.sleep(1) # give time for leds to turn off
time.sleep(0.1) # give time for leds to turn off
ticker.close()
else:
screensaver_p.close()
if not ticker_stopped:
time.sleep(1) # give time for leds to turn off
time.sleep(0.1) # give time for leds to turn off
ticker.close()
ticker_stopped = True

View File

@ -1002,19 +1002,19 @@ class StockTicker():
for i, cb in enumerate(coin_bases):
try:
ticker, base = cb.split(',')
current = coin_info[cb]["current"]
change = coin_info[cb]["24hr_change"]
current = float(coin_info[cb]["current"])
change = float(coin_info[cb]["24hr_change"])
arrow, change = self.getArrow(change, professional=True)
if all_crypto_settings["point"]:
# convert percent to points
change = change/100 * current
change = '%.2f' % change
change = abs(change)/100 * current
change = str(change)
else:
change = '%.2f' % change +'%'
change = str(change)
current = '%.2f' % current
current = str(current)
midFrame = self.textToImageProf(ticker + '(' + base + ')', current, change, arrow, font=ImageFont.load("./fonts/6x10.pil")) #IMAGE THE TEXT
if all_crypto_settings['logos']:
try:
@ -1151,8 +1151,8 @@ class StockTicker():
try:
symbol, base = sb.split(',')
current = forex_settings[sb]['current']
change = forex_settings[sb]['24hr_change']
current = float(forex_settings[sb]['current'])
change = float(forex_settings[sb]['24hr_change'])
@ -1162,7 +1162,7 @@ class StockTicker():
if all_forex_settings["percent"]:
# convert percent to points
change = change/current * 100
change = abs(change)/current * 100
change = str(change) + '%'
else: