Announcement

Collapse
No announcement yet.

Angular meter - AngleOffset

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Angular meter - AngleOffset

    Hello All,

    I just started with the 4Duino module and are creating a display/GUI with some guages.
    I like the Angular meter but then without the arrow. I would like use the angleoffset to control
    the gauge indication. But is the AngleOffset available in code and can it be changed runtime?

    Best regards
    Jacob

  • #2
    Dear Jacob,

    Welcome to 4D Forum.

    May I confirm that you would want to create a GUI with similarity to a compass?
    I have placed the 4D Digital Compass project link below for your reference.
    https://www.4dmakers.net/projects/details/digital-compass

    While the Angular meter can be displayed without an arrow indicator, we regret to inform you that its AngleOffset cannot be changed during runtime.

    Alternatively, you may use the Video widget or the User Image widget to display changing frames.
    Below includes the file which was used in the project above.
    https://www.dropbox.com/sh/w0n7g9aa27bpmja/AADAyvVBn12FYLQoqQIETenYa?dl=1
    This program uses a Video widget to flash rotating-like compass images.
    However, this procedure may take time as it would require you to modify every single frame to be displayed.

    The last option would be using the Smart Gauge which is included in the Workshop4 PRO version.
    This allows you to customize your widgets according to your design.
    To start your 7 days free trial,
    1. Open Workshop4 IDE
    2. Choose Options
    3. Under the License tab, click Start Pro Trial then OK

    I hope the above helps.
    And if you would require further assistance, please do not hesitate to contact us anytime.

    Best Regards,
    Danica

    Comment


    • #3
      Hello Danica,

      I used the Pro version to create circular progress bar which is exactly what I wanted so thanks for that pointer.

      I now have the smart gauge in my project and it behaves in the workshop how I want it. I'm now trying to get a value
      into the gauge. The example only shows how to use a input object but for my project I would like to write a calculated value.

      Jacob

      Comment


      • #4
        Hello Jacob,

        Glad to hear our solutions worked for you.

        Referring to the CoolGauge sample 4Duino projects,
        You can see these sample projects by going to Samples under the File tab, click the 4D Labs drop-down button, choose 4Duino, then Extended Graphics.

        The line 93 as quoted below prints the value to the Gauge.
        Display.img_SetWord(hndl, iCoolgauge1, IMAGE_INDEX, random(0,101) );
        Please be reminded that the values should be integers from 0 to the maximum value you've set your gauge.

        I hope the above helps.
        Should you need any further assistance, please do not hesitate to contact us anytime.
        Danica

        Comment


        • #5
          I forgot the img_Show after setting the correct index. All is working perfectly now. Many thanks for the help and the fast response.

          Jacob

          Comment


          • #6
            You are most welcome, Jacob.
            Please feel free to contact us anytime if you need any further information.
            Best Regards,
            Danica

            Comment

            Working...
            X