Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with inputs of constant and frequency input of internal code blocks cannot convert k,M (thousands, mega) to respective value #271

Closed
BkPankaj opened this issue Jan 30, 2024 · 4 comments · Fixed by #272

Comments

@BkPankaj
Copy link
Collaborator

Summary:

In VisualCircuit, there is an issue where short forms of units (such as thousands, mega, milli) in input and frequency are not automatically converted when passed to JSON and subsequently to the overall output. This behavior can be considered both a feature request and an issue.

Steps to Reproduce:

  1. Set up the VisualCircuit frontend and backend for setup refer this.
  2. Run both frontend and backend with RADI.
  3. Create a simple example in the canvas.
    (If using a PID block, there is a need for Ki, Kp, Kd values inside for tuning. Writing 0.08 is not preferable; we often use 80m.)
    or
    (In the code internal block, in the frequency, write numbers with alphabets like k, M.)
  4. Examine the data.json generated by the build.

Expected Behavior:

The values should be automatically converted to their respective units according to the alphabet specified for each input.

Actual Behavior:

The alphabet remains unchanged in data.json and also verified inside the code after data.json, does not convert to respective value.

Screenshots:

(Width and height are not possible for large values, but they are included here for example purposes.)

Normal values with both canvas and data.json

Value in thousand just for example with both canvas and data.json

Value with alphabets like k with both canvas and data.json

@BkPankaj
Copy link
Collaborator Author

Hi @jmplaza , I've noticed this issue and would appreciate your verification. If it checks out, I'm eager to contribute and would be grateful if you could assign it to me.

@jmplaza
Copy link
Member

jmplaza commented Jan 30, 2024

Hi @BkPankaj ,

nice issue! Let @toshan-luktuke and @siddheshsingh26 also comment on it. Do you have VisualCircuit running on your machine?

There is no booking mechanism with the issues. Just work on any you are interested in and submit your PR solving it. The first working solution we receive and review will be merged into the master branch, so all the community has a better release of the project :-)

@BkPankaj
Copy link
Collaborator Author

Thank you for your reply, @jmplaza

Yes, I have VisualCircuit running on my machine, and all the screenshots are from my machine. I've been working on it for an hour now, but I wanted to verify this issue, so I added a comment. I understand now, and from this point forward, I will focus on working on the issue.

@BkPankaj
Copy link
Collaborator Author

I've created PR that is ready for review and merge. @jmplaza , could you please verify and merge the changes?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants