Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/headers/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
#define CFG_CALIBRATION_LONG_FACTOR 4
#define CFG_CALIBRATION_PROGRESS_BAR 40

#define SENS_MULTIPLIER_X 1
#define SENS_MULTIPLIER_Y 1
#define SENS_MULTIPLIER_Z 1

#define CFG_GYRO_SENSITIVITY (pow(2, -9) * 1.45)
#define CFG_GYRO_SENSITIVITY_X (CFG_GYRO_SENSITIVITY * 1)
#define CFG_GYRO_SENSITIVITY_Y (CFG_GYRO_SENSITIVITY * 1)
#define CFG_GYRO_SENSITIVITY_Z (CFG_GYRO_SENSITIVITY * 1)
#define CFG_GYRO_SENSITIVITY_X (CFG_GYRO_SENSITIVITY * SENS_MULTIPLIER_X)
#define CFG_GYRO_SENSITIVITY_Y (CFG_GYRO_SENSITIVITY * SENS_MULTIPLIER_Y)
#define CFG_GYRO_SENSITIVITY_Z (CFG_GYRO_SENSITIVITY * SENS_MULTIPLIER_Z)

#define CFG_MOUSE_WHEEL_DEBOUNCE 1000
#define CFG_ACCEL_CORRECTION_SMOOTH 50 // Number of averaged samples for the correction vector.
Expand Down
16 changes: 16 additions & 0 deletions src/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ static void title(char *label) {
#endif
}

static void fw_info(int rate, float yaxis, float led) {
info("Poll rate: %dhz\n", rate);
info("Y-ratio: %.1f\n", yaxis);
info("LED brightness: %.2f\n", led);
}

static void set_wired() {
info("LOOP: Wired\n");
if (device_mode != WIRED) power_restart();
Expand Down Expand Up @@ -130,6 +136,11 @@ void loop_controller_init() {
stdio_init_all();
logging_init();
title(LABEL_CONTROLLER);
fw_info(
CFG_TICK_FREQUENCY,
SENS_MULTIPLIER_Y,
CFG_LED_BRIGHTNESS
);
config_init();
tusb_init();
bool usb = usb_wait_for_init(USB_WAIT_FOR_INIT_MS);
Expand Down Expand Up @@ -158,6 +169,11 @@ void loop_dongle_init() {
stdio_init_all();
logging_init();
title(LABEL_DONGLE);
fw_info(
CFG_TICK_FREQUENCY,
SENS_MULTIPLIER_Y,
CFG_LED_BRIGHTNESS
);
config_init();
tusb_init();
usb_wait_for_init(-1); // Negative number = no timeout.
Expand Down