HCoop
/
jackhill
/
qmk
/
firmware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c39eeac
)
haptic: improve what happens if solenoid is enabled without erasing eeprom
author
Purdea Andrei
<andrei@purdea.ro>
Sat, 11 Jul 2020 03:04:43 +0000
(06:04 +0300)
committer
Purdea Andrei
<andrei@purdea.ro>
Sat, 11 Jul 2020 03:06:22 +0000
(06:06 +0300)
drivers/haptic/haptic.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/haptic/haptic.c
b/drivers/haptic/haptic.c
index
6a09c4f
..
6cd699b
100644
(file)
--- a/
drivers/haptic/haptic.c
+++ b/
drivers/haptic/haptic.c
@@
-167,6
+167,10
@@
void haptic_reset(void) {
haptic_config.dwell = dwell;
haptic_config.buzz = SOLENOID_DEFAULT_BUZZ;
solenoid_set_dwell(dwell);
+#else
+ // This is to trigger haptic_reset again, if solenoid is enabled in the future.
+ haptic_config.dwell = 0;
+ haptic_config.buzz = 0;
#endif
eeconfig_update_haptic(haptic_config.raw);
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);