qmk_firmware
qmk_firmware copied to clipboard
Replace pimoroni trackball driver.
Description
WIP
Types of Changes
- [x] Core
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
- [ ] Keymap/layout/userspace (addition or update)
- [x] Documentation
Issues Fixed or Closed by This PR
Checklist
- [x] My code follows the code style of this project: C, Python
- [x] I have read the PR Checklist document and have made the appropriate changes.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
Tested it and it runs smoothly. Only problem is, the cursor moves so slow/less even if i turn up the settings in the Mac System Mouse preferences. Any solution for that?
Tested it and it runs smoothly. Only problem is, the cursor moves so slow/less even if i turn up the settings in the Mac System Mouse preferences. Any solution for that?
@BenRoe I haven't pushed this any further as the driver behaves differently depending on how frequently the trackball is polled. A solution could be to limit the polling rate with #define POINTING_DEVICE_TASK_THROTTLE_MS 8
in config.h, would you mind testing this? It should accelerate with quick repeated trackball movements.
#define POINTING_DEVICE_TASK_THROTTLE_MS 8
Hello,
~~i test it with Throttle_MS but it's jaggy.~~ [Used wrong branch]
Works much better with #define POINTING_DEVICE_TASK_THROTTLE_MS 8
Also found out that the ball rolling mechanism was defective. Replaced it from an other Trackball module.
Hi! This has completely changed my experience with the Pimoroni. The only downside is that I seem to have lost its LED functionality. Previously, I was using:
void keyboard_post_init_user(void) { pimoroni_trackball_set_rgbw(0,0,0,100); }
That code doesn't seem to work with your driver. Is there another way that I can talk to the LED or something that I am missing? Thanks!
It should still be working, I did add a check so it'll only write if there's been a successful read. I guess there might be a condition on boot where the i2c read isn't successful. You mind trying this instead as a test? @mbissonn
void housekeeping_task_user(void) {
pimoroni_trackball_set_rgbw(0,0,0,100);
}
The above code will run every loop.
No luck with the LED, but running the command every loop did noticeably decrease the smoothness for me.
No luck with the LED, but running the command every loop did noticeably decrease the smoothness for me.
Do you have discord? Probably better to do the troubleshooting on there if we can. https://discord.com/invite/Uq7gcHh
I just tested this PR, and in order to use it with the rebased version of QMK it requires one change in line 80 of pimoroni_trackball.c
:
pd_dprintf("Trackball READ i2c_status_t: %d L: %d R: %d Up: %d D: %d SW: %d\n", last_i2c_status, data->left, data->right, data->up, data->down, data->click);
Gotta say, it behaves MUCH better when using it in combination with #define POINTING_DEVICE_TASK_THROTTLE_MS 8
.
Now my question is.. why is this not merged? Is there a problem/bug in it? I am not so well versed in this device but it looks good to me
Mostly, it's just waiting on dasky to confirm that it's ready to go.
I apologise for the delay, this has sat far too long now. I will be closing this PR without merge.
The expected behaviour only really works with a polling rate of 8ms as polling at faster rates reduces to the movement deltas to 1-2. I'll probably try for a simpler driver again at some point in the future.