how do I limit the display to only display the first four characters of the parameter to level enough space for the value?

Hi, I am not entirely new to arduino or OSC, but I am very much at the modifying scripts stage and slowing working things out. So any help is great appreciated

I am using a 128x128 tft screen.

Looking at the script the parameter OSC field is used for OSC and for the display.

This is great when it comes to Pan,Tilt, Zoom etc but becomes a mess once I get beyond 4 characters.

is there a way to limit the number of characters displayed, so Diff of Diffusion.

Alternatively could the labelling be done so that the display is separate to the parameter? so Gobo_Wheel_1 is Go 1 and GoR 1 for example?

Parents
  • There are several ways to deal with this but all of them are going to require a better processor than a nano.  You can build a table of parameter names to look for and then change the display bases on that but it is going to eat up ram as sstaub has pointed out.  There isn't a complete list of parameters readily available.  If you look in the CIA you can see a what parameters are in the patched fixtures but it won't be all the possible parameters.  I would suggest just dealing with the parameters you need and change the code in the  future when necessary.  There are some ways to make text scroll so you could include the entire parameter name but those will also eat up ram.  

Reply
  • There are several ways to deal with this but all of them are going to require a better processor than a nano.  You can build a table of parameter names to look for and then change the display bases on that but it is going to eat up ram as sstaub has pointed out.  There isn't a complete list of parameters readily available.  If you look in the CIA you can see a what parameters are in the patched fixtures but it won't be all the possible parameters.  I would suggest just dealing with the parameters you need and change the code in the  future when necessary.  There are some ways to make text scroll so you could include the entire parameter name but those will also eat up ram.  

Children
  • Understood. I am pretty sure I came across quite a lot of documentation of OSC and EOS.

    Ultimately I am not looking to access everything, just interested in what was accessible. 2 pages of 3 works fine for me if I am honest. its more important to keep the unit compact, going through page after page would be far from ideal. The original Box1 work fine, but just having control of edge, zoom and iris would be nice, this leaves me with a spare position so logically diffusion seemed to be the obvious candidate.

    One simple workaround for me is to simply take diffusion out and replace it with CTO which would work with the display restrictions.

    I will look into the pico for the next build.

  • Is it not already built in to the script, to display a different parameter label.

    struct Parameter {
    String name;
    String display;
    float value;
    float lastDisplayed;
    };
    const uint8_t PARAMETER_MAX = 6;
    struct Parameter parameter[PARAMETER_MAX] =
    {
    // {"empty", "--"},

    the part after the comma in the {

    emtpy being displayed as -- in that example?

    Looking through your modifiation sstaub eg

    {"thrust_A", "ThrustA"},

    Is that not what that does, use thrust_A as the OSC parameter but display ThrustA to the display?