Announcement

Collapse
No announcement yet.

Progress Bar Help

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

  • 84sys
    replied
    Thanks again, Paul!

    I'll give this a whirl tonight and feed back.

    Tim

    Leave a comment:


  • pauleilio
    replied
    If the order of your rev-counter images is different to mine it might be necessary to change the start value of lastRevs to 0.

    Paul

    Leave a comment:


  • pauleilio
    replied
    Hi Tim,

    Can you try replacing your MagicCode0 with this.

    var lastRevs := 800;
    var Range := 800;

    func ImageSlide(var Baseimage var Coverimage, var range, var value)

    var xpos;
    var ypos;
    var height;
    var width;
    var step;

    xpos := img_GetWord(hndl, Baseimage, IMAGE_XPOS);
    ypos := img_GetWord(hndl, Baseimage, IMAGE_YPOS);
    height := img_GetWord(hndl, Baseimage, IMAGE_HEIGHT);
    width := img_GetWord(hndl, Baseimage, IMAGE_WIDTH);


    step := width / range;
    if(lastRevs != value)
    if(lastRevs < value)
    gfx_ClipWindow(xpos + (lastRevs * step), ypos, xpos + (value * step), ypos + height);
    gfx_Set(CLIPPING, ON);
    img_Show(hndl,Coverimage);
    gfx_Set(CLIPPING, OFF);

    endif

    if(lastRevs > value)

    gfx_ClipWindow(xpos + (value * step), ypos, xpos + (lastRevs * step), ypos + height);
    gfx_Set(CLIPPING, ON);
    img_Show(hndl,Baseimage);
    gfx_Set(CLIPPING, OFF);
    endif
    lastRevs := value;
    endif
    endfunc

    Best regards

    Paul

    Leave a comment:


  • pauleilio
    replied
    Hi Tim,

    Glad you got it running, Yes we can indeed tweak this to improve performance. As it is, we are drawing the full Rev-counter each time and we only need to draw the part that has changed. We need to introduce a new global called lastRevs and I will modify the function to just draw what has changed.

    Paul

    Leave a comment:


  • tonton81
    replied
    silly hack, you could also duplicate the widget and use the spare (which is overlapped) as current so its fresh, then you can wipe the one behind as a background process, swap when needed

    Leave a comment:


  • 84sys
    replied
    Hi,

    I got this running this evening.

    Using the magic object code snippet from Paul causes a significant impact on performance. It's hard to show in a video, but below are two videos, both sending the same data to the display, one with the magic object, one without. I dropped the range from 800 to 100 to see if this had any effect, and if anything made things worse.


    https://www.youtube.com/watch?v=suJCIb7PK6o


    https://www.youtube.com/watch?v=1kwL3WlNd2w

    I am communicating with the display at 200000 baud.

    Any suggestions for next steps? I feel we are close, just some performance tweaking to undertake.

    Thanks again for your help so far.

    Tim

    Leave a comment:


  • 84sys
    replied
    That simple? I could have probably just tried that one myself, couldn't I?

    I've not actually had chance to sit at my work bench and try this stuff yet, hoping to find some time later this evening to do so.

    Thanks so much for your help so far, impressed with your level of service!

    Leave a comment:


  • pauleilio
    replied
    Hello,

    I will test this shortly but this is the command from the Arduino for Magic object, genie.WriteObject(GENIE_MAGIC_OBJECT, 0, 1); the last value being the value to send to the revcounter.

    You can also test the Magic object with the GTX tool under the Tools tab in Workshop.

    Best regards

    Paul

    Leave a comment:


  • James_4DSystems
    replied
    There may be something in here which will be helpful
    http://forum.4dsystems.com.au/forum/...elp-or-inspire

    Leave a comment:


  • 84sys
    replied
    Paul,

    Thanks for that!

    I've been trying to track down an app-note, or some documentation of how I interact with a magic object from Arduino, but am so far struggling.

    Can you point me in the direction of some resource to help, please?

    Thanks

    Leave a comment:


  • pauleilio
    replied
    Hello,

    This is a Visi-genie example using a magic object.

    I hope this helps.

    Paul
    Attached Files

    Leave a comment:


  • pauleilio
    replied
    Hello,

    It could only be used in Visi-genie using Magic code with Workshop Pro. You don't have to compromise the look of your Rev counter. The function was merely a time saving, The method Kevin suggested will give you the result your after. I will look into a quick way of creating the images needed for your Rev counter. I will also turn this function into a magic object that you can try.

    Best regards

    Paul

    Leave a comment:


  • 84sys
    replied
    Originally posted by pauleilio View Post
    Hello,

    I have made a function that will use your 2 images if they are placed on top of each other. but it is a ViSi example and can't be used with ViSi-Genie. I have attached a demo,

    The function is called using,

    ImageSlide(Baseimage, Coverimage, Range, Value);

    I hope this helps

    Best regards

    Paul
    Is it possible to interact with this method using the Arduino library?

    Thanks

    Leave a comment:


  • 84sys
    replied
    Hi,

    Thanks a lot for your help with this, I'll hopefully have some time this evening to go through your suggestions.

    My current project is using ViSi-Genie (I'm quite new to this) and figured that would be the easiest way to get started.

    To give you a little further information on my project, and perhaps throw a bit of a spanner in the works. I am simply using the screen to display values sent to it from a Teensy 3.2 micro-controller, I use the teensy thanks to it's on-board CAN compatibility.

    So far my 4D project is working well in this fashion, just minus the rev counter. I have created custom digits, etc and this all works fine. I'm hoping I don't have to compromise the look of the rev counter to get it to work correctly with 4D.

    Thanks

    Tim
    Last edited by 84sys; 8th February 2018, 01:52 AM.

    Leave a comment:


  • pauleilio
    replied
    Hello,

    I have made a function that will use your 2 images if they are placed on top of each other. but it is a ViSi example and can't be used with ViSi-Genie. I have attached a demo,

    The function is called using,

    ImageSlide(Baseimage, Coverimage, Range, Value);

    I hope this helps

    Best regards

    Paul
    Attached Files

    Leave a comment:

Working...
X