forked from sb-ocr/cad-mouse-mk2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.h
More file actions
45 lines (33 loc) · 988 Bytes
/
Copy pathConfig.h
File metadata and controls
45 lines (33 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <Arduino.h>
namespace Config {
const bool ENABLE_TELEMETRY = true;
// Hardware pins (XIAO RP2040)
const int PIN_RIGHT_BTN = D0;
const int PIN_LEFT_BTN = D2;
const int PIN_LED_DATA = D3;
const int PIN_LED_LS = D1;
const int PIN_MAG1_LS = D10;
const int PIN_MAG2_LS = D9;
const int PIN_MAG3_LS = D8;
// Samples for calibration offset
const int ZERO_SAMPLES = 200;
// Gains and sign fixes
const float GAIN_T[3] = {28.0, 28.0, 24.0};
const float GAIN_R[3] = {18.0, 18.0, 20.0};
const int SIGN_AXIS[6] = {-1, +1, -1, +1, +1, +1};
// Dead zones
const float DEAD_T = 16.0;
const float DEAD_R = 20.0;
// Smoothing
const float SMOOTH_TAU_S = 0.08;
// Final axis output range
const float AXIS_LIMIT = 350.0;
// RGB LEDs
const int LED_COUNT = 8;
const int LED_BRIGHTNESS = 40;
const unsigned long LED_IDLE_COLOR = 0x00FF00;
const unsigned long LED_CALIBRATING_COLOR = 0x0000FF;
// FSM timing
const long IDLE_SLEEP_TIMEOUT_MS = 2 * 60 * 1000;
} // namespace Config