Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93022221cb | ||
|
|
86f27d4170 |
+5
-1
@@ -184,9 +184,13 @@ uint8_t joystickREPos(int8_t dir, size_t encPos) {
|
||||
return btn;
|
||||
}
|
||||
|
||||
// TODO
|
||||
// Make this non blocking:
|
||||
// - Set it has high, and on the following loops check if the required duration
|
||||
// has elapsed to release it
|
||||
void rotateRE(int8_t pos) {
|
||||
Joystick.setButton(pos, HIGH);
|
||||
delayMicroseconds(1000);
|
||||
delay(RE_PULSE_DURATION);
|
||||
Joystick.setButton(pos, LOW);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
const int RE_NOCHANGE = 0;
|
||||
const int RE_CCW = -1;
|
||||
const int RE_CW = 1;
|
||||
const int RE_PULSE_DURATION = 100; // microsseconds
|
||||
|
||||
typedef struct {
|
||||
int clkPin;
|
||||
|
||||
Reference in New Issue
Block a user