We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 656294b commit 0d7fb84Copy full SHA for 0d7fb84
modules/Dial_Display.js
@@ -0,0 +1,24 @@
1
+let dialDisplayGenerator = function(options) {
2
+
3
+ let dialDisplay = function(step, previousValue) {
4
+ if (!previousValue) previousValue = 0;
5
+ let currentValue = previousValue + step;
6
+ g.clear().reset().setFont("Vector:30");
7
+ g.drawString(currentValue);
8
9
+ return currentValue;
10
+ }
11
+ return dialDisplay;
12
+}
13
14
+let options = {};
15
+let dialDisplay = dialDisplayGenerator(options);
16
+let value = 0;
17
18
+let cb = (step)=>{
19
+ print(step);
20
+ value = dialDisplay(step, value);
21
+};
22
23
+let dial = require("Dial")(cb);
24
+Bangle.on("drag", dial);
0 commit comments