Open madhephaestus opened 3 weeks ago
@madhephaestus Just curious about the database usage. I saw this issue https://github.com/CommonWealthRobotics/BowlerStudio/issues/316 Is there a constructor for a LengthParameter that allows you to just pass in the name of the param? I guess I see the potential issue where the param might not exist in the data base so you need to fall back on something. In the current implementation it would be the value passed into the constructor.
I guess to make this clear maybe just add to the doc that a DB value always takes presence over default value passed to the constructor.
Am I understanding this right?
yeah, thats the point, to make sure there is always a value returned, never null. If you want to set it explicitly, you can do so with the setMM() or setStrValue() methods
So, one more question. I noticed that if I edit the json directly, the value I fudged manually dosen't stick, is bowler caching the values somewhere?
call CSGDatabase.setDbFile(CSGDatabase.getDbFile()) to re-load from file. Normal operation is to use the in-ram cache of the HashMap for speed, and saving to the file after changing values in code.
The way to access the parametric database is documented here: https://gist.github.com/ca2cfbba52c848da45e7.git