mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-06-13 06:20:53 +00:00
Add parentheses to force correct addition operation. Thanks to Barry Halterman for catching this.
This commit is contained in:
parent
a4f5f4b3cb
commit
b136f5e43c
|
@ -16,7 +16,7 @@ static const uint8_t MOMENTUM_MULTIPLIER = 1;
|
||||||
|
|
||||||
uint8_t enc_state (void)
|
uint8_t enc_state (void)
|
||||||
{
|
{
|
||||||
return (digitalRead(PIN_ENC_A)?1:0 + digitalRead(PIN_ENC_B)?2:0);
|
return ((digitalRead(PIN_ENC_A)?1:0) + (digitalRead(PIN_ENC_B)?2:0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user