Question about adding a new parametr to the UI

edited April 23 in Questions & Answers
Hi. 
Im using Marline on Arduino mega and a raspbery pi connected via usb. Im using the pro version. my printer is working but I wanted to show some extra parameters on the UI. I was able to modify the open source UI code you provided. However, the server side is not open-source and I couldnt find a vaild method to broadcast the values to the UI's screen. what do you suggest to be able to show the parameters. note: these parameters are sensors that are measuresd in the arduino. 

Comments

  • Assuming you output them to server somehow write first a rule to detect them in server config. You can extract the values and store them in a global g-code variable (@set global.sensor1 value).
    This allows already using it inside wizard which show a dialog. In addition you can also query it sending a query to server. The action is currently undocumented and fairly new.

    Action: parseExpression
    Object: exp:"global.sensor1"

    In return object field result will contain the stored last value and you can use it like you want. All you must do is query it from time to time. Alternatively send an event when you see it and listen for the event instead then update is immediately on receiving it.
Sign In or Register to comment.