Add full solenoid support on split keyboards (#21583)

Co-authored-by: Jacob Gable <jacob.gable@statheros.tech>
This commit is contained in:
jacob-w-gable 2023-09-24 21:23:31 -05:00 committed by GitHub
parent 7a761ebf7d
commit 99290b4c7e
Failed to generate hash of commit
4 changed files with 21 additions and 12 deletions

View file

@ -23,7 +23,6 @@
#include "util.h"
#include <stdlib.h>
uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
static pin_t solenoid_pads[] = SOLENOID_PINS;
#define NUMBER_OF_SOLENOIDS ARRAY_SIZE(solenoid_pads)
bool solenoid_on[NUMBER_OF_SOLENOIDS] = {false};
@ -53,7 +52,7 @@ void solenoid_set_buzz(uint8_t buzz) {
}
void solenoid_set_dwell(uint8_t dwell) {
solenoid_dwell = dwell;
haptic_set_dwell(dwell);
}
/**
@ -119,7 +118,7 @@ void solenoid_check(void) {
elapsed[i] = timer_elapsed(solenoid_start[i]);
// Check if it's time to finish this solenoid click cycle
if (elapsed[i] > solenoid_dwell) {
if (elapsed[i] > haptic_config.dwell) {
solenoid_stop(i);
continue;
}