Derive vibes from triangle

This commit is contained in:
2026-08-10 21:40:50 -04:00
parent 1f9bcef899
commit 28bca460c5
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -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!
+6 -1
View File
@@ -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) {