Introduce Dual Window Comparators with cv calibration #30

Merged
awonak merged 5 commits from comparator into main 2026-03-11 05:12:10 +00:00
2 changed files with 386 additions and 1 deletions
Showing only changes of commit 3f31780deb - Show all commits

View File

@ -330,10 +330,11 @@ void loop() {
bool logic_or = gate1 || gate2;
bool logic_xor = gate1 ^ gate2;
if (gate1 && !prev_gate1)
ff_state = true;
if (gate2 && !prev_gate2)
ff_state = false;
static bool prev_logic_xor = false;
if (logic_xor && !prev_logic_xor) {
ff_state = !ff_state;
}
prev_logic_xor = logic_xor;
gravity.outputs[0].Update(gate1 ? HIGH : LOW);
gravity.outputs[1].Update(gate2 ? HIGH : LOW);