Analog clock

User avatar
andym02
Advanced User
Posts: 923
Joined: 06 Mar 2014 19:18
Location: Belgravistan
Contact:

Analog clock

Unread postby andym02 » 12 Mar 2017 08:15

Cei care au aparate din gama G.Blue stiu ca pe img. OpenMips exista un plugin care-ti ofera posibilitatea sa schimbi / folosesti pe display'ul aparatului mai multe variante de " ceasuri " analog si digitale .
Incerc sa folosesc pe img OpenATV acelasi plugin , insa fara prea mare reusita .
Am schimbat manual ( intuitiv ) cateva fisiere , insa "reusita " a fost nesatisfacatoare .
Pe Mips locatia este /usr/share/enigma2/lcd
Pe ATV locatia este /usr/share/enigma2/display ( in acest fisier se install pluginul ) , cu totul diferit de Mips.
Care doreste sa dea un sfat , este binevenit !
:tnks: :goodj
User avatar
Meridian
Gold User
Posts: 2314
Joined: 24 Sep 2013 12:43
Location: Andromeda

Re: Analog clock

Unread postby Meridian » 12 Mar 2017 12:49

@andym02 - Ai la download toate ceasurile de la GigaBlue! Se pune in locatia: /usr/share/enigma2/display, imaginea ceasului analog in format .png si fisierul corespunzator .xml

P.S: Altceva nu se mai pune in folderul display! Se ajunge pe aparat la setari astfel: Menu, Setup, Usage & GUI, Display, Display Settings
P.P.S: Cand am instalat la mine versiunea 5.1, nu am intampinat probleme! Am pus doar la display imaginea .png si fisierul .xml! E posibil sa aiba legatura si cu locatia: enigma2/lib/python/Components

Trebuie sa ai in locatia enigma2/lib/python/Components si fisierul Clock.py

Code: Select all

from HTMLComponent import HTMLComponent
from GUIComponent import GUIComponent
from VariableText import VariableText

from enigma import eTimer, eLabel

import time
# now some "real" components:

class Clock(VariableText, HTMLComponent, GUIComponent):
   def __init__(self):
      VariableText.__init__(self)
      GUIComponent.__init__(self)
      self.doClock()

      self.clockTimer = eTimer()
      self.clockTimer.callback.append(self.doClock)

   def onShow(self):
      self.doClock()
      self.clockTimer.start(1000)

   def onHide(self):
      self.clockTimer.stop()

   def doClock(self):
      t = time.localtime()
      timestr = "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec)
      self.setText(timestr)

   def createWidget(self, parent):
      return eLabel(parent)

   def removeWidget(self, w):
      del self.clockTimer

   def produceHTML(self):
      return self.getText()


Image

Download
******* Ich weiss, dass ich nichts weiss, und darum weiss ich mehr, als andere wissen! *******
Image
User avatar
Meridian
Gold User
Posts: 2314
Joined: 24 Sep 2013 12:43
Location: Andromeda

Re: Analog clock

Unread postby Meridian » 12 Mar 2017 19:00

@andym02 - Cum arata folderul "display" original la /usr/share/enigma2/display? Cel nemodificat! Cum arata el initial?
******* Ich weiss, dass ich nichts weiss, und darum weiss ich mehr, als andere wissen! *******
Image
User avatar
andym02
Advanced User
Posts: 923
Joined: 06 Mar 2014 19:18
Location: Belgravistan
Contact:

Re: Analog clock

Unread postby andym02 » 12 Mar 2017 20:12

N-a functionat varianta cu inlocuieste tot din display , cu acele doua fisiere .

Return to “Plugins, Skins, Tools”

Who is online

Users browsing this forum: No registered users and 14 guests