diff --git a/feedback/firmware/main.c b/feedback/firmware/main.c index 992aa09..8eca023 100644 --- a/feedback/firmware/main.c +++ b/feedback/firmware/main.c @@ -62,11 +62,8 @@ static uint16_t get_status() { static uint16_t graded_status() { uint16_t status = get_status(); - // combine the bits of the last 3 states into one: "at least 2 of 3" - uint16_t graded01 = status_hysteresis[0] & status_hysteresis[1]; - uint16_t graded1n = status_hysteresis[1] & status; - uint16_t gradedn0 = status & status_hysteresis[0]; - uint16_t graded = graded01 | graded1n | gradedn0; + // combine the bits of the last 3 states into one: "3 successive ones" + uint16_t graded = status_hysteresis[0] & status_hysteresis[1] & status; status_hysteresis[0] = status_hysteresis[1]; status_hysteresis[1] = status;