Commit graph

6 commits

Author SHA1 Message Date
Purdea Andrei
c904520f72
Haptic and solenoid cleanup (#9700)
* solenoid: remove two functions that do nothing.

These functions modify the argument, and so they do nothing.

Note: versions of these functions exist in mtdjr's user folder,
however to core solenoid support and mtdjr user-specific solenoid
support are exclusive (only one can be used at a time).

So removing these confusing functions does no harm.

* solenoid: bugfix: don't allow dwell time to go 1ms below minimum time.

The previous code allowed dwell time to go 1ms below the configured minimum.
This change corrects it.

* solenoid: bugfix: when incrementing above maximum dwell time, jump back to minimum, not to 1

The previous code used to jump back to 1, which might be way under the configured minimum setting.

* solenoid: bugfix: on startup actually use the eeprom-stored dwell-time

This is because the dwell time is stored in two variables.

* solenoid: bugfix: on haptic_reset, actually use the newly set default dwell time.

This is needed because dwell time is configured in two variables.

* solenoid: on HPT_RST set buzz to a default value

* solenoid: buzz: reworked to make more configurable. Previous behaviour maintained.

* solenoid: documentation: clarify meaning of dwell time

* solenoid: add feature SOLENOID_DWELL_STEP_SIZE

* solenoid: documentation: added note about the precision of the solenoid time settings

* haptic: Correctly call haptic_reset when eeprom is corrupt.

* haptic: improve what happens if haptic is enabled without erasing eeprom

* haptic: improve what happens if solenoid is enabled without erasing eeprom

* drivers/haptic: fix compilation issue, when haptic is enabled, but solenoid isn't
2020-10-30 13:15:50 -07:00
osjuga
f275ffbdfc Minor grammar and filename fixes in docs (#7559)
Grammar in coding_conventions_c.md and coding_conventions_python.md

`rule.mk` to `rules.mk` in feature_haptic_feedback.md and feature_rgb_matrix.md
2019-12-07 23:19:18 +11:00
Drashna Jaelre
f6b5f6db76 Improvements to Solenoid feature (#7369)
* Error out when Solenid pin is not defined

Instead of defaulting to a (literally) random pin, error out instead.  Because this pin may be used, or because that pin may not be exposed, or may not exist.

* Remove 'SOLENOID_ACTIVE' setting since it's not used

* Update documentation
2019-11-15 22:27:46 +00:00
umi
ff8d436946 correct description (#7240) 2019-11-02 13:11:36 +00:00
MechMerlin
911b8915cc DRV2605L Continuous Haptic Feedback Support (#6461)
* provide means to turn on RTP mode and set the amplitude

* new keycode HPT_CONT to turn RTP off/on

* introduce new keycodes HPT_CONI, and HPT_COND for Haptic Continuous Increase and Decrease

* support for continuous mode amplitude increase and decrease

* code cleanup

* update docs to reference new keycodes and functionality

* don't touch the keymaps

* add function prototypes

* add proper guards

* cleanup guards

* remove extra reserved
2019-09-19 09:42:33 -07:00
ishtob
2cee371bf1 Haptic feedback generalized - DRV2605 and solenoids (#4939)
* initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards

* Haptic feedback enhancements: on/off toggle working, feedback order working
todo:
-work on modes switching
-get modes switching to save to eeprom

* haptic enhancement - eeprom and modes added

* Added set and get functions for haptic feedback

* initial implementation of solenoids under haptic feedback

* changed eeprom to 32 bits to reserve blocks for future features

* start documentation of haptic feedback

* change keycode per comment from reviewers

* typo fixes

* added eeprom for solenoid configs

* added solenoid and docs

* Add/fix default parameters configs, improve docs

* more doc cleanup

* add in solenoid buzz toggle, clean up doc

* some fixes for error in compiling solenoid

* fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c

* fixes for avr side issues

* update keymap

* fix keymap compile error

* fix bugs found during solenoid testing

* set pin that is not powered during bootloader

* added warning about certain pins on the MCU may trip solenoid during DFU/bootloader
2019-02-16 18:39:30 -08:00