Merge pull request #402 from XPila/MK3

fixed bug - fsensor synchronization (b146)
This commit is contained in:
XPila 2018-01-15 15:26:33 +01:00 committed by GitHub
commit f1d30d99fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,11 +153,12 @@ bool fsensor_check_autoload(void)
ISR(PCINT2_vect) ISR(PCINT2_vect)
{ {
// puts("PCINT2\n");
if (!((fsensor_int_pin_old ^ PINK) & FSENSOR_INT_PIN_MSK)) return; if (!((fsensor_int_pin_old ^ PINK) & FSENSOR_INT_PIN_MSK)) return;
fsensor_int_pin_old = PINK;
static bool _lock = false; static bool _lock = false;
if (_lock) return; if (_lock) return;
_lock = true; _lock = true;
// puts("PCINT2\n");
// return; // return;
int st_cnt = fsensor_st_cnt; int st_cnt = fsensor_st_cnt;
fsensor_st_cnt = 0; fsensor_st_cnt = 0;
@ -219,7 +220,7 @@ ISR(PCINT2_vect)
} }
} }
pat9125_y = 0; pat9125_y = 0;
_lock = true; _lock = false;
return; return;
} }