-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from minipadKB/master
Release firmware version `2024.309.1`
- Loading branch information
Showing
29 changed files
with
586 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
#include "config/keys/key_config.hpp" | ||
|
||
// Configuration for the digital keys of the keypad. | ||
struct DigitalKeyConfig : KeyConfig | ||
{ | ||
// Default constructor for the DigitalKeyConfig struct for initializing the arrays in the Configuration struct. | ||
DigitalKeyConfig() : KeyConfig('\0') {} | ||
|
||
// Initialize with the specified key char. | ||
DigitalKeyConfig(char keyChar) : KeyConfig(keyChar) {} | ||
|
||
// This struct is empty on purpose. The only purpose it serves is explicitly having | ||
// a type for the digital keys, instead of differentiating between KeyConfig and DigitalKeyConfig. | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
// The base configuration struct for the DigitalKeyConfig and HEKeyConfig struct, containing the common fields. | ||
struct KeyConfig | ||
{ | ||
// Require every key config to be initialized with a key char. | ||
KeyConfig(char keyChar) : keyChar(keyChar) {} | ||
|
||
// The corresponding key sent via HID interface. | ||
char keyChar; | ||
|
||
// Bools whether HID commands are sent on the key. | ||
bool hidEnabled = false; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma once | ||
#pragma GCC diagnostic ignored "-Wtype-limits" | ||
|
||
#include "config/configuration_controller.hpp" | ||
#include "handlers/keys/he_key.hpp" | ||
#include "handlers/keys/digital_key.hpp" | ||
#include "helpers/sma_filter.hpp" | ||
#include "helpers/gauss_lut.hpp" | ||
#include "definitions.hpp" | ||
|
||
inline class KeyHandler | ||
{ | ||
public: | ||
KeyHandler() | ||
{ | ||
// Assign indicies and their corresponding HEKeyConfig to all Hall Effect keys. | ||
for (uint8_t i = 0; i < HE_KEYS; i++) | ||
heKeys[i] = HEKey(i, &ConfigController.config.heKeys[i]); | ||
|
||
// Assign indicies and their corresponding DigitalKeyConfig to all digital keys. | ||
for (uint8_t i = 0; i < DIGITAL_KEYS; i++) | ||
digitalKeys[i] = DigitalKey(i, &ConfigController.config.digitalKeys[i]); | ||
} | ||
|
||
void handle(); | ||
bool outputMode; | ||
HEKey heKeys[HE_KEYS]; | ||
DigitalKey digitalKeys[DIGITAL_KEYS]; | ||
|
||
private: | ||
void updateSensorBoundaries(HEKey &key); | ||
void checkHEKey(HEKey &key); | ||
void checkDigitalKey(DigitalKey &key); | ||
void scanHEKey(HEKey &key); | ||
void scanDigitalKey(DigitalKey &key); | ||
void setPressedState(Key &key, bool pressed); | ||
|
||
#ifdef USE_GAUSS_CORRECTION_LUT | ||
GaussLUT gaussLUT = GaussLUT(GAUSS_CORRECTION_PARAM_A, GAUSS_CORRECTION_PARAM_B, GAUSS_CORRECTION_PARAM_C, GAUSS_CORRECTION_PARAM_D); | ||
#endif | ||
} KeyHandler; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.