added option to buzz on prime, with settings
parent
409cba80b9
commit
453895c134
|
|
@ -4,6 +4,12 @@ A watchface that displays time and its prime factors in the Lato font.
|
|||
For example when the time is 21:05, the prime factors are 5,421.
|
||||
Displays 'Prime Time!' when the time is a prime number.
|
||||
|
||||
There is a settings option added in the Settings App. If 'Buzz on
|
||||
Prime' is ticked then the buzzer will sound when 'Prime Time!' is
|
||||
detected. Note the buzzer is limited to between 8am and 8pm so it
|
||||
should not go off when you want to sleep.
|
||||
|
||||
|
||||

|
||||
|
||||
Written by: [Hugh Barney](https://github.com/hughbarney)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ function draw() {
|
|||
|
||||
g.setFontLatoSmall();
|
||||
g.drawString(primeStr, w/2, 3*h/4);
|
||||
|
||||
// Buzz if Prime Time and between 8am and 8pm
|
||||
if (settings.buzz_on_prime && primeStr == "Prime Time!" && intTime >= 800 && intTime <= 2000)
|
||||
buzzer(2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue