From 7bd0b44871d7916ab27d5e7c4d04b5db39976170 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 15 Oct 2025 21:14:19 +0200 Subject: [PATCH] Add overheat protection --- barista/Makefile | 14 +- barista/barista.ino | 40 +- barista/data/dry-heat-50-C.csv | 1886 ++++++++++++++++++++++++++++++++ barista/overheat.c | 52 + barista/overheat.h | 32 + barista/test/test_ntc.c | 3 + barista/test/test_overheat.c | 36 + 7 files changed, 2057 insertions(+), 6 deletions(-) create mode 100644 barista/data/dry-heat-50-C.csv create mode 100644 barista/overheat.c create mode 100644 barista/overheat.h create mode 100644 barista/test/test_overheat.c diff --git a/barista/Makefile b/barista/Makefile index 8dbe512..6112408 100644 --- a/barista/Makefile +++ b/barista/Makefile @@ -9,13 +9,20 @@ PROJ=barista BUILD=build/$(subst :,.,$(FQBN)) HEX=$(BUILD)/$(PROJ).ino.hex +SRC=barista.ino \ + ntc.c \ + ntc.h \ + pinout.h \ + overheat.c \ + overheat.h + # For host test programs CPPFLAGS=-I. LIBS=-lm all: $(HEX) -$(HEX): barista.ino ntc.c ntc.h pinout.h +$(HEX): $(SRC) arduino-cli compile $(OPTS) -e --fqbn $(FQBN) upload: $(HEX) @@ -24,11 +31,14 @@ upload: $(HEX) serial: picocom -b 9600 --lower-rts --lower-dtr /dev/ttyUSB0 --imap lfcrlf -test: test_ntc +test: test_ntc test_overheat test_ntc: test/test_ntc.o ntc.o gcc $^ -o $@ $(LIBS) +test_overheat: test/test_overheat.o overheat.o + gcc $^ -o $@ $(LIBS) + clean: rm -f test/test_ntc.o ntc.o diff --git a/barista/barista.ino b/barista/barista.ino index be73525..c0f3388 100644 --- a/barista/barista.ino +++ b/barista/barista.ino @@ -2,6 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ #include "ntc.h" +#include "overheat.h" #include "pinout.h" #include @@ -23,6 +24,7 @@ enum machine_state { HOT, BREWING, COOLING, + PANIC_OVERHEAT, }; //int state = SLEEPING; @@ -83,6 +85,9 @@ struct state { struct btn btn[MAX_BTN]; enum buzz_state buzz_state; unsigned long buzz_t0; + + struct overheat overheat; + unsigned long overheat_t0; } g_st; int read_input(int pin) @@ -133,6 +138,8 @@ void proc_ntc(struct state *state, const struct input *input) avg += state->ntc_array_T[i]; state->ntc_T = avg / MAX_SAMPLES; + + overheat_input(&state->overheat, millis(), state->ntc_T); } void proc_buttons(struct state *state, const struct input *input) @@ -169,10 +176,16 @@ void proc_buttons(struct state *state, const struct input *input) } } +/* In PANIC_OVERHEAT state wait at least TIME_OVERHEAT_COOL and until the + * temperature goes below TIME_OVERHEAT_TEMP before doing anything. */ +#define TIME_OVERHEAT_COOL 10000 /* ms */ +#define TIME_OVERHEAT_TEMP 40.0 /* °C */ + int red_min = 50; int red_state = red_min; -unsigned long brewing_time = 3000UL; /* 3 seconds */ -unsigned long cooling_time = 3000UL; /* 3 seconds */ +unsigned long brewing_time = 3000UL; /* 3 seconds */ +unsigned long cooling_time = 3000UL; /* 3 seconds */ +unsigned long overheat_time = 10000UL; /* 10 seconds */ unsigned long max_heating_time = 60000UL; /* 60 seconds */ unsigned long max_idle_time = 10000UL; /* 10 seconds */ @@ -192,6 +205,13 @@ void proc_machine(struct state *st) Serial.print(temp); Serial.println(" C"); + /* If the machine is overheating */ + if (overheat_panic(&st->overheat)) { + st->mstate = PANIC_OVERHEAT; + st->overheat_t0 = millis(); + Serial.println("PANIC OVERHEATING"); + } + /* Pressing ON cancels any operation */ if (st->mstate != SLEEPING && on) { st->mstate = SLEEPING; @@ -238,6 +258,13 @@ void proc_machine(struct state *st) st->heating_t0 = millis(); Serial.println("heating"); } + } else if (st->mstate == PANIC_OVERHEAT) { + /* Wait until it cools down and enough time has passed */ + if (st->ntc_T < TIME_OVERHEAT_TEMP && + millis() - st->overheat_t0 > TIME_OVERHEAT_COOL) { + st->mstate = SLEEPING; + Serial.println("sleeping"); + } } } @@ -278,18 +305,21 @@ output_leds(const struct state *st) if (r >= 255) r = 0; else - r += 3; + r += 5; } else if (st->mstate == HOT) { setled(PIN_LED_RED, 0); setled(PIN_LED_GREEN, 1); r = 0; + } else if (st->mstate == PANIC_OVERHEAT) { + setled(PIN_LED_RED, 1); + setled(PIN_LED_GREEN, 0); } else if (st->mstate == BREWING) { setled(PIN_LED_RED, 0); analogWrite(PIN_LED_GREEN, g); if (g >= 255) g = 0; else - g += 3; + g += 5; } else { setled(PIN_LED_RED, 0); setled(PIN_LED_GREEN, 0); @@ -343,6 +373,8 @@ void setup() relay(PIN_HEAT, OFF); relay(PIN_PUMP, OFF); + overheat_init(&g_st.overheat); + Serial.println("Ready"); wdt_enable(WDTO_250MS); } diff --git a/barista/data/dry-heat-50-C.csv b/barista/data/dry-heat-50-C.csv new file mode 100644 index 0000000..7478c41 --- /dev/null +++ b/barista/data/dry-heat-50-C.csv @@ -0,0 +1,1886 @@ +t_s st temp_C +37.584 0 25.88 +37.621 0 25.90 +37.658 0 25.88 +37.695 0 25.90 +37.730 0 25.90 +37.767 0 25.88 +37.804 0 25.87 +37.840 0 25.85 +37.875 0 25.85 +37.912 0 25.85 +37.949 0 25.87 +37.986 0 25.87 +38.023 0 25.90 +38.057 0 25.90 +38.094 0 25.92 +38.131 0 25.93 +38.168 0 25.92 +38.203 0 25.92 +38.240 0 25.92 +38.277 0 25.92 +38.313 0 25.93 +38.350 0 25.93 +38.385 0 25.95 +38.422 0 25.95 +38.459 0 25.95 +38.496 0 25.95 +38.531 0 25.95 +38.567 0 25.97 +38.604 0 25.92 +38.641 0 25.88 +38.678 0 25.88 +38.713 0 25.90 +38.750 0 25.92 +38.787 0 25.90 +38.823 0 25.90 +38.858 0 25.88 +38.895 0 25.88 +38.932 0 25.90 +38.969 0 25.90 +39.004 0 25.92 +39.041 0 25.92 +39.077 0 25.93 +39.114 0 25.92 +39.151 0 25.90 +39.186 0 25.93 +39.223 0 25.97 +39.260 0 25.97 +39.297 0 25.95 +39.331 0 25.95 +39.368 0 25.95 +39.405 0 25.97 +39.442 0 25.95 +39.479 0 25.93 +39.514 0 25.93 +39.550 0 25.92 +39.587 0 25.90 +39.624 0 25.90 +39.659 0 25.90 +39.696 0 25.88 +39.733 0 25.88 +39.770 0 25.87 +39.804 0 25.87 +39.841 0 25.87 +39.878 0 25.88 +39.915 0 25.87 +39.952 0 25.88 +39.987 0 25.88 +40.024 0 25.90 +40.060 0 25.92 +40.097 0 25.90 +40.132 0 25.92 +40.169 0 25.93 +40.206 0 25.95 +40.243 0 25.93 +40.280 0 25.95 +40.314 0 25.97 +40.351 0 25.98 +40.388 0 25.97 +40.425 0 25.95 +40.460 0 25.93 +40.497 0 25.95 +40.534 0 25.95 +40.570 0 25.95 +40.605 0 25.98 +40.642 0 25.97 +40.679 0 25.97 +40.716 0 25.97 +40.753 0 25.95 +40.787 0 25.93 +40.824 0 25.95 +40.861 0 25.98 +40.898 0 25.98 +40.933 0 25.98 +40.970 0 25.98 +41.007 0 26.00 +41.043 0 26.02 +41.080 0 25.98 +41.115 0 25.81 +41.152 0 25.81 +41.189 0 25.78 +41.226 0 25.78 +41.261 0 25.81 +41.297 0 25.91 +41.334 0 25.93 +41.371 0 25.91 +41.408 0 25.86 +41.443 0 25.76 +41.480 0 25.87 +41.517 0 25.84 +41.553 0 25.82 +41.588 0 25.79 +41.625 0 25.74 +41.662 0 25.69 +41.699 0 25.74 +41.734 0 25.71 +41.771 0 25.72 +41.807 0 25.90 +41.844 0 25.83 +41.881 0 25.44 +41.916 0 25.35 +41.953 0 25.35 +41.990 0 25.42 +42.027 0 25.44 +42.061 0 25.26 +42.098 0 25.10 +42.135 0 25.08 +42.172 0 25.07 +42.209 0 25.08 +42.244 0 25.14 +42.280 0 25.24 +42.317 0 25.20 +42.354 0 25.12 +42.389 0 24.90 +42.426 0 25.10 +42.463 0 25.37 +42.500 0 25.42 +42.534 0 25.39 +42.571 0 25.29 +42.608 0 25.27 +42.645 0 25.30 +42.682 0 25.46 +42.717 0 25.48 +42.754 0 25.48 +42.790 0 25.43 +42.827 0 25.41 +42.862 0 25.37 +42.899 0 25.39 +42.936 0 25.44 +42.973 0 25.49 +43.010 0 25.25 +43.044 0 25.20 +43.081 0 25.18 +43.118 0 25.22 +43.155 0 25.27 +43.190 0 25.30 +43.227 0 25.25 +43.264 0 25.13 +43.300 0 25.06 +43.337 0 25.24 +43.372 0 25.27 +43.409 0 25.29 +43.446 0 25.26 +43.483 0 25.42 +43.517 0 25.39 +43.554 0 25.37 +43.591 0 25.42 +43.628 0 25.44 +43.663 0 25.37 +43.700 0 25.32 +43.737 0 25.21 +43.773 0 25.20 +43.810 0 25.25 +43.845 0 25.37 +43.882 0 25.33 +43.919 0 25.12 +43.956 0 25.09 +43.991 0 25.07 +44.027 0 25.12 +44.064 0 24.98 +44.101 0 25.01 +44.138 0 24.96 +44.173 0 24.84 +44.210 0 24.84 +44.247 0 24.89 +44.283 0 24.99 +44.318 0 25.09 +44.355 0 25.08 +44.392 0 25.03 +44.429 0 24.76 +44.464 0 24.86 +44.500 0 24.95 +44.537 0 25.00 +44.574 0 24.96 +44.611 0 24.91 +44.646 0 24.88 +44.683 0 24.88 +44.720 0 24.93 +44.756 0 25.05 +44.791 0 25.05 +44.828 0 25.03 +44.865 0 24.93 +44.902 0 24.72 +44.939 0 24.77 +44.974 0 24.82 +45.010 0 25.07 +45.047 0 25.02 +45.084 0 24.94 +45.119 0 24.92 +45.156 0 24.97 +45.193 0 25.02 +45.230 0 25.02 +45.264 0 24.87 +45.301 0 24.82 +45.338 0 24.78 +45.375 0 24.85 +45.412 0 24.90 +45.447 0 24.94 +45.484 0 25.10 +45.520 0 25.04 +45.557 0 25.01 +45.592 0 25.03 +45.629 0 25.08 +45.666 0 25.13 +45.703 0 25.09 +45.740 0 25.04 +45.774 0 25.01 +45.811 0 25.04 +45.848 0 25.13 +45.885 0 25.18 +45.920 0 25.18 +45.957 0 25.10 +45.993 0 25.05 +46.030 0 25.18 +46.067 0 25.13 +46.102 0 25.18 +46.139 0 25.19 +46.176 0 25.14 +46.213 0 25.09 +46.247 0 24.99 +46.284 0 25.04 +46.321 0 24.92 +46.358 0 24.94 +46.393 0 24.82 +46.430 0 24.83 +46.467 0 24.83 +46.503 0 24.87 +46.540 0 24.92 +46.575 0 25.03 +46.612 0 24.89 +46.649 0 24.87 +46.686 0 24.83 +46.721 0 24.85 +46.757 0 24.90 +46.794 0 24.94 +46.831 0 24.99 +46.868 0 24.94 +46.903 0 25.06 +46.940 0 25.08 +46.977 0 25.23 +47.013 0 25.28 +47.048 0 25.25 +47.085 0 25.20 +47.122 0 25.15 +47.159 0 25.06 +47.194 0 25.03 +47.230 0 25.15 +47.267 0 25.17 +47.304 0 25.12 +47.341 0 25.06 +47.376 0 25.06 +47.413 0 25.10 +47.450 0 25.15 +47.486 0 25.10 +47.521 0 25.03 +47.558 0 24.95 +47.595 0 24.91 +47.632 0 24.95 +47.669 0 25.00 +47.704 0 25.05 +47.740 0 25.00 +47.777 0 24.98 +47.814 0 24.95 +47.849 0 24.96 +47.886 0 25.01 +47.923 0 25.06 +47.960 0 25.03 +47.996 0 25.00 +48.031 0 24.94 +48.068 0 25.11 +48.105 0 25.18 +48.142 0 25.23 +48.177 0 25.21 +48.214 0 25.16 +48.250 0 25.11 +48.287 0 25.11 +48.322 0 25.18 +48.359 0 25.27 +48.396 0 25.30 +48.433 0 25.25 +48.470 0 25.22 +48.504 0 25.20 +48.541 0 25.11 +48.578 0 25.16 +48.615 0 25.74 +48.650 0 25.63 +48.687 0 25.59 +48.723 0 25.51 +48.769 2 25.47 +48.805 2 25.46 +48.842 2 25.47 +48.879 2 25.51 +48.914 2 25.51 +48.951 2 25.49 +48.988 2 25.37 +49.025 2 25.37 +49.061 2 25.40 +49.096 2 25.40 +49.133 2 25.54 +49.170 2 25.51 +49.207 2 24.93 +49.242 2 24.86 +49.278 2 24.87 +49.315 2 24.94 +49.352 2 25.01 +49.387 2 25.06 +49.424 2 25.10 +49.461 2 24.98 +49.498 2 24.94 +49.534 2 24.93 +49.569 2 25.05 +49.606 2 25.36 +49.643 2 25.35 +49.680 2 25.33 +49.715 2 25.33 +49.752 2 25.36 +49.788 2 25.41 +49.825 2 25.47 +49.862 2 25.48 +49.897 2 25.45 +49.934 2 25.45 +49.971 2 25.43 +50.008 2 25.51 +50.042 2 25.51 +50.079 2 25.48 +50.116 2 25.39 +50.153 2 25.58 +50.188 2 25.32 +50.225 2 25.33 +50.262 2 25.37 +50.298 2 25.35 +50.335 2 25.35 +50.370 2 25.34 +50.407 2 25.39 +50.444 2 25.40 +50.481 2 25.45 +50.515 2 25.50 +50.552 2 25.54 +50.589 2 25.26 +50.626 2 25.35 +50.663 2 25.42 +50.698 2 25.54 +50.735 2 25.31 +50.771 2 25.21 +50.808 2 25.18 +50.843 2 25.16 +50.880 2 25.34 +50.917 2 25.25 +50.954 2 25.27 +50.991 2 25.28 +51.025 2 25.25 +51.062 2 25.25 +51.099 2 25.35 +51.136 2 25.35 +51.171 2 25.54 +51.208 2 25.56 +51.245 2 25.68 +51.281 2 25.67 +51.316 2 25.70 +51.353 2 25.84 +51.390 2 25.90 +51.427 2 25.92 +51.464 2 25.83 +51.499 2 25.94 +51.535 2 25.96 +51.572 2 25.86 +51.609 2 25.89 +51.644 2 25.89 +51.681 2 25.89 +51.718 2 25.91 +51.755 2 25.89 +51.791 2 25.94 +51.826 2 25.86 +51.863 2 25.93 +51.900 2 25.96 +51.937 2 25.98 +51.972 2 25.99 +52.008 2 26.07 +52.045 2 26.02 +52.082 2 25.99 +52.117 2 26.04 +52.154 2 26.21 +52.191 2 26.29 +52.228 2 26.45 +52.264 2 26.42 +52.299 2 26.58 +52.336 2 26.84 +52.373 2 26.86 +52.410 2 26.88 +52.445 2 26.93 +52.482 2 26.96 +52.518 2 27.04 +52.555 2 27.07 +52.592 2 27.07 +52.627 2 27.13 +52.664 2 27.23 +52.701 2 27.26 +52.738 2 27.31 +52.772 2 27.33 +52.809 2 27.28 +52.846 2 27.25 +52.883 2 27.20 +52.918 2 27.08 +52.955 2 27.13 +52.992 2 27.24 +53.028 2 27.29 +53.065 2 27.35 +53.100 2 27.37 +53.137 2 27.46 +53.174 2 27.52 +53.211 2 27.71 +53.245 2 27.77 +53.282 2 27.85 +53.319 2 27.92 +53.356 2 28.00 +53.393 2 28.08 +53.428 2 28.22 +53.465 2 28.31 +53.501 2 28.51 +53.538 2 28.57 +53.573 2 28.57 +53.610 2 28.72 +53.647 2 28.73 +53.684 2 28.80 +53.721 2 28.87 +53.755 2 29.01 +53.792 2 29.01 +53.829 2 29.10 +53.866 2 29.20 +53.901 2 29.31 +53.938 2 29.40 +53.975 2 29.46 +54.011 2 29.54 +54.046 2 29.62 +54.083 2 29.60 +54.120 2 29.72 +54.157 2 29.86 +54.194 2 29.88 +54.228 2 30.15 +54.265 2 30.28 +54.302 2 30.44 +54.339 2 30.48 +54.374 2 30.57 +54.411 2 30.49 +54.448 2 30.49 +54.484 2 30.55 +54.521 2 30.43 +54.556 2 30.53 +54.593 2 30.56 +54.630 2 30.64 +54.667 2 30.77 +54.702 2 30.84 +54.738 2 30.93 +54.775 2 30.93 +54.812 2 30.91 +54.847 2 30.94 +54.884 2 30.94 +54.921 2 31.07 +54.958 2 31.15 +54.994 2 31.42 +55.029 2 31.58 +55.066 2 31.68 +55.103 2 31.91 +55.140 2 32.06 +55.175 2 32.20 +55.212 2 32.32 +55.248 2 32.38 +55.285 2 32.42 +55.322 2 32.50 +55.357 2 32.69 +55.394 2 32.83 +55.431 2 32.98 +55.468 2 33.10 +55.502 2 33.19 +55.539 2 33.31 +55.576 2 33.34 +55.613 2 33.46 +55.650 2 33.59 +55.685 2 33.80 +55.721 2 33.88 +55.758 2 34.00 +55.795 2 34.09 +55.830 2 34.22 +55.867 2 34.43 +55.904 2 34.56 +55.941 2 34.69 +55.975 2 34.79 +56.012 2 34.93 +56.049 2 35.05 +56.086 2 35.18 +56.123 2 35.29 +56.158 2 35.51 +56.195 2 35.64 +56.231 2 35.74 +56.268 2 35.76 +56.303 2 35.89 +56.340 2 36.00 +56.377 2 36.20 +56.414 2 36.28 +56.451 2 36.37 +56.485 2 36.48 +56.522 2 36.77 +56.559 2 36.66 +56.596 2 36.76 +56.631 2 36.87 +56.668 2 37.01 +56.705 2 37.10 +56.741 2 37.19 +56.776 2 37.30 +56.813 2 37.40 +56.850 2 37.60 +56.887 2 37.69 +56.924 2 37.73 +56.958 2 37.79 +56.995 2 37.94 +57.032 2 38.09 +57.069 2 38.21 +57.104 2 38.14 +57.141 2 38.48 +57.178 2 38.62 +57.214 2 38.75 +57.251 2 38.83 +57.286 2 38.85 +57.323 2 38.99 +57.360 2 39.11 +57.397 2 39.35 +57.432 2 39.46 +57.468 2 39.60 +57.505 2 39.60 +57.542 2 39.70 +57.577 2 39.83 +57.614 2 40.04 +57.651 2 40.19 +57.688 2 40.32 +57.724 2 40.46 +57.759 2 40.60 +57.796 2 40.74 +57.833 2 40.88 +57.870 2 40.80 +57.905 2 40.94 +57.942 2 41.08 +57.978 2 41.10 +58.015 2 41.23 +58.052 2 41.44 +58.087 2 41.80 +58.124 2 41.90 +58.161 2 41.94 +58.198 2 42.00 +58.232 2 42.11 +58.269 2 42.25 +58.306 2 42.32 +58.343 2 42.30 +58.380 2 42.40 +58.415 2 42.52 +58.451 2 43.02 +58.488 2 43.02 +58.525 2 43.15 +58.560 2 43.27 +58.597 2 43.42 +58.634 2 43.45 +58.671 2 43.56 +58.705 2 43.83 +58.742 2 44.11 +58.779 2 44.25 +58.816 2 44.48 +58.853 2 44.61 +58.888 2 44.83 +58.925 2 45.10 +58.961 2 45.25 +58.998 2 45.39 +59.033 2 45.47 +59.070 2 45.76 +59.107 2 45.91 +59.144 2 46.08 +59.181 2 46.19 +59.215 2 46.39 +59.252 2 46.61 +59.289 2 46.64 +59.326 2 46.70 +59.361 2 46.84 +59.398 2 46.82 +59.435 2 46.96 +59.471 2 47.06 +59.506 2 47.22 +59.543 2 47.38 +59.580 2 47.55 +59.617 2 47.69 +59.654 2 47.83 +59.688 2 47.98 +59.725 2 48.11 +59.762 2 48.26 +59.799 2 48.38 +59.834 2 48.49 +59.871 2 48.71 +59.908 2 48.88 +59.944 2 49.02 +59.981 2 49.24 +60.016 2 49.44 +60.053 2 49.60 +60.090 2 49.74 +60.127 2 49.86 +60.162 2 49.96 +60.198 2 50.10 +60.241 3 50.24 +60.276 3 50.37 +60.313 3 50.54 +60.350 3 50.72 +60.387 3 50.93 +60.422 3 51.06 +60.459 3 51.14 +60.495 3 51.31 +60.532 3 51.45 +60.567 3 51.68 +60.604 3 51.80 +60.641 3 51.92 +60.678 3 52.06 +60.715 3 52.24 +60.749 3 52.41 +60.786 3 52.76 +60.823 3 52.87 +60.860 3 53.02 +60.895 3 53.13 +60.932 3 53.28 +60.968 3 53.37 +61.005 3 53.49 +61.042 3 53.62 +61.077 3 53.54 +61.114 3 53.68 +61.151 3 53.76 +61.188 3 53.96 +61.222 3 54.13 +61.259 3 54.27 +61.296 3 54.41 +61.333 3 54.56 +61.368 3 54.54 +61.405 3 54.73 +61.442 3 54.89 +61.478 3 55.05 +61.515 3 55.18 +61.550 3 55.30 +61.587 3 55.49 +61.624 3 55.67 +61.661 3 56.04 +61.696 3 56.20 +61.732 3 56.34 +61.769 3 56.50 +61.806 3 56.64 +61.843 3 56.80 +61.878 3 56.97 +61.915 3 57.14 +61.952 3 57.28 +61.988 3 57.41 +62.023 3 57.53 +62.060 3 57.70 +62.097 3 57.80 +62.134 3 57.97 +62.169 3 58.10 +62.205 3 58.23 +62.242 3 58.35 +62.279 3 58.52 +62.316 3 58.70 +62.351 3 58.80 +62.388 3 58.95 +62.425 3 59.05 +62.461 3 59.26 +62.496 3 59.39 +62.533 3 59.54 +62.570 3 59.70 +62.607 3 59.86 +62.644 3 59.97 +62.679 3 60.16 +62.715 3 60.29 +62.752 3 60.43 +62.789 3 60.58 +62.824 3 60.74 +62.861 3 60.85 +62.898 3 60.94 +62.935 3 61.06 +62.971 3 61.21 +63.006 3 61.40 +63.043 3 61.47 +63.080 3 61.61 +63.117 3 61.74 +63.152 3 61.87 +63.188 3 62.03 +63.225 3 62.28 +63.262 3 62.43 +63.297 3 62.58 +63.334 3 62.70 +63.371 3 62.77 +63.408 3 62.88 +63.444 3 63.01 +63.479 3 63.17 +63.516 3 63.29 +63.553 3 63.37 +63.590 3 63.48 +63.625 3 63.59 +63.662 3 63.85 +63.698 3 64.00 +63.735 3 64.19 +63.772 3 64.31 +63.807 3 64.36 +63.844 3 64.46 +63.881 3 64.57 +63.918 3 64.73 +63.952 3 64.59 +63.989 3 64.71 +64.026 3 64.80 +64.063 3 64.89 +64.098 3 65.02 +64.135 3 65.18 +64.172 3 65.31 +64.208 3 65.41 +64.245 3 65.34 +64.280 3 65.43 +64.317 3 65.48 +64.354 3 65.58 +64.391 3 65.68 +64.425 3 65.78 +64.462 3 65.85 +64.499 3 65.93 +64.536 3 66.31 +64.573 3 66.43 +64.608 3 66.57 +64.645 3 66.68 +64.681 3 66.72 +64.718 3 66.78 +64.753 3 66.88 +64.790 3 67.00 +64.827 3 67.20 +64.864 3 67.30 +64.901 3 67.37 +64.935 3 67.42 +64.972 3 67.49 +65.009 3 67.57 +65.046 3 67.60 +65.081 3 67.71 +65.118 3 67.81 +65.155 3 67.87 +65.191 3 67.95 +65.226 3 68.06 +65.263 3 68.22 +65.300 3 68.35 +65.337 3 68.42 +65.374 3 68.46 +65.409 3 68.46 +65.445 3 68.55 +65.482 3 68.64 +65.519 3 68.77 +65.554 3 68.74 +65.591 3 68.82 +65.628 3 68.97 +65.665 3 69.06 +65.701 3 69.08 +65.736 3 69.20 +65.773 3 69.27 +65.810 3 69.30 +65.847 3 69.35 +65.882 3 69.42 +65.918 3 69.52 +65.955 3 69.64 +65.992 3 69.73 +66.027 3 69.77 +66.064 3 69.83 +66.101 3 69.88 +66.138 3 70.09 +66.174 3 70.20 +66.209 3 70.30 +66.246 3 70.35 +66.283 3 70.49 +66.320 3 70.53 +66.355 3 70.62 +66.392 3 70.72 +66.428 3 70.83 +66.465 3 70.87 +66.502 3 70.90 +66.537 3 70.94 +66.574 3 71.02 +66.611 3 71.13 +66.648 3 71.26 +66.682 3 71.31 +66.719 3 71.33 +66.756 3 71.37 +66.793 3 71.46 +66.830 3 71.55 +66.865 3 71.65 +66.902 3 71.71 +66.938 3 71.74 +66.975 3 71.80 +67.010 3 71.87 +67.047 3 71.93 +67.084 3 72.04 +67.121 3 72.11 +67.155 3 72.13 +67.192 3 72.12 +67.229 3 72.17 +67.266 3 72.26 +67.303 3 72.36 +67.338 3 72.43 +67.375 3 72.43 +67.411 3 72.45 +67.448 3 72.48 +67.483 3 72.57 +67.520 3 72.68 +67.557 3 72.74 +67.594 3 72.74 +67.631 3 72.78 +67.665 3 72.80 +67.702 3 72.87 +67.739 3 72.97 +67.776 3 73.10 +67.811 3 73.13 +67.848 3 73.15 +67.885 3 73.17 +67.921 3 73.15 +67.956 3 73.24 +67.993 3 73.33 +68.030 3 73.37 +68.067 3 73.37 +68.104 3 73.36 +68.139 3 73.42 +68.175 3 73.50 +68.212 3 73.59 +68.249 3 73.64 +68.284 3 73.65 +68.321 3 73.65 +68.358 3 73.67 +68.395 3 73.74 +68.431 3 73.80 +68.466 3 73.85 +68.503 3 73.94 +68.540 3 73.94 +68.577 3 73.93 +68.612 3 74.00 +68.648 3 74.09 +68.685 3 74.17 +68.722 3 74.20 +68.757 3 74.20 +68.794 3 74.21 +68.831 3 74.28 +68.868 3 74.38 +68.904 3 74.46 +68.939 3 74.47 +68.976 3 74.48 +69.013 3 74.50 +69.050 3 74.56 +69.085 3 74.64 +69.122 3 74.73 +69.158 3 74.78 +69.195 3 74.79 +69.232 3 74.80 +69.267 3 74.83 +69.304 3 74.86 +69.341 3 74.95 +69.378 3 74.97 +69.412 3 74.95 +69.449 3 74.87 +69.486 3 74.89 +69.523 3 74.98 +69.558 3 75.05 +69.595 3 75.10 +69.632 3 75.10 +69.668 3 75.08 +69.705 3 75.09 +69.740 3 75.16 +69.777 3 75.24 +69.814 3 75.27 +69.851 3 75.24 +69.885 3 75.24 +69.922 3 75.24 +69.959 3 75.33 +69.996 3 75.41 +70.033 3 75.58 +70.068 3 75.58 +70.105 3 75.55 +70.141 3 75.55 +70.178 3 75.59 +70.213 3 75.65 +70.281 0 75.67 +70.318 0 75.68 +70.354 0 75.61 +70.391 0 75.65 +70.428 0 75.66 +70.463 0 75.79 +70.500 0 75.79 +70.537 0 75.80 +70.574 0 75.80 +70.608 0 75.85 +70.645 0 75.82 +70.682 0 75.83 +70.719 0 75.84 +70.754 0 75.82 +70.791 0 75.85 +70.828 0 75.86 +70.864 0 75.93 +70.901 0 75.93 +70.936 0 75.99 +70.973 0 75.96 +71.010 0 76.01 +71.047 0 75.99 +71.081 0 76.06 +71.118 0 76.07 +71.155 0 76.05 +71.192 0 76.00 +71.229 0 76.01 +71.264 0 76.10 +71.301 0 76.18 +71.337 0 76.26 +71.374 0 76.23 +71.409 0 76.22 +71.446 0 76.24 +71.483 0 76.31 +71.520 0 76.37 +71.555 0 76.40 +71.591 0 76.37 +71.628 0 76.34 +71.665 0 76.35 +71.702 0 76.42 +71.737 0 76.47 +71.774 0 76.47 +71.811 0 76.50 +71.847 0 76.43 +71.882 0 76.48 +71.919 0 76.49 +71.956 0 76.56 +71.993 0 76.71 +72.030 0 76.69 +72.065 0 76.68 +72.101 0 76.66 +72.138 0 76.70 +72.175 0 76.71 +72.210 0 76.79 +72.247 0 76.78 +72.284 0 76.77 +72.321 0 76.76 +72.357 0 76.83 +72.392 0 76.95 +72.429 0 77.02 +72.466 0 76.98 +72.503 0 76.96 +72.538 0 76.90 +72.574 0 76.82 +72.611 0 76.88 +72.648 0 76.93 +72.683 0 76.96 +72.720 0 76.83 +72.757 0 76.86 +72.794 0 76.85 +72.830 0 76.91 +72.865 0 76.94 +72.902 0 76.99 +72.939 0 76.97 +72.976 0 76.86 +73.011 0 76.85 +73.048 0 76.89 +73.084 0 76.94 +73.121 0 77.02 +73.158 0 77.01 +73.193 0 76.98 +73.230 0 76.96 +73.267 0 77.01 +73.304 0 77.19 +73.338 0 77.25 +73.375 0 77.22 +73.412 0 77.19 +73.449 0 77.17 +73.484 0 77.20 +73.521 0 77.26 +73.558 0 77.33 +73.594 0 77.34 +73.631 0 77.32 +73.666 0 77.30 +73.703 0 77.31 +73.740 0 77.36 +73.777 0 77.43 +73.811 0 77.45 +73.848 0 77.42 +73.885 0 77.39 +73.922 0 77.38 +73.959 0 77.45 +73.994 0 77.51 +74.031 0 77.57 +74.067 0 77.53 +74.104 0 77.51 +74.139 0 77.51 +74.176 0 77.59 +74.213 0 77.64 +74.250 0 77.68 +74.285 0 77.67 +74.321 0 77.64 +74.358 0 77.61 +74.395 0 77.63 +74.432 0 77.68 +74.467 0 77.71 +74.504 0 77.71 +74.541 0 77.68 +74.577 0 77.65 +74.612 0 77.68 +74.649 0 77.73 +74.686 0 77.79 +74.723 0 77.82 +74.760 0 77.71 +74.795 0 77.71 +74.831 0 77.62 +74.868 0 77.65 +74.905 0 77.72 +74.940 0 77.74 +74.977 0 77.68 +75.014 0 77.64 +75.051 0 77.65 +75.087 0 77.70 +75.122 0 77.75 +75.159 0 77.78 +75.196 0 77.74 +75.233 0 77.71 +75.268 0 77.68 +75.304 0 77.68 +75.341 0 77.79 +75.378 0 77.79 +75.413 0 77.88 +75.450 0 77.86 +75.487 0 77.82 +75.524 0 77.86 +75.560 0 77.95 +75.595 0 78.01 +75.632 0 77.97 +75.669 0 77.99 +75.706 0 77.96 +75.741 0 77.99 +75.778 0 78.04 +75.814 0 78.10 +75.851 0 78.11 +75.888 0 78.11 +75.923 0 78.08 +75.960 0 78.11 +75.997 0 78.17 +76.034 0 78.23 +76.068 0 78.25 +76.105 0 78.21 +76.142 0 78.19 +76.179 0 78.20 +76.214 0 78.28 +76.251 0 78.29 +76.288 0 78.32 +76.324 0 78.28 +76.361 0 78.25 +76.396 0 78.23 +76.433 0 78.27 +76.470 0 78.29 +76.507 0 78.32 +76.541 0 78.28 +76.578 0 78.23 +76.615 0 78.20 +76.652 0 78.24 +76.689 0 78.29 +76.724 0 78.36 +76.761 0 78.34 +76.797 0 78.29 +76.834 0 78.25 +76.869 0 78.29 +76.906 0 78.34 +76.943 0 78.39 +76.980 0 78.37 +77.017 0 78.34 +77.051 0 78.30 +77.088 0 78.34 +77.125 0 78.39 +77.162 0 78.45 +77.197 0 78.45 +77.234 0 78.41 +77.271 0 78.37 +77.307 0 78.34 +77.342 0 78.39 +77.379 0 78.46 +77.416 0 78.49 +77.453 0 78.44 +77.490 0 78.40 +77.524 0 78.39 +77.561 0 78.43 +77.598 0 78.48 +77.635 0 78.52 +77.670 0 78.47 +77.707 0 78.42 +77.744 0 78.40 +77.780 0 78.45 +77.817 0 78.51 +77.852 0 78.54 +77.889 0 78.51 +77.926 0 78.46 +77.963 0 78.42 +77.998 0 78.54 +78.034 0 78.60 +78.071 0 78.74 +78.108 0 78.73 +78.143 0 78.67 +78.180 0 78.63 +78.217 0 78.65 +78.254 0 78.71 +78.290 0 78.78 +78.325 0 78.77 +78.362 0 78.72 +78.399 0 78.88 +78.436 0 78.91 +78.471 0 78.97 +78.508 0 79.04 +78.544 0 79.16 +78.581 0 79.02 +78.618 0 79.00 +78.653 0 78.91 +78.690 0 78.96 +78.727 0 79.03 +78.764 0 79.02 +78.798 0 78.96 +78.835 0 78.91 +78.872 0 78.88 +78.909 0 78.95 +78.944 0 79.00 +78.981 0 78.83 +79.017 0 78.78 +79.054 0 78.75 +79.091 0 78.74 +79.126 0 78.69 +79.163 0 78.74 +79.200 0 78.76 +79.237 0 78.74 +79.271 0 78.70 +79.308 0 78.68 +79.345 0 78.79 +79.382 0 78.80 +79.419 0 78.85 +79.454 0 78.84 +79.491 0 78.77 +79.527 0 78.72 +79.564 0 78.74 +79.599 0 78.83 +79.636 0 78.83 +79.673 0 78.81 +79.710 0 78.70 +79.747 0 78.67 +79.781 0 78.67 +79.818 0 78.71 +79.855 0 78.83 +79.892 0 78.57 +79.927 0 78.45 +79.964 0 78.46 +80.001 0 78.37 +80.037 0 78.42 +80.072 0 78.42 +80.109 0 78.47 +80.146 0 78.42 +80.183 0 78.36 +80.220 0 78.34 +80.254 0 78.38 +80.291 0 78.48 +80.328 0 78.51 +80.365 0 78.49 +80.400 0 78.48 +80.437 0 78.47 +80.474 0 78.78 +80.510 0 78.85 +80.547 0 78.91 +80.582 0 78.97 +80.619 0 78.91 +80.656 0 78.93 +80.693 0 78.94 +80.728 0 78.98 +80.764 0 79.06 +80.801 0 79.06 +80.838 0 79.02 +80.873 0 78.98 +80.910 0 78.97 +80.947 0 79.01 +80.984 0 79.04 +81.020 0 78.96 +81.055 0 78.93 +81.092 0 78.95 +81.129 0 78.91 +81.166 0 78.96 +81.201 0 79.02 +81.238 0 78.98 +81.274 0 78.94 +81.311 0 78.88 +81.348 0 78.83 +81.383 0 78.88 +81.420 0 78.94 +81.457 0 78.96 +81.494 0 78.94 +81.528 0 78.89 +81.565 0 78.86 +81.602 0 78.91 +81.639 0 78.94 +81.676 0 78.91 +81.711 0 78.92 +81.747 0 78.87 +81.784 0 78.80 +81.821 0 78.90 +81.856 0 78.98 +81.893 0 79.06 +81.930 0 79.05 +81.967 0 79.01 +82.001 0 78.96 +82.038 0 78.98 +82.075 0 79.02 +82.112 0 79.08 +82.149 0 79.08 +82.184 0 79.05 +82.221 0 79.04 +82.257 0 79.03 +82.294 0 79.18 +82.329 0 79.25 +82.366 0 79.30 +82.403 0 79.23 +82.440 0 79.15 +82.477 0 79.12 +82.511 0 79.17 +82.548 0 79.21 +82.585 0 79.26 +82.622 0 79.28 +82.657 0 79.25 +82.694 0 79.20 +82.731 0 79.23 +82.767 0 79.26 +82.802 0 79.31 +82.839 0 79.28 +82.876 0 79.13 +82.913 0 79.07 +82.950 0 79.11 +82.984 0 79.17 +83.021 0 79.23 +83.058 0 79.22 +83.095 0 79.17 +83.130 0 79.13 +83.167 0 79.12 +83.204 0 79.11 +83.240 0 79.17 +83.277 0 79.20 +83.312 0 79.13 +83.349 0 79.11 +83.386 0 79.00 +83.423 0 79.05 +83.458 0 79.10 +83.494 0 79.03 +83.531 0 79.04 +83.568 0 79.00 +83.603 0 78.97 +83.640 0 79.00 +83.677 0 79.05 +83.714 0 79.08 +83.750 0 79.05 +83.785 0 79.00 +83.822 0 78.92 +83.859 0 78.95 +83.896 0 79.02 +83.931 0 79.04 +83.968 0 79.11 +84.004 0 79.05 +84.041 0 79.02 +84.078 0 79.04 +84.113 0 79.03 +84.150 0 79.08 +84.187 0 79.07 +84.224 0 78.99 +84.258 0 78.94 +84.295 0 78.95 +84.332 0 79.00 +84.369 0 79.08 +84.406 0 79.11 +84.441 0 79.06 +84.477 0 79.02 +84.514 0 79.00 +84.551 0 79.03 +84.586 0 79.08 +84.623 0 79.11 +84.660 0 79.15 +84.697 0 79.11 +84.731 0 79.05 +84.768 0 79.11 +84.805 0 79.27 +84.842 0 79.31 +84.879 0 79.26 +84.914 0 79.21 +84.951 0 79.14 +84.987 0 79.18 +85.024 0 79.23 +85.059 0 79.38 +85.096 0 79.36 +85.133 0 79.31 +85.170 0 79.26 +85.207 0 79.35 +85.241 0 79.51 +85.278 0 79.57 +85.315 0 79.57 +85.352 0 79.51 +85.387 0 79.43 +85.424 0 79.48 +85.460 0 79.54 +85.497 0 79.60 +85.532 0 79.61 +85.569 0 79.57 +85.606 0 79.55 +85.643 0 79.43 +85.680 0 79.51 +85.714 0 79.56 +85.751 0 79.59 +85.788 0 79.54 +85.825 0 79.39 +85.860 0 79.36 +85.897 0 79.40 +85.934 0 79.46 +85.970 0 79.46 +86.007 0 79.36 +86.042 0 79.31 +86.079 0 79.26 +86.116 0 79.30 +86.153 0 79.34 +86.188 0 79.37 +86.224 0 79.34 +86.261 0 79.26 +86.298 0 79.22 +86.335 0 79.21 +86.370 0 79.20 +86.407 0 79.25 +86.444 0 79.19 +86.480 0 79.17 +86.515 0 79.13 +86.552 0 79.11 +86.589 0 79.19 +86.626 0 79.24 +86.661 0 79.26 +86.697 0 79.20 +86.734 0 79.20 +86.771 0 79.21 +86.808 0 79.24 +86.843 0 79.28 +86.880 0 79.32 +86.917 0 79.30 +86.953 0 79.25 +86.988 0 79.23 +87.025 0 79.31 +87.062 0 79.36 +87.099 0 79.39 +87.136 0 79.37 +87.171 0 79.34 +87.207 0 79.28 +87.244 0 79.32 +87.281 0 79.35 +87.316 0 79.37 +87.353 0 79.32 +87.390 0 79.28 +87.427 0 79.25 +87.461 0 79.25 +87.498 0 79.29 +87.535 0 79.34 +87.572 0 79.36 +87.609 0 79.30 +87.644 0 79.23 +87.681 0 79.25 +87.717 0 79.27 +87.754 0 79.29 +87.789 0 79.34 +87.826 0 79.29 +87.863 0 79.31 +87.900 0 79.25 +87.937 0 79.28 +87.971 0 79.35 +88.008 0 79.40 +88.045 0 79.34 +88.082 0 79.28 +88.117 0 79.24 +88.154 0 79.27 +88.190 0 79.32 +88.227 0 79.40 +88.262 0 79.38 +88.299 0 79.35 +88.336 0 79.31 +88.373 0 79.31 +88.410 0 79.34 +88.444 0 79.51 +88.481 0 79.51 +88.518 0 79.47 +88.555 0 79.41 +88.590 0 79.39 +88.627 0 79.49 +88.664 0 79.54 +88.700 0 79.57 +88.737 0 79.51 +88.772 0 79.47 +88.809 0 79.40 +88.846 0 79.41 +88.883 0 79.47 +88.918 0 79.51 +88.954 0 79.46 +88.991 0 79.42 +89.028 0 79.23 +89.065 0 79.28 +89.100 0 79.26 +89.137 0 79.31 +89.174 0 79.28 +89.210 0 79.20 +89.245 0 79.18 +89.282 0 79.20 +89.319 0 79.25 +89.356 0 79.28 +89.391 0 79.28 +89.427 0 79.23 +89.464 0 79.19 +89.501 0 79.20 +89.538 0 79.25 +89.573 0 79.36 +89.610 0 79.37 +89.647 0 79.30 +89.683 0 79.33 +89.718 0 79.31 +89.755 0 79.31 +89.792 0 79.37 +89.829 0 79.37 +89.866 0 79.31 +89.901 0 79.26 +89.937 0 79.19 +89.974 0 79.25 +90.011 0 79.34 +90.046 0 79.37 +90.083 0 79.33 +90.120 0 79.28 +90.157 0 79.19 +90.191 0 79.23 +90.228 0 79.27 +90.265 0 79.30 +90.302 0 79.28 +90.339 0 79.28 +90.374 0 79.23 +90.411 0 79.26 +90.447 0 79.30 +90.484 0 79.36 +90.519 0 79.37 +90.556 0 79.31 +90.593 0 79.23 +90.630 0 79.23 +90.667 0 79.27 +90.701 0 79.35 +90.738 0 79.33 +90.775 0 79.28 +90.812 0 79.20 +90.847 0 79.41 +90.884 0 79.46 +90.920 0 79.51 +90.957 0 79.52 +90.994 0 79.47 +91.029 0 79.43 +91.066 0 79.41 +91.103 0 79.49 +91.140 0 79.54 +91.174 0 79.60 +91.211 0 79.55 +91.248 0 79.50 +91.285 0 79.44 +91.320 0 79.49 +91.357 0 79.52 +91.394 0 79.57 +91.430 0 79.34 +91.467 0 79.29 +91.502 0 79.28 +91.539 0 79.31 +91.576 0 79.35 +91.613 0 79.39 +91.648 0 79.36 +91.684 0 79.31 +91.721 0 79.27 +91.758 0 79.25 +91.795 0 79.31 +91.830 0 79.37 +91.867 0 79.36 +91.904 0 79.33 +91.940 0 79.31 +91.975 0 79.31 +92.012 0 79.35 +92.049 0 79.40 +92.086 0 79.45 +92.121 0 79.40 +92.157 0 79.35 +92.194 0 79.31 +92.231 0 79.36 +92.268 0 79.41 +92.303 0 79.41 +92.340 0 79.37 +92.377 0 79.31 +92.413 0 79.28 +92.448 0 79.31 +92.485 0 79.36 +92.522 0 79.40 +92.559 0 79.37 +92.596 0 79.31 +92.631 0 79.27 +92.667 0 79.23 +92.704 0 79.28 +92.741 0 79.32 +92.776 0 79.33 +92.813 0 79.14 +92.850 0 79.11 +92.887 0 79.16 +92.921 0 79.24 +92.958 0 79.27 +92.995 0 79.26 +93.032 0 79.20 +93.069 0 79.16 +93.104 0 79.17 +93.140 0 79.20 +93.177 0 79.29 +93.214 0 79.30 +93.249 0 79.25 +93.286 0 79.20 +93.323 0 79.19 +93.360 0 79.23 +93.396 0 79.42 +93.431 0 79.41 +93.468 0 79.35 +93.505 0 79.27 +93.542 0 79.26 +93.577 0 79.34 +93.614 0 79.42 +93.650 0 79.48 +93.687 0 79.43 +93.724 0 79.38 +93.759 0 79.31 +93.796 0 79.35 +93.833 0 79.40 +93.870 0 79.44 +93.904 0 79.40 +93.941 0 79.36 +93.978 0 79.31 +94.015 0 79.37 +94.050 0 79.41 +94.087 0 79.46 +94.124 0 79.43 +94.160 0 79.33 +94.197 0 79.26 +94.232 0 79.25 +94.269 0 79.22 +94.306 0 79.21 +94.343 0 79.24 +94.377 0 79.19 +94.414 0 79.14 +94.451 0 79.14 +94.488 0 79.20 +94.525 0 79.25 +94.560 0 79.24 +94.597 0 79.15 +94.633 0 79.13 +94.670 0 79.11 +94.705 0 79.17 +94.742 0 79.22 +94.779 0 79.24 +94.816 0 79.20 +94.851 0 79.23 +94.887 0 79.25 +94.924 0 79.26 +94.961 0 79.32 +94.998 0 79.36 +95.033 0 79.32 +95.070 0 79.26 +95.107 0 79.28 +95.143 0 79.37 +95.178 0 79.43 +95.215 0 79.45 +95.252 0 79.42 +95.289 0 79.36 +95.326 0 79.31 +95.361 0 79.34 +95.397 0 79.40 +95.434 0 79.46 +95.471 0 79.48 +95.506 0 79.43 +95.543 0 79.37 +95.580 0 79.37 +95.617 0 79.42 +95.653 0 79.48 +95.688 0 79.43 +95.725 0 79.36 +95.762 0 79.31 +95.799 0 79.29 +95.834 0 79.34 +95.870 0 79.27 +95.907 0 79.31 +95.944 0 79.31 +95.979 0 79.26 +96.016 0 79.22 +96.053 0 79.21 +96.090 0 79.26 +96.126 0 79.36 +96.161 0 79.32 +96.198 0 79.28 +96.235 0 79.24 +96.272 0 79.28 +96.307 0 79.32 +96.344 0 79.36 +96.380 0 79.32 +96.417 0 79.27 +96.454 0 79.31 +96.489 0 79.25 +96.526 0 79.25 +96.563 0 79.31 +96.600 0 79.31 +96.634 0 79.26 +96.671 0 79.21 +96.708 0 79.14 +96.745 0 79.18 +96.780 0 79.23 +96.817 0 79.23 +96.854 0 79.14 +96.890 0 79.08 +96.927 0 79.08 +96.962 0 79.14 +96.999 0 79.20 +97.036 0 79.26 +97.073 0 79.27 +97.107 0 79.21 +97.144 0 79.16 +97.181 0 79.19 +97.218 0 79.21 +97.255 0 79.25 +97.290 0 79.22 +97.327 0 79.17 +97.363 0 79.12 +97.400 0 79.12 +97.435 0 79.18 +97.472 0 79.24 +97.509 0 79.21 +97.546 0 79.16 +97.581 0 79.11 +97.617 0 79.13 +97.654 0 79.20 +97.691 0 79.21 +97.728 0 79.23 +97.763 0 79.17 +97.800 0 79.30 +97.837 0 79.30 +97.873 0 79.40 +97.908 0 79.45 +97.945 0 79.46 +97.982 0 79.45 +98.019 0 79.40 +98.056 0 79.37 +98.091 0 79.42 +98.127 0 79.46 +98.164 0 79.50 +98.201 0 79.40 +98.236 0 79.34 +98.273 0 79.35 +98.310 0 79.38 +98.347 0 79.44 +98.383 0 79.34 +98.418 0 79.30 +98.455 0 79.20 +98.492 0 79.15 +98.529 0 79.18 +98.564 0 79.23 +98.600 0 79.29 +98.637 0 79.28 +98.674 0 79.23 +98.709 0 79.19 +98.746 0 79.18 +98.783 0 79.28 +98.820 0 79.29 +98.856 0 79.25 +98.891 0 79.20 +98.928 0 79.23 +98.965 0 79.20 +99.002 0 79.25 +99.037 0 79.30 +99.074 0 79.32 +99.110 0 79.26 +99.147 0 79.20 +99.184 0 79.13 +99.219 0 79.17 +99.256 0 79.13 +99.293 0 79.17 +99.330 0 79.13 +99.364 0 79.08 +99.401 0 79.11 +99.438 0 79.17 +99.475 0 79.22 +99.510 0 79.19 +99.547 0 79.17 +99.584 0 79.11 +99.620 0 79.06 +99.657 0 79.10 +99.692 0 79.11 +99.729 0 79.07 +99.766 0 79.08 +99.803 0 79.03 +99.837 0 79.06 +99.874 0 79.05 +99.911 0 79.11 +99.948 0 79.17 +99.985 0 79.14 +100.020 0 79.01 +100.059 0 78.96 +100.096 0 78.91 +100.132 0 78.94 +100.169 0 79.08 +100.208 0 79.13 +100.245 0 79.13 +100.282 0 79.17 +100.321 0 79.22 +100.358 0 79.20 +100.395 0 79.22 +100.431 0 79.22 +100.470 0 79.20 +100.507 0 79.19 +100.544 0 79.18 +100.583 0 79.19 +100.620 0 79.34 +100.657 0 79.36 +100.694 0 79.35 +100.732 0 79.32 +100.769 0 79.18 +100.806 0 79.15 +100.845 0 79.14 +100.882 0 79.13 +100.919 0 79.16 +100.956 0 79.21 +100.995 0 79.23 +101.031 0 79.24 +101.068 0 79.22 +101.105 0 79.17 +101.144 0 79.13 +101.181 0 79.14 +101.218 0 79.11 +101.257 0 79.13 +101.294 0 79.12 +101.330 0 79.16 +101.367 0 79.17 +101.406 0 79.14 +101.443 0 79.08 +101.480 0 79.03 +101.519 0 79.03 +101.556 0 79.15 +101.593 0 79.16 +101.629 0 79.20 +101.668 0 79.24 +101.705 0 79.26 +101.742 0 79.26 +101.781 0 79.21 +101.818 0 79.15 +101.855 0 79.14 +101.892 0 79.20 +101.931 0 79.21 +101.967 0 79.26 +102.004 0 79.31 +102.043 0 79.33 +102.080 0 79.34 +102.117 0 79.29 +102.154 0 79.04 +102.193 0 79.02 +102.230 0 79.03 +102.266 0 79.03 +102.303 0 79.06 +102.342 0 79.11 +102.379 0 79.14 +102.416 0 79.14 +102.455 0 79.09 +102.492 0 78.97 +102.529 0 79.04 +102.565 0 79.04 +102.604 0 79.06 +102.641 0 79.09 +102.678 0 78.95 +102.717 0 78.99 +102.754 0 79.08 +102.791 0 79.06 +102.828 0 78.89 +102.866 0 78.85 +102.903 0 78.85 +102.940 0 78.84 +102.979 0 78.85 +103.016 0 78.91 +103.053 0 78.98 +103.090 0 79.03 +103.129 0 78.91 +103.165 0 78.85 +103.202 0 78.77 +103.241 0 78.80 +103.278 0 78.95 +103.315 0 78.97 +103.352 0 78.99 +103.391 0 79.05 +103.428 0 79.13 +103.464 0 79.12 +103.501 0 79.07 +103.540 0 79.01 +103.577 0 79.03 +103.614 0 79.03 +103.653 0 79.02 +103.690 0 79.06 +103.727 0 79.13 +103.763 0 79.14 +103.802 0 79.14 +103.839 0 79.05 +103.876 0 79.05 +103.915 0 79.03 +103.952 0 79.07 +103.989 0 79.04 +104.026 0 79.18 +104.065 0 79.25 +104.101 0 79.31 +104.138 0 79.31 +104.177 0 79.24 +104.214 0 79.19 +104.251 0 79.16 +104.288 0 79.18 +104.327 0 79.16 +104.364 0 79.20 +104.400 0 79.25 +104.439 0 79.29 +104.476 0 79.28 +104.513 0 79.25 +104.550 0 79.17 +104.589 0 79.14 +104.626 0 79.08 +104.663 0 79.05 +104.699 0 79.00 +104.738 0 79.04 +104.775 0 79.10 +104.812 0 79.11 +104.851 0 79.08 +104.888 0 79.02 +104.925 0 79.02 +104.962 0 79.00 +105.000 0 79.00 +105.037 0 79.00 +105.074 0 79.05 +105.113 0 79.11 +105.150 0 79.14 +105.187 0 79.14 +105.224 0 79.03 +105.263 0 78.99 +105.299 0 78.97 +105.336 0 78.97 +105.375 0 78.96 +105.412 0 79.01 +105.449 0 79.10 +105.486 0 79.12 +105.525 0 79.08 +105.562 0 79.05 +105.598 0 78.98 +105.637 0 79.03 +105.674 0 79.04 +105.711 0 79.11 +105.748 0 79.12 +105.787 0 79.17 +105.824 0 79.26 +105.861 0 79.25 +105.897 0 79.27 +105.936 0 79.22 +105.973 0 79.17 +106.010 0 79.14 +106.049 0 79.13 +106.086 0 79.14 +106.123 0 79.19 +106.160 0 79.15 +106.199 0 79.16 +106.235 0 79.07 +106.272 0 78.93 +106.311 0 78.82 +106.348 0 78.81 +106.385 0 78.82 diff --git a/barista/overheat.c b/barista/overheat.c new file mode 100644 index 0000000..e4b0d4f --- /dev/null +++ b/barista/overheat.c @@ -0,0 +1,52 @@ +/* Copyright (c) 2025 Rodrigo Arias Mallo + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#include "overheat.h" +#include + +void +overheat_init(struct overheat *o) +{ + memset(o, 0, sizeof(struct overheat)); +} + +void +overheat_input(struct overheat *o, unsigned long t_ms, float temp) +{ + unsigned long delta = t_ms - o->last_time; + + if (delta < OVH_INTERVAL) + return; + + o->temp[o->next++] = temp; + if (o->next >= OVH_NSAMPLES) + o->next = 0; + if (o->n < OVH_NSAMPLES) + o->n++; + + /* Recompute state */ + float tmin = 10000.0, tmax = 0.0; + for (int i = 0; i < o->n; i++) { + if (o->temp[i] < tmin) + tmin = o->temp[i]; + if (o->temp[i] > tmax) + tmax = o->temp[i]; + } + + o->delta = tmax - tmin; +} + +float +overheat_delta(struct overheat *o) +{ + return o->delta; +} + +int +overheat_panic(struct overheat *o) +{ + if (o->delta > OVH_THRESHOLD) + return 1; + else + return 0; +} diff --git a/barista/overheat.h b/barista/overheat.h new file mode 100644 index 0000000..3f4ef0e --- /dev/null +++ b/barista/overheat.h @@ -0,0 +1,32 @@ +/* Copyright (c) 2025 Rodrigo Arias Mallo + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#ifndef BARISTA_OVERHEAT_H +#define BARISTA_OVERHEAT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define OVH_NSAMPLES 20 +#define OVH_INTERVAL 200 /* ms */ +#define OVH_THRESHOLD 2.0 /* °C */ + +struct overheat { + unsigned long last_time; + float temp[OVH_NSAMPLES]; + int next; + int n; + float delta; +}; + +void overheat_init(struct overheat *o); +void overheat_input(struct overheat *o, unsigned long t_ms, float temp); +float overheat_delta(struct overheat *o); +int overheat_panic(struct overheat *o); + +#ifdef __cplusplus +} +#endif + +#endif /* BARISTA_OVERHEAT_H */ diff --git a/barista/test/test_ntc.c b/barista/test/test_ntc.c index ef16497..96a37b0 100644 --- a/barista/test/test_ntc.c +++ b/barista/test/test_ntc.c @@ -1,3 +1,6 @@ +/* Copyright (c) 2025 Rodrigo Arias Mallo + * SPDX-License-Identifier: GPL-3.0-or-later */ + #include #include "ntc.h" diff --git a/barista/test/test_overheat.c b/barista/test/test_overheat.c new file mode 100644 index 0000000..137dced --- /dev/null +++ b/barista/test/test_overheat.c @@ -0,0 +1,36 @@ +/* Copyright (c) 2025 Rodrigo Arias Mallo + * SPDX-License-Identifier: GPL-3.0-or-later */ + +#include +#include "overheat.h" + +/* Read a CSV from the stdin in the format + * + * skipping the first row (header). + * + * Outputs overheat state. */ + +#define MAX_LINE 1024 + +int main(void) +{ + char buf[MAX_LINE]; + fgets(buf, MAX_LINE, stdin); + + float t, temp; + int st; + + struct overheat ovh; + overheat_init(&ovh); + + while (scanf("%f %d %f", &t, &st, &temp) == 3) { + + overheat_input(&ovh, t * 1000.0, temp); + float delta = overheat_delta(&ovh); + int panic = overheat_panic(&ovh); + + printf("%.3f %d %.2f %.1f %s\n", t, st, temp, delta, panic ? "PANIC" : "OK"); + } + + return 0; +}