professional fixes
This commit is contained in:
parent
5368e5b09b
commit
73932bcc38
@ -206,14 +206,14 @@ def stop():
|
|||||||
ticker.sendline('K')
|
ticker.sendline('K')
|
||||||
|
|
||||||
if not displaying_screensaver:
|
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()
|
ticker.close()
|
||||||
else:
|
else:
|
||||||
screensaver_p.close()
|
screensaver_p.close()
|
||||||
|
|
||||||
if not ticker_stopped:
|
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.close()
|
||||||
ticker_stopped = True
|
ticker_stopped = True
|
||||||
|
|
||||||
|
@ -1002,19 +1002,19 @@ class StockTicker():
|
|||||||
for i, cb in enumerate(coin_bases):
|
for i, cb in enumerate(coin_bases):
|
||||||
try:
|
try:
|
||||||
ticker, base = cb.split(',')
|
ticker, base = cb.split(',')
|
||||||
current = coin_info[cb]["current"]
|
current = float(coin_info[cb]["current"])
|
||||||
change = coin_info[cb]["24hr_change"]
|
change = float(coin_info[cb]["24hr_change"])
|
||||||
arrow, change = self.getArrow(change, professional=True)
|
arrow, change = self.getArrow(change, professional=True)
|
||||||
|
|
||||||
if all_crypto_settings["point"]:
|
if all_crypto_settings["point"]:
|
||||||
# convert percent to points
|
# convert percent to points
|
||||||
change = change/100 * current
|
change = abs(change)/100 * current
|
||||||
change = '%.2f' % change
|
change = str(change)
|
||||||
else:
|
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
|
midFrame = self.textToImageProf(ticker + '(' + base + ')', current, change, arrow, font=ImageFont.load("./fonts/6x10.pil")) #IMAGE THE TEXT
|
||||||
if all_crypto_settings['logos']:
|
if all_crypto_settings['logos']:
|
||||||
try:
|
try:
|
||||||
@ -1151,8 +1151,8 @@ class StockTicker():
|
|||||||
try:
|
try:
|
||||||
symbol, base = sb.split(',')
|
symbol, base = sb.split(',')
|
||||||
|
|
||||||
current = forex_settings[sb]['current']
|
current = float(forex_settings[sb]['current'])
|
||||||
change = forex_settings[sb]['24hr_change']
|
change = float(forex_settings[sb]['24hr_change'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1162,7 +1162,7 @@ class StockTicker():
|
|||||||
|
|
||||||
if all_forex_settings["percent"]:
|
if all_forex_settings["percent"]:
|
||||||
# convert percent to points
|
# convert percent to points
|
||||||
change = change/current * 100
|
change = abs(change)/current * 100
|
||||||
|
|
||||||
change = str(change) + '%'
|
change = str(change) + '%'
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user