Closed Maschell closed 7 years ago
While I agree that the user doesn't need access to all of the values, I think that some things like the polling intervals have enough edge cases to warrant having them accessible. I may have a terrible connection, or want to minimize input delay on the controllers, or whatever. I don't really see a reason not to provide these in a config, even if the majority of users never touch it (most wouldn't touch it anyway, thanks to your auto-saving!) I'm still happy to merge as-is; I just think a bit more fine-grained control for those willing to tweak the config wouldn't go amiss.
Maybe one of the parameter the user could change would be "PROCESS_CMD_INTERVAL" (aka how often data is send to the app) (+maybe number of retries after a connection loss. All other value should be pretty much fixed.
Wasn't there a separate value for polling the controllers? Wouldn't be much point in changing PROCESS_CMD_INTERVAL if you couldn't change that either.
Anyway; commit/merge away!
There is one for polling the data (SLEEP_AFER_POLLING) and one for sending/processing the data/cmds (PROCESS_CMD_INTERVAL)
I like the idea of saving stuff to a config (wanted to do it anyway), but I wouldn't save all values into it. These are final paramerters and shouldn't change at all. If someone really wants to tweak it, he/she has to look at the code anyway. Then he/she can also change the value in the Settings.java itself. I have the feeling that giving the user the power to change them, it wouldn't end good.
What do you think about it?