1
0
mirror of https://github.com/whowechina/chu_pico.git synced 2025-02-22 04:39:30 +01:00

Better defaults

This commit is contained in:
whowechina 2023-09-23 14:23:33 +08:00
parent afa9db9b2d
commit ea77b1164b
3 changed files with 8 additions and 7 deletions

Binary file not shown.

View File

@ -11,8 +11,8 @@
#include "slider.h"
#include "save.h"
#define SENSE_LIMIT_MAX 7
#define SENSE_LIMIT_MIN -7
#define SENSE_LIMIT_MAX 9
#define SENSE_LIMIT_MIN -9
#define MAX_COMMANDS 20
#define MAX_PARAMETERS 5

View File

@ -30,11 +30,12 @@ static chu_cfg_t default_cfg = {
.pitch = 18,
},
.sense = {
.debounce_touch = 0,
.debounce_release = 1,
.filter = 0x11,
.debounce_touch = 1,
.debounce_release = 2,
},
.hid = {
.joy = 0x0f,
.joy = 1,
.nkro = 0,
},
};
@ -57,12 +58,12 @@ static void config_loaded()
chu_cfg->sense.filter = default_cfg.sense.filter;
config_changed();
}
if ((chu_cfg->sense.global > 7) || (chu_cfg->sense.global < -7)) {
if ((chu_cfg->sense.global > 9) || (chu_cfg->sense.global < -9)) {
chu_cfg->sense.global = default_cfg.sense.global;
config_changed();
}
for (int i = 0; i < 32; i++) {
if ((chu_cfg->sense.keys[i] > 7) || (chu_cfg->sense.keys[i] < -7)) {
if ((chu_cfg->sense.keys[i] > 9) || (chu_cfg->sense.keys[i] < -9)) {
chu_cfg->sense.keys[i] = default_cfg.sense.keys[i];
config_changed();
}