Skip to content

Commit 2b025b3

Browse files
StefanStefan
authored andcommitted
[v0.7]
* Added bluetooth status (with vibe on disconnect) * Time (HH:MM) can now be show on tab. * The color for time (HH:MM) can now be selected as "legible".
1 parent b14a52f commit 2b025b3

File tree

10 files changed

+198
-79
lines changed

10 files changed

+198
-79
lines changed

Fibonacci_Clock.pbw

1.25 KB
Binary file not shown.

Fibonacci_Clock.png

256 Bytes
Loading

Sample.xcf

4.82 KB
Binary file not shown.

Todo.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ Found Fixed Description
33
N/A [ ] N/A
44

55
New features:
6-
Description
6+
Done Description
7+
[ ] "Zoom" to fit width
78
[ ] Rotate the image 90� counter-clockwise, to for text info above/below
89
(Tried it, but it became too small, I think. Code #ifdef'ed out)
910

1011
[ ] View date, month and week number
11-
[ ] View bluetooth status
1212
[ ] Random between valid ways of colouring the boxes.
13-
[ ] CONFIG: show/hide time layer (HH:MM as text)
14-
[ ] CONFIG: show/hide bluetooth status
15-
[ ] CONFIG: show/hide battery status
16-
[ ] CONFIG: show/hide spiral
17-
[ ] CONFIG: color selection for hour/minute/both/spiral/background/grid/dots
13+
[ ] Better looking color selection on config page (that show all colors on phone)

appinfo.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"ShowTime": 1,
1717
"ShowWeekNum": 4,
1818
"SpiralColor": 12,
19-
"TimeColor": 16
19+
"TimeColor": 16,
20+
"VibeBluetooth": 18
2021
},
2122
"capabilities": [
2223
"configurable"
@@ -27,20 +28,30 @@
2728
"resources": {
2829
"media": [
2930
{
30-
"file": "images/charging.png",
31-
"name": "IMAGE_CHARGING",
31+
"file": "images/cross.png",
32+
"name": "IMAGE_CROSS",
3233
"type": "png"
3334
},
3435
{
35-
"file": "images/battery.png",
36-
"name": "IMAGE_BATTERY",
36+
"file": "images/bluetooth.png",
37+
"name": "IMAGE_BLUETOOTH",
3738
"type": "png"
3839
},
3940
{
4041
"file": "images/plugged.png",
4142
"name": "IMAGE_PLUGGED",
4243
"type": "png"
4344
},
45+
{
46+
"file": "images/charging.png",
47+
"name": "IMAGE_CHARGING",
48+
"type": "png"
49+
},
50+
{
51+
"file": "images/battery.png",
52+
"name": "IMAGE_BATTERY",
53+
"type": "png"
54+
},
4455
{
4556
"file": "images/MenuIcon.png",
4657
"menuIcon": true,
@@ -55,7 +66,7 @@
5566
"basalt"
5667
],
5768
"uuid": "1289bd91-5811-40a5-a270-e8f97c126f18",
58-
"versionLabel": "0.6",
69+
"versionLabel": "0.7",
5970
"watchapp": {
6071
"watchface": true
6172
}

config/config.htm

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,32 @@
44
<script>
55
var elementIds = [
66
"ShowTime", /* "ShowDate", "ShowMonth", "ShowWeekNum", */ "ShowCharge",
7-
/* "ShowBluetooth", */ "ShowSpiral", "HourColor", "MinuteColor", "HourMinuteColor",
7+
"ShowBluetooth", "ShowSpiral", "HourColor", "MinuteColor", "HourMinuteColor",
88
"NoneColor", "SpiralColor", "BackgroundColor", "GridColor", "DotColor",
9-
"TimeColor", "OutlineColor"
9+
"TimeColor", "OutlineColor", "VibeBluetooth"
1010
];
1111

1212
var defValue = [
1313
0, // ShowTime
1414
/*
15-
0, // ShowDate
16-
0, // ShowMonth
17-
0, // ShowWeekNum
18-
*/
19-
1, // ShowCharge
20-
// 0, // ShowBluetooth
21-
1, // ShowSpiral
22-
48, // HourColor
23-
12, // MinuteColor
24-
3, // HourMinuteColor
15+
0, // ShowDate
16+
0, // ShowMonth
17+
0, // ShowWeekNum
18+
*/
19+
1, // ShowCharge
20+
1, // ShowBluetooth
21+
1, // ShowSpiral
22+
48, // HourColor
23+
12, // MinuteColor
24+
3, // HourMinuteColor
2525
63, // NoneColor
26-
56, // SpiralColor
27-
0, // BackgroundColor
28-
0, // GridColor
29-
63, // DotColor
30-
27, // TimeColor
31-
21 // OutlineColor
26+
56, // SpiralColor
27+
0, // BackgroundColor
28+
0, // GridColor
29+
63, // DotColor
30+
64, // TimeColor
31+
21, // OutlineColor
32+
1 // VibeBluetooth
3233
];
3334

3435

@@ -54,7 +55,7 @@
5455
"Red", "Folly", "FashionMagenta", "Magenta", "Orange", "SunsetOrange", "BrilliantRose", "ShockingPink",
5556
"ChromeYellow", "Rajah", "Melon", "RichBrilliantLavender", "Yellow", "Icterine", "PastelYellow", "White"
5657
];
57-
58+
5859
for (var i = 0; i < 64; i++) {
5960
var opt = document.createElement('option');
6061
var hexR = expColor((i >> 4) & 0x03);
@@ -68,24 +69,29 @@
6869
}
6970
opt.setAttribute("style", "background-color:#" + rgb2hex(hexR, hexG, hexB) + "; color:#" + txtCol)
7071
opt.setAttribute("value", 192 + i)
71-
if (i == 5) opt.setAttribute("selected", true);
7272
opt.innerHTML = colors[i];
7373
element.appendChild(opt);
7474
}
75+
if (element.id == "TimeColor") {
76+
var opt = document.createElement('option');
77+
opt.setAttribute("value", 256)
78+
opt.innerHTML = "(Legible color)";
79+
element.appendChild(opt);
80+
}
7581
}
7682

7783
function OnLoadHandler() {
7884
document.getElementById("Save").addEventListener("click", SaveHandler);
7985
for (var id in elementIds) {
8086
var element = document.getElementById(elementIds[id]);
81-
var def = localStorage.getItem(elementIds[id]);
87+
var def = localStorage.getItem(elementIds[id]);
8288
if (document.getElementById(elementIds[id] + "Preview")) {
8389
AddColorOptions(element);
8490
element.addEventListener("change", UpdatePreviews);
85-
if (def) def = def - 192;
86-
}
87-
if (!def) def = defValue[id];
88-
element.options[def].selected = true;
91+
if (def) def = def - 192;
92+
}
93+
if (!def) def = defValue[id];
94+
element.options[def].selected = true;
8995
}
9096
UpdatePreviews();
9197
};
@@ -133,6 +139,7 @@ <h1>Fibonacci Clock Settings</h1>
133139
<p><select id="ShowTime">
134140
<option value="0">Hide</option>
135141
<option value="1">Show</option>
142+
<option value="2">Show on tap</option>
136143
</select> time with digits</p>
137144
<!--
138145
<p><select id="ShowDate">
@@ -154,12 +161,17 @@ <h1>Fibonacci Clock Settings</h1>
154161
<option value="0">Hide</option>
155162
<option value="1">Show</option>
156163
</select> battery charge</p>
157-
<!--
164+
158165
<p><select id="ShowBluetooth">
159166
<option value="0">Hide</option>
160167
<option value="1">Show</option>
161168
</select> bluetooth connection</p>
162-
-->
169+
170+
<p><select id="VibeBluetooth">
171+
<option value="0">Silent</option>
172+
<option value="1">Vibe</option>
173+
</select> when loosing bluetooth connection</p>
174+
163175
<p><select id="ShowSpiral">
164176
<option value="0">Hide</option>
165177
<option value="1">Show</option>

resources/images/bluetooth.png

486 Bytes
Loading

resources/images/cross.png

634 Bytes
Loading

0 commit comments

Comments
 (0)