Giter VIP home page Giter VIP logo

Comments (2)

dlarue avatar dlarue commented on July 26, 2024

But shouldn't defaults be set so it acts as a form of documentation of available options?

Otherwise, the source code would have to be probed to find out what options are available as I had to do when I noticed flash_baudrate was handled and defaulted to 115200. Often what's done is the option is commented out in the configuration file and defaults taken.

The next option would be keeping the webpages/wiki/etc updated with these options specifically for use of older system or custom configurations.

I have not checked to see if the JSON parser used can handle comments in the file. So far I've seen that the JSON writer doesn't do formatting as seen in my default.settings.json file:

pi@fabscanpi:/etc/fabscanpi$ cat default.settings.json
{"led": {"blue": 152, "green": 149, "red": 152}, "center": 0.5, "color": false, "line_coords_buffer": 5, "laser_positions": 1, "backwall": {"laser": {"y": 12.937499999999998, "x": -3.935185185185185, "z": 0.0}, "margin": 15, "laser_pixel_position": 444.0, "laser_angle": 35.005691716773715, "offset": 100}, "crop": {"upper": -128, "lower": -810}, "camera": {"saturation": 0, "contrast": 0, "brightness": 50}, "file": "/etc/fabscanpi/default.settings.json", "threshold": 106, "resolution": 12, "percent_top_pixels": 0.1}

which originally looked like this:
pi@fabscanpi:/etc/fabscanpi$ cat default.settings.jsonORG
{
"led":{
"red": 0,
"green": 0,
"blue": 0
},
"line_coords_buffer": 5,
"percent_top_pixels": 0.1,
"center": 0.50,
"threshold": 100,
"crop": {
"upper": -128,
"lower": -810
},
"backwall": {
"laser_pixel_position" : 500,
"laser": {
"x": 0.0,
"y": 11.0,
"z": 0.0
},
"laser_angle": 32.506192762678744,
"margin": 15,
"offset": 100
},
"camera":{
"brightness" : 50,
"contrast": 0,
"saturation": 0
},
"resolution": 8,
"laser_positions": 1,
"color" : "True"
}

from fabscanpi-server.

mariolukas avatar mariolukas commented on July 26, 2024

Configs are written in a readable format now. Most of the old measurement related params are not needed anymore.

from fabscanpi-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.