Fix "speed" bug

This commit is contained in:
vlad 2022-11-01 11:22:55 +03:00
parent f5db4cb95d
commit 8974afab32

3
main.c
View File

@ -373,13 +373,14 @@ ISR(TIMER1_OVF_vect) {
}
if (exec > 0) {
const uint8_t old_exec = exec;
exec = -1;
MCUCR &= ~(1 << SE);
sei();
read_sensors();
// если измерений 6 (и мало ли больше), то отправляем смс
// если под скоростью, то тоже отправляем смс
if (exec == 2 || sensor_measurements >= MEASUREMENTS) {
if (old_exec == 2 || sensor_measurements >= MEASUREMENTS) {
try_to_send_telemetry();
}