last_pressed -> last_pressed_time
1 parent 06016f9 commit 46efecb4b13594140b0de33ba48235f6ddfa839b
@Alex Tucker Alex Tucker authored on 2 Jul 2019
Showing 1 changed file
View
2
■■■
main.c
pthread_mutex_lock(&isr_mtx);
unsigned int now = millis();
if ((last_pressed_time + 100) < now) {
pin_pressed = pin;
last_pressed = now;
last_pressed_time = now;
} else {
pin_pressed = 0;
}
pthread_cond_signal(&isr_cond);