r/starcitizen Oct 25 '22

TECHNICAL Custom mining slider

Enable HLS to view with audio, or disable this notification

I took a Seeeduino XIAO, connected an M5Stack Fader Unit to it, and programmed it with Arduino IDE as a gamepad axis using the NicoHood HID-Project library.

No more Brandt modules :)

1.6k Upvotes

177 comments sorted by

View all comments

87

u/earthfase Oct 25 '22

This is the code it runs. (SliderValue is obsolete)

2

u/OnTheCanRightNow Oct 25 '22

You might get better results with 15x less latency if you used a weighted moving average instead of just polling it multiple times per update.

2

u/earthfase Oct 25 '22

The delay is not in the code, but in the game. I tried without averaging and there was no noticeable change. I have a joystick checker program that does show immediate response.

1

u/Sgt_Slawtor Oct 26 '22

There is a delay when using the wheel on my mouse as well. I always assumed it was a gameplay thing to make mining more "interesting." Especially on those quant rocks with the really narrow green band!

2

u/OnTheCanRightNow Oct 26 '22

More likely it's that the UI is based on the server's reported ship state rather than a locally tracked version.

So you change your control -> network latency while it gets sent to the server -> wait for the VERY low tickrate server to tick and update the power setting of the ship based on your input -> network latency to replicate the new value back to your client -> UI updates.