-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
182 additions
and
154 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
HID=./hid | ||
OUTPUT_CONTROL=0x1019 | ||
EQ_GAIN_LOW=0x10D7 | ||
EQ_GAIN_HIGH=0x10D8 | ||
DSP_ENABLE_R1=0x117A | ||
DSP_ENABLE_R2=0x117B | ||
DSP_INIT_1=0x117C | ||
DSP_INIT_2=0x117D | ||
|
||
$HID w $OUTPUT_CONTROL 0x88 | ||
$HID w $EQ_GAIN_LOW 0xB2 | ||
$HID w $EQ_GAIN_HIGH 0x3F | ||
$HID w $DSP_ENABLE_R1 0x05 | ||
$HID w $DSP_INIT_2 0x1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
|
||
# ### tools ### | ||
from itools import * | ||
|
||
# ### watches classes ### | ||
from watches import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
#!/bin/python | ||
|
||
# ############################################################### | ||
# | ||
# Imports | ||
# | ||
# ############################################################### | ||
|
||
import kivy | ||
kivy.require('1.9.0') | ||
|
||
from kivy.clock import Clock | ||
from kivy.graphics import Color, Line, Rectangle, Ellipse | ||
from kivy.uix.floatlayout import FloatLayout | ||
from kivy.uix.label import Label | ||
from kivy.uix.screenmanager import Screen | ||
from kivy.uix.widget import Widget | ||
|
||
from math import cos, sin, pi | ||
|
||
import datetime | ||
|
||
|
||
|
||
############################################################### | ||
# | ||
# Declarations | ||
# | ||
# ############################################################### | ||
|
||
ACTIVE_DISPLAY_BACKGROUND = Color(.0,.0,.9) | ||
INACTIVE_DISPLAY_BACKGROUND = Color(.0,.0,.0) | ||
|
||
|
||
# ############################################################### | ||
# | ||
# Classes | ||
# | ||
# ############################################################### | ||
|
||
class DigiClockWidget(FloatLayout): | ||
"Clock class - digital" | ||
pass | ||
|
||
|
||
# ############################################################################## | ||
|
||
class DigiClock(Label): | ||
"Label with date & time" | ||
def __init__(self, **kwargs): | ||
super(DigiClock, self).__init__(**kwargs) | ||
Clock.schedule_interval(self.update, 1) | ||
|
||
def update(self, *args): | ||
t = datetime.datetime.now() | ||
self.text = t.strftime("%H:%M:%S") | ||
# if int(t.strftime('%S')) % 2: | ||
# self.text = t.strftime("%H:%M:%S") | ||
# else: | ||
# self.text = t.strftime("%H:%M.%S") | ||
|
||
|
||
# ############################################################################## | ||
|
||
class MyClockWidget(FloatLayout): | ||
"Clock class - analog" | ||
pass | ||
|
||
|
||
# ############################################################################## | ||
|
||
class SetScreen(Screen): | ||
"Settings screen" | ||
pass | ||
|
||
|
||
# ############################################################################## | ||
|
||
class Ticks(Widget): | ||
"Analog watches" | ||
# galleryIndex = 0 | ||
# gallery = [] | ||
# ln = Label() | ||
|
||
def __init__(self, **kwargs): | ||
super(Ticks, self).__init__(**kwargs) | ||
self.bind(pos = self.update_clock) | ||
self.bind(size = self.update_clock) | ||
|
||
# self.ln.pos = self.pos | ||
# self.ln.size = self.size | ||
# self.ln.font_size = '32sp' | ||
# self.ln.text_size = self.size | ||
# self.ln.halign = 'right' | ||
# self.ln.valign = 'bottom' | ||
# self.ln.markup = True | ||
|
||
Clock.schedule_interval(self.update_clock, 1) | ||
|
||
|
||
def update_clock(self, *args): | ||
time = datetime.datetime.now() | ||
self.canvas.clear() | ||
|
||
# self.remove_widget(self.ln) | ||
# self.ln.pos = self.pos | ||
# self.ln.size = self.size | ||
## self.ln.text = '[color=0000f0] ' + APP_NAME + ' [/color]' | ||
# self.ln.text_size = self.size | ||
# self.add_widget(self.ln) | ||
|
||
with self.canvas: | ||
Color(.1, .1, .6, .15) | ||
Ellipse(pos={self.y + 19,self.width / 4}, size={self.width / 2, self.height - 38}) | ||
|
||
Color(0.6, 0.6, 0.9) | ||
Line(points = [self.center_x, self.center_y, self.center_x+0.7*self.r*sin(pi/30*time.second), | ||
self.center_y+0.7*self.r*cos(pi/30*time.second)], width=1, cap="round") | ||
Color(0.5, 0.5, 0.8) | ||
Line(points = [self.center_x, self.center_y, self.center_x+0.6*self.r*sin(pi/30*time.minute), | ||
self.center_y+0.6*self.r*cos(pi/30*time.minute)], width=2, cap="round") | ||
Color(0.4, 0.4, 0.7) | ||
th = time.hour*60 + time.minute | ||
Line(points = [self.center_x, self.center_y, self.center_x+0.5*self.r*sin(pi/360*th), | ||
self.center_y+0.5*self.r*cos(pi/360*th)], width=3, cap="round") | ||
|
||
|
||
# ############################################################################## | ||
|
Oops, something went wrong.