DeNews 3.2 – Improvement: Complete headline scrolling I've modified DeNews 3.1 so that all three headlines scroll completely before switching to the next AWTRIX app. Previously, the global app rotation timer (e.g. 6 seconds) interrupted the scrolling text. Version 3.2 pauses rotation while displaying the headlines and resumes it automatically after the last headline. Successfully tested on AWTRIX NG / Ulanzi TC002. Changes to the existing script: Change version to # @version 3.2 Add var done to the class variables and self.done = false in init(). Add this check at the beginning of loop(): if self.done self.done = false rotation.resume() rotation.next() return end Replace on_show() and add on_hide(): def on_show() self.pos = 0 self.frame = 0 self.index = 0 self.done = false if size(self.headlines) > 0 self.cols = self.render(self.headlines[0]) end rotation.pause() end def on_hide() rotation.resume() end Replace the scrolling section in draw() (starting at # Weiterschieben) with: if !self.done self.frame += 1 var step = int(store.get("step")) if step < 1 step = 1 end if self.frame >= step self.frame = 0 self.pos += 1 if self.pos > n + w self.pos = 0 if size(self.headlines) > 0 if self.index + 1 < size(self.headlines) self.index += 1 self.cols = self.render(self.headlines[self.index]) else self.done = true end else self.done = true end end end end No changes to RSS feeds, fonts, or user settings are required. Existing functionality is preserved. This allows the original DeNews app to be updated without publishing a separate version in the Hub.
ScriptAWTRIX NG
DE News v3.1
On an AWTRIX display
On your display
NEW Feed von 5 Quellen als 5x7 Pixel Laufschrift
Which AWTRIX do you have?
See below where it runs, or choose your device.
- Topic
- News
- Includes
- Script
Runs on
- Does not run on 32×8 (TC001 & DIY) Made for 52×16 (TC002).
- Runs on 52×16 (TC002)
- Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.
Choose your display in the next step.
Script description
News Feed von "Quelle: 1=Tagesschau; 2=SPIEGEL; 3=FAZ; 4=WELT; 5=BILD"
Sign in to view and copy the code of this script.
Have an idea?
Sign in to ask questions and join the conversation.