performance improvments
This commit is contained in:
parent
99a0d744a1
commit
bf61c43a65
@ -1,4 +1,4 @@
|
|||||||
symbol,name,base,current,24hr change
|
symbol,name,base,current,24hr change
|
||||||
BTC,bitcoin,usd,32909,-5.27349177462667
|
BTC,bitcoin,usd,32537,-2.3240271926474465
|
||||||
ETH,ethereum,gbp,1567.8,-8.93621241035941
|
ETH,ethereum,gbp,1416.58,-4.239934826025793
|
||||||
DOGE,dogecoin,usd,0.211789,-8.771137919593707
|
DOGE,dogecoin,usd,0.198075,-3.4900700142218035
|
||||||
|
|
@ -1 +1 @@
|
|||||||
["USD", {"AUD": [1.3479, 1.328], "CAD": [1.2581, 1.2432], "CHF": [0.91662, 0.92275], "EUR": [0.84474, 0.84524], "GBP": [0.7276, 0.72268], "JPY": [109.74, 110.61], "NZD": [1.4401, 1.4166]}]
|
["USD", {"AUD": [1.3374, 1.3405], "CAD": [1.2481, 1.2498], "CHF": [0.91667, 0.91563], "EUR": [0.84431, 0.84374], "GBP": [0.72204, 0.72199], "JPY": [110.22, 110.15], "NZD": [1.4337, 1.436]}]
|
@ -1 +1 @@
|
|||||||
[{"main_weather": "Clear", "description": "clear sky", "temp": 28.37, "min_temp": 28.14, "max_temp": 30.06, "feels_like": 34.15, "humidity": 86, "clouds": 5, "wind_speed": 0.45, "wind_direction": 281, "visibility": 10000, "uv": 0, "rain_chance": 0}, {"main_weather": "Clouds", "description": "broken clouds", "temp": 19.26, "min_temp": 12.56, "max_temp": 21.12, "feels_like": 19.25, "humidity": 77, "clouds": 57, "wind_speed": 3.09, "wind_direction": 230, "visibility": 10000, "uv": 0.18, "rain_chance": 0.3}]
|
[{"main_weather": "Clouds", "description": "overcast clouds", "temp": 29.14, "min_temp": 29.07, "max_temp": 30.95, "feels_like": 35.13, "humidity": 80, "clouds": 89, "wind_speed": 0.89, "wind_direction": 135, "visibility": 10000, "uv": 0, "rain_chance": 0}, {"main_weather": "Clouds", "description": "scattered clouds", "temp": 20.47, "min_temp": 14.03, "max_temp": 22.37, "feels_like": 20.48, "humidity": 73, "clouds": 40, "wind_speed": 4.12, "wind_direction": 350, "visibility": 10000, "uv": 0.18, "rain_chance": 0.62}]
|
@ -1 +1 @@
|
|||||||
[[{"main_weather": "Clear", "description": "clear sky", "min_temp": 28.14, "max_temp": 30.06}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 27.59, "max_temp": 29.94}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.95, "max_temp": 29.92}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.98, "max_temp": 30.06}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.99, "max_temp": 29.64}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.95, "max_temp": 29.61}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 27.89, "max_temp": 30}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.51, "max_temp": 30}], [{"main_weather": "Rain", "description": "light rain", "min_temp": 12.56, "max_temp": 21.12}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 12.98, "max_temp": 21.57}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.06, "max_temp": 15.61}, {"main_weather": "Rain", "description": "light rain", "min_temp": 11.89, "max_temp": 19.79}, {"main_weather": "Rain", "description": "heavy intensity rain", "min_temp": 13.67, "max_temp": 16.51}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.47, "max_temp": 21.12}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.57, "max_temp": 22.15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.44, "max_temp": 22.67}]]
|
[[{"main_weather": "Clouds", "description": "few clouds", "min_temp": 29.07, "max_temp": 30.95}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.62, "max_temp": 30.79}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.02, "max_temp": 30.91}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.06, "max_temp": 30.42}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27, "max_temp": 28.33}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.13, "max_temp": 29.29}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.39, "max_temp": 29.93}, {"main_weather": "Rain", "description": "light rain", "min_temp": 28.89, "max_temp": 31.24}], [{"main_weather": "Rain", "description": "light rain", "min_temp": 14.03, "max_temp": 22.37}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.6, "max_temp": 22.64}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 14.84, "max_temp": 22.03}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 12.38, "max_temp": 24.02}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 14.95, "max_temp": 26.2}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 15.51, "max_temp": 27.33}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 16.25, "max_temp": 25.9}, {"main_weather": "Clear", "description": "clear sky", "min_temp": 14.61, "max_temp": 23.59}]]
|
@ -1 +0,0 @@
|
|||||||
{"stocks": "08/07/2021 15:27:24", "crypto": "08/07/2021 15:27:24", "news": "08/07/2021 15:27:24", "weather": "08/07/2021 15:27:24", "forex": "08/07/2021 21:27:24", "sports": "08/07/2021 15:27:24"}
|
|
40
csv/news.csv
40
csv/news.csv
@ -1,21 +1,21 @@
|
|||||||
headline,source,date,time
|
headline,source,date,time
|
||||||
Scientists reveal how cauliflowers develop their unique shape - The Irish News,The Irish News,2021-07-08,18:32:22Z
|
BREAKING: Senate okays 20-year jail for candidates snatching ballot materials - The Punch,The Punch,2021-07-13,16:35:23Z
|
||||||
A peek inside a flying bat's brain uncovers clues to mammalian navigation - EurekAlert,EurekAlert,2021-07-08,18:24:36Z
|
The rat's whiskers: Multidisciplinary research reveals how we sense texture: Mathematicians and neuroscientists achieve breakthrough in understanding how whiskers 'amplify' texture - Science Daily,Science Daily,2021-07-13,16:30:30Z
|
||||||
Winnipeg man charged with murder in stabbing of 3-year-old daughter - CBC.ca,CBC News,2021-07-08,18:04:39Z
|
2 officers injured and homicide suspect dead in shooting near Baltimore mall^ police say - CNN ,CNN,2021-07-13,16:25:00Z
|
||||||
For The First Time^ Scientists Have Connected a Superconductor to a Semiconductor - ScienceAlert,ScienceAlert,2021-07-08,18:03:07Z
|
Elon Musk Returns to Court to Defend Tesla’s SolarCity Purchase - The Wall Street Journal,The Wall Street Journal,2021-07-13,16:25:00Z
|
||||||
86 more COVID-19 cases^ 3 new deaths reported in Manitoba Thursday - CBC.ca,CBC News,2021-07-08,18:01:31Z
|
INEC: Fayose^ others commend Senate on Onochie’s rejection - Punch Newspapers,The Punch,2021-07-13,16:22:09Z
|
||||||
It’s Cold in the Ocean but It’s Hotter Inside Every Sea Otter - The New York Times,New York Times,2021-07-08,18:00:11Z
|
Emmy Nominations: ‘The Crown’^ ‘The Mandalorian’ Top List; HBO/HBO Max Edges Netflix For Top Spot – Full List Of Nominees - Deadline,Deadline,2021-07-13,16:22:00Z
|
||||||
A peek inside a flying bat's brain uncovers clues to mammalian navigation - Phys.org,Phys.Org,2021-07-08,18:00:08Z
|
Foreign aid: Boris Johnson sees off Tory rebellion over cut to overseas aid budget - Sky News,Sky.com,2021-07-13,16:18:45Z
|
||||||
COVID-19 live updates: Quebec will implement a 'vaccination passport' by Sept. 1^ Dubé says - Montreal Gazette,Montreal Gazette,2021-07-08,18:00:00Z
|
Emmys 2021: The Crown and The Mandalorian lead Emmy nominations - BBC News,BBC News,2021-07-13,16:08:37Z
|
||||||
What a 51^000-year-old carved bone tells us about Neanderthals - CNET,CNET,2021-07-08,17:57:00Z
|
Windows 11 is full of delightful detail - The Verge,The Verge,2021-07-13,16:06:34Z
|
||||||
Diego Simeone: Atletico Madrid coach signs new three-year deal to remain in charge as head coach - Sky Sports,Sky Sports,2021-07-08,17:55:31Z
|
The best pre-workout foods - Diet - IOL,IOL,2021-07-13,16:00:54Z
|
||||||
Growth worries hit markets as US jobless claims rise; ECB sets 2% inflation target – as it happened - The Guardian,The Guardian,2021-07-08,17:47:52Z
|
The hunt for wormholes: How scientists look for space-time tunnels - Space.com,Space.com,2021-07-13,16:00:50Z
|
||||||
Microsoft patches remaining versions of Windows against PrintNightmare flaw - TechRepublic,TechRepublic,2021-07-08,17:46:00Z
|
Is a third dose of Covid-19 vaccines really needed to boost the immune response? - Scroll.in,Scroll.in,2021-07-13,16:00:00Z
|
||||||
Varun Dhawan Gives A Glimpse Of His Ripped Physique In New Pics. Anil Kapoor Comments - NDTV Movies,NDTV News,2021-07-08,17:39:10Z
|
OFW remittances post 2-digit growth in May - Philstar.com,Philippine Star,2021-07-13,16:00:00Z
|
||||||
Quebec to use vaccine passports to limit access to non-essential services if COVID-19 worsens - CTV Montreal,Ctvnews.ca,2021-07-08,17:35:02Z
|
COVID Cases In Parts Of Missouri And Arkansas Surge To Levels Not Seen Since Winter - NPR,NPR,2021-07-13,15:58:50Z
|
||||||
Cloud Computing Will Bring Big Changes to First-Person Shooters in 'Just a Couple Years^' DICE GM Says - IGN - IGN,IGN,2021-07-08,17:34:27Z
|
Rapper shot as many as 64 times as he walked out of Chicago jail - NBC News,NBC News,2021-07-13,15:51:12Z
|
||||||
Purdue Pharma exit plan gains steam with OK from more states - Associated Press,Associated Press,2021-07-08,17:33:30Z
|
Gene editing 'blocks virus transmission' in human cells - Guardian,Guardian Nigeria,2021-07-13,15:47:19Z
|
||||||
Repurposed communications satellites could help save humanity from an asteroid impact - Space.com,Space.com,2021-07-08,17:33:18Z
|
How Canada's athletes are training for what could be the hottest Olympics - CBC.ca,CBC News,2021-07-13,15:45:17Z
|
||||||
Haiti faces mounting questions after assassination of president - CBC.ca,CBC News,2021-07-08,17:32:54Z
|
Biafra: Nnamdi Kanu in need of quick^ advanced medical attention – Lawyer - Daily Post Nigeria,Daily Post Nigeria,2021-07-13,15:45:00Z
|
||||||
Fitbit co-founder: 'we lead and others follow' – here's where it's heading next - Wareable,Wareable,2021-07-08,17:31:45Z
|
COVID-19: UK reports 36^660 new coronavirus cases and 50 more deaths - Sky News,Sky.com,2021-07-13,15:45:00Z
|
||||||
Man charged following truck being driven onto Manitoba Legislature steps - CTV News,Ctvnews.ca,2021-07-08,17:31:35Z
|
Euro 2020: Uefa opens disciplinary proceedings against England after Italy final - The Independent,Independent,2021-07-13,15:43:15Z
|
||||||
|
|
@ -1 +1 @@
|
|||||||
[{"date": "2021-07-08", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "1", "away_team": "Montreal Canadiens", "away_score": "0"}]
|
[]
|
@ -1 +1 @@
|
|||||||
[{"date": "2021-07-08", "time": "00:00", "progess": "", "status": "FT", "home_team": "Tampa Bay Lightning", "home_score": "1", "away_team": "Montreal Canadiens", "away_score": "0"}]
|
[]
|
@ -1 +1 @@
|
|||||||
[{"date": "2021-07-06", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-07-03", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "6"}, {"date": "2021-07-01", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "3", "away_team": "Montreal Canadiens", "away_score": "1"}, {"date": "2021-06-29", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "5", "away_team": "Montreal Canadiens", "away_score": "1"}, {"date": "2021-06-26", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "1", "away_team": "New York Islanders", "away_score": "0"}, {"date": "2021-06-25", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-24", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-23", "time": "01:00:00", "round": "0", "home_team": "Vegas Golden Knights", "home_score": "1", "away_team": "Montreal Canadiens", "away_score": "4"}, {"date": "2021-06-22", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "8", "away_team": "New York Islanders", "away_score": "0"}, {"date": "2021-06-21", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "1", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-20", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-19", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-18", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "1", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-17", "time": "01:00:00", "round": "0", "home_team": "Vegas Golden Knights", "home_score": "2", "away_team": "Montreal Canadiens", "away_score": "3"}, {"date": "2021-06-16", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "4", "away_team": "New York Islanders", "away_score": "2"}]
|
[{"date": "2021-07-08", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "1", "away_team": "Montreal Canadiens", "away_score": "0"}, {"date": "2021-07-06", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-07-03", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "6"}, {"date": "2021-07-01", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "3", "away_team": "Montreal Canadiens", "away_score": "1"}, {"date": "2021-06-29", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "5", "away_team": "Montreal Canadiens", "away_score": "1"}, {"date": "2021-06-26", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "1", "away_team": "New York Islanders", "away_score": "0"}, {"date": "2021-06-25", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-24", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-23", "time": "01:00:00", "round": "0", "home_team": "Vegas Golden Knights", "home_score": "1", "away_team": "Montreal Canadiens", "away_score": "4"}, {"date": "2021-06-22", "time": "00:00:00", "round": "0", "home_team": "Tampa Bay Lightning", "home_score": "8", "away_team": "New York Islanders", "away_score": "0"}, {"date": "2021-06-21", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "1", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-20", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "3", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-19", "time": "00:00:00", "round": "0", "home_team": "Montreal Canadiens", "home_score": "3", "away_team": "Vegas Golden Knights", "away_score": "2"}, {"date": "2021-06-18", "time": "00:00:00", "round": "0", "home_team": "New York Islanders", "home_score": "1", "away_team": "Tampa Bay Lightning", "away_score": "2"}, {"date": "2021-06-17", "time": "01:00:00", "round": "0", "home_team": "Vegas Golden Knights", "home_score": "2", "away_team": "Montreal Canadiens", "away_score": "3"}]
|
@ -1,4 +1,4 @@
|
|||||||
name,current,opening
|
name,current,opening
|
||||||
MSFT,277.49,276.9
|
MSFT,280.75,277.5
|
||||||
NFLX,532.47,531.17
|
NFLX,540.99,535.53
|
||||||
GOOG,2585.06,2564.005
|
GOOG,2628.34,2617.28
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -54,7 +54,7 @@ class StockTicker():
|
|||||||
options.chain_length = 2
|
options.chain_length = 2
|
||||||
options.parallel = 1
|
options.parallel = 1
|
||||||
options.hardware_mapping = 'adafruit-hat' # If you have an Adafruit HAT: 'adafruit-hat'
|
options.hardware_mapping = 'adafruit-hat' # If you have an Adafruit HAT: 'adafruit-hat'
|
||||||
options.gpio_slowdown = 3
|
options.gpio_slowdown = 4
|
||||||
self.matrix = RGBMatrix(options = options)
|
self.matrix = RGBMatrix(options = options)
|
||||||
self.points = True # display crypto change in points or percent
|
self.points = True # display crypto change in points or percent
|
||||||
self.functions = {'stocks': self.getStockImage, 'crypto': self.getCryptoImage, 'forex': self.getForexImage,
|
self.functions = {'stocks': self.getStockImage, 'crypto': self.getCryptoImage, 'forex': self.getForexImage,
|
||||||
@ -229,6 +229,7 @@ class StockTicker():
|
|||||||
return kill
|
return kill
|
||||||
|
|
||||||
def scrollFunctionsAnimated(self, options, animation = 'continuous'):
|
def scrollFunctionsAnimated(self, options, animation = 'continuous'):
|
||||||
|
|
||||||
# scrolls trhough all functions with animation. Updates functions and remakes images when each function not being dispplayed
|
# scrolls trhough all functions with animation. Updates functions and remakes images when each function not being dispplayed
|
||||||
|
|
||||||
self.updateMultiple([options[0]])
|
self.updateMultiple([options[0]])
|
||||||
@ -248,6 +249,7 @@ class StockTicker():
|
|||||||
image2 = self.openImage('./display_images/' + options[(i + 1) % len(options)] +'.ppm')
|
image2 = self.openImage('./display_images/' + options[(i + 1) % len(options)] +'.ppm')
|
||||||
|
|
||||||
img_width, img_height = image.size
|
img_width, img_height = image.size
|
||||||
|
double_buffer = self.matrix.CreateFrameCanvas()
|
||||||
offset_x = 0
|
offset_x = 0
|
||||||
if animation == 'traditional':
|
if animation == 'traditional':
|
||||||
offset_x = 128
|
offset_x = 128
|
||||||
@ -285,7 +287,9 @@ class StockTicker():
|
|||||||
|
|
||||||
|
|
||||||
offset_y -= 1
|
offset_y -= 1
|
||||||
self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
double_buffer.SetImage(image.convert('RGB'), offset_x, offset_y)
|
||||||
|
|
||||||
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
|
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
kill = self.checkKilled()
|
kill = self.checkKilled()
|
||||||
@ -305,7 +309,9 @@ class StockTicker():
|
|||||||
frame +=1
|
frame +=1
|
||||||
|
|
||||||
pause_frames -=1
|
pause_frames -=1
|
||||||
self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
double_buffer.SetImage(image.convert('RGB'), offset_x)
|
||||||
|
|
||||||
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
|
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
kill = self.checkKilled()
|
kill = self.checkKilled()
|
||||||
@ -329,7 +335,9 @@ class StockTicker():
|
|||||||
frame +=1
|
frame +=1
|
||||||
|
|
||||||
offset_y += 1
|
offset_y += 1
|
||||||
self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
double_buffer.SetImage(image.convert('RGB'), offset_x, offset_y)
|
||||||
|
|
||||||
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
|
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
kill = self.checkKilled()
|
kill = self.checkKilled()
|
||||||
@ -351,7 +359,9 @@ class StockTicker():
|
|||||||
frame +=1
|
frame +=1
|
||||||
|
|
||||||
pause_frames -=1
|
pause_frames -=1
|
||||||
self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
double_buffer.SetImage(image.convert('RGB'), offset_x)
|
||||||
|
|
||||||
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
|
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
kill = self.checkKilled()
|
kill = self.checkKilled()
|
||||||
@ -377,23 +387,24 @@ class StockTicker():
|
|||||||
offset_x -= 1
|
offset_x -= 1
|
||||||
|
|
||||||
|
|
||||||
# remove the ppixels behind the image, to stop trailing
|
|
||||||
for x in range(0,offset_x ):
|
#self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
||||||
for y in range(self.matrix.height):
|
double_buffer.SetImage(image.convert('RGB'), offset_x)
|
||||||
self.matrix.SetPixel(x , y , 0,0,0)
|
|
||||||
self.setImage(image.convert('RGB'), offset_x = offset_x, offset_y = offset_y)
|
|
||||||
|
|
||||||
|
|
||||||
buff = 0
|
buff = 0
|
||||||
if offset_x + img_width + buff< self.matrix.width and animation == 'continuous': # if the image is ending
|
if offset_x + img_width + buff< self.matrix.width and animation == 'continuous': # if the image is ending
|
||||||
self.setImage(image2, offset_x = offset_x + img_width + buff, offset_y = offset_y)
|
double_buffer.SetImage(image.convert('RGB'), offset_x + img_width + buff)
|
||||||
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# remove the ppixels behind the image, to stop trailing
|
# remove the ppixels behind the image, to stop trailing
|
||||||
for x in range(offset_x + img_width, 128):
|
double_buffer = self.matrix.SwapOnVSync(double_buffer)
|
||||||
for y in range(self.matrix.height):
|
for y in range(self.matrix.height):
|
||||||
|
self.matrix.SetPixel(offset_x + img_width , y , 0,0,0)
|
||||||
|
self.matrix.SetPixel(offset_x + img_width +1 , y , 0,0,0)
|
||||||
self.matrix.SetPixel(x , y , 0,0,0)
|
self.matrix.SetPixel(offset_x + img_width +2 , y , 0,0,0)
|
||||||
|
|
||||||
time.sleep(self.delay)
|
time.sleep(self.delay)
|
||||||
kill = self.checkKilled()
|
kill = self.checkKilled()
|
||||||
@ -2015,7 +2026,7 @@ if __name__ == '__main__':
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
#
|
#
|
||||||
#stock_ticker.process_msg('S')
|
#stock_ticker.process_msg('A')
|
||||||
#stock_ticker.process_msg('G')
|
#stock_ticker.process_msg('G')
|
||||||
#stock_ticker.process_msg('f')
|
#stock_ticker.process_msg('f')
|
||||||
#stock_ticker.process_msg('W')
|
#stock_ticker.process_msg('W')
|
||||||
|
Loading…
Reference in New Issue
Block a user