From 28bca460c5aac836af799610b772fa8d5f4987ef Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 10 Aug 2026 21:40:50 -0400 Subject: [PATCH] Derive vibes from triangle --- README.md | 4 ++++ src/c/main.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae613a9..c0b3830 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,7 @@ The alarm cannot be stopped until you solve for theta in a randomized right tria ## Why Trigonometry? Because it requires the perfect amount of thought to activate your brain in the morning. If the app gave you a more typical math problem, you could just mindlessly punch it into a calculator. Trigonometry still requires a base amount of thought ("Do I need sine, cosine, or tangent?") before a calculator is of any use. + +## Some Neat Stuff +- The vibration pattern is randomized. It derives the length of the three pulses from the angles in the generated triangle. Neat! +- A custom font was made to satisfy the need for something that looks like LECO but is monospaced. The version I made contains only numbers, period, and colon, but if you want to build off of it, [it's public](https://git.wetfence.xyz/RandyTheSilly/pebble-misc/src/branch/main/fonts) and easy to modify! diff --git a/src/c/main.c b/src/c/main.c index 934f0c3..99c00d8 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -143,7 +143,12 @@ static void alarm_seconds_handler(struct tm *tick_time, TimeUnits units_changed) snprintf(s_stopwatch_buffer, sizeof(s_stopwatch_buffer), "%02u:%02u", s_stopwatch_time[0], s_stopwatch_time[1]); text_layer_set_text(s_counter_txt_layer, s_stopwatch_buffer); - vibes_short_pulse(); + uint32_t vibe_segments[5] = {s_triangle_layer->angle_A * 2, 200, s_triangle_layer->angle_B * 2, 200, s_triangle_layer->angle_C * 2}; + VibePattern pat = { + .durations = vibe_segments, + .num_segments = ARRAY_LENGTH(vibe_segments), + }; + vibes_enqueue_custom_pattern(pat); } static void graph_layer_update_proc(Layer *layer, GContext *ctx) {