Git Product home page Git Product logo

Comments (9)

ajquick avatar ajquick commented on June 3, 2024

Fixes to example YAML file "3axis_v4.yaml".

549337b

from fluidnc.

bdring avatar bdring commented on June 3, 2024

We are still making subtle changes to the schema. Some of the examples are probably broken. We are also trying to improve the feedback on yaml errors.

I will try to load and fix your file soon.

from fluidnc.

bdring avatar bdring commented on June 3, 2024

I tried loading it and had similar issues. If you send $CD to show the loaded config, it appears to have loaded everything. I am not quite sure what it is unhappy about. Can you tell me what version (wifi,wifibt, bt, noradio) you loaded?

I have a new version I am working on. It appears to load fine in that. Not sure why.

I might be able to send you a compiled binary by the end of the day. The new version was only designed to allow more flexibility with the SD card and SPI bus.

from fluidnc.

ajquick avatar ajquick commented on June 3, 2024

Can you tell me what version (wifi,wifibt, bt, noradio) you loaded?

I have tested on Wifi and Wifibt with similar results.

Strangely exporting the default Test Drive ($CD=test.yaml) and then setting the config ($Config/Filename=test.yaml) also throws the same error about the configuration being bad.

from fluidnc.

bdring avatar bdring commented on June 3, 2024

Right, I don't know what the problem is. Typically saving like that is a good thing because you see all the default values for later reference.

Search the wiki for Discord. You can get live help there, but we are working on it already.

from fluidnc.

ajquick avatar ajquick commented on June 3, 2024

Tested the new binary. It is working, but I did find perhaps what part of the problem was.

This doesn't work:

name: "Wi-Fi Test"
board: "Wi-Fi Test"

comms:
  telnet_enable: true
  telnet_port: 23
  http_enable: true
  http_port: 80
  hostname: fluidnc
  wifi_sta:
    ssid: My Wi-Fi Network
  wifi_ap:
    ssid: FluidNC

But this does:

name: "Wi-Fi Test"
board: "Wi-Fi Test"

comms:
  telnet_enable: true
  telnet_port: 23
  http_enable: true
  http_port: 80
  hostname: fluidnc
  wifi_sta:
    ssid: My Wi-Fi Network
  wifi_ap:
    ssid: FluidNC

The difference is purely that there is an additional line at the end. This is the error:

[MSG:ERR: Configuration parse error: Missing end-of-line @ 13:19 key ...]

I have also found that when a Wi-Fi connection is successful, but the configuration is invalid, the device will reset to default AP settings as soon as a connection is attempted. So it will successfully connect to my STA Wi-Fi, then as soon as I open the WebUI, it resets the device in Test Drive mode.

from fluidnc.

bdring avatar bdring commented on June 3, 2024

Glad to hear you are having more success. Thanks for the feedback.

  • We we always expect a line end on all files. I added some notes about that in the wiki.
  • There is not much we can do about the default mode right now. You make some good points about Wifi issues.

I am currently working on making the config file creation less frustrating with better information. More warn and ignore and less fail and fall back to the default.

from fluidnc.

ajquick avatar ajquick commented on June 3, 2024

That would be ideal. I am working on something that I believe will be a huge help as well.

This is a JSON Schema that I have created for the YAML files.

https://gist.github.com/ajquick/d6d3b67b5b8aede986e500d3be40b5ee

Basically, JSON and YAML are very similar. JSON has a very widely adopted validation schema already where YAML pretty much has none. The conversion back and forth from YAML <-> JSON <-> YAML is fairly straight forward.

What I envision by creating this:

  • YAML configurations can be verified before being uploaded to the ESP32. (A YAML checker)
  • YAML generating programs, GUI's.. etc. can be created from the schema.
  • Documentation / Wiki can be generated from the schema to ensure all keys are accounted for.
  • Required fields and other data validation problems like typos can be found quickly and reported back.

JSON Schema libraries exist widely across many different languages, so hopefully many useful things could be created from it.

from fluidnc.

bdring avatar bdring commented on June 3, 2024

Thanks,

We have talked about making an on line tool that does exactly what you are talking about. We will eventually have a serial upload protocol for the local file system. That will help get a stable config before the Wifi is established.

Validate, upload, monitor in one place would be great.

You should join us on Discord.

https://discord.gg/PBsFB63U

from fluidnc.

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.