Announcement

Collapse
No announcement yet.

Keyboard Object Question

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

  • Bigtim
    replied
    Thanks Eran, we will keep on debugging

    What's weird is that my Arduino sketch and 4GL code is working on my system, and the comms from the screen to the Arduino work on his system (ie his magic handler is receiving the message from the screen correctly), but the message he sends to the screen in response appears not to be being picked up (a write magic bytes message) I believe the comms to the screen is working because he can perform basic event stuff like change forms etc.

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    “For total clarity, when you say ' should also be reflected on other displays (same type)' you mean the setting comes from the 4XE file I created and does not need setting 'manually' in my partners IDE?”
    Yes. When your program is compiled into a 4XE file, all settings that you set manually are compiled as well.

    “I have the gen4-uLCD-43DT there isn't a 'new version is there that could make them 'not the same type'?”
    What I meant about "the same type" is the Display Model/Unit (Same size and either Capacitive/Resistive/Non-touch). The revision number doesn’t have anything to do with it so it’s not an issue regarding with the Program Loader tool, but just in case you’re wondering, the revision number can be found on the back of the display.
    Click image for larger version

Name:	revisionNumber.png
Views:	74
Size:	560.8 KB
ID:	65239 ​​​​​​​

    Best Regards,

    Leave a comment:


  • Bigtim
    replied
    Thanks Eran,

    Our snag is that communication messages between the Arduino and the display is not working as we expected on my partners system. It works fine on my test rig (thanks to you ) but not when the same Arduino sketch and set of 4d files are transferred to my partners system which in theory is identical. We are going to do a little bit of debugging to make sure its not something stupid.

    Just wanted to check that the string buffer thing wasn't the problem which it sounds like it isn't. For total clarity, when you say '
    should also be reflected on other displays (same type)' you mean the setting comes from the 4XE file I created and does not need setting 'manually' in my partners IDE?

    Another stupid question, my friend only recently bought his screen and mine is around a year old. I have the gen4-uLCD-43DT there isn't a 'new version is there that could make them 'not the same type'?

    Tim

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    Upon compilation of your program, the String length is compiled with the value that you set the genie with. This should also be reflected on other displays (same type) when your 4XE file is loaded to theirs.

    Can you elaborate the “snag” so we can help you more?

    Best Regards,

    Leave a comment:


  • Bigtim
    replied
    Originally posted by Eran View Post
    Hi Tim,

    Congratulations on building your project.

    Workshop4 IDE folder has actually a program called LoadProgram.exe that lets you upload code without opening Workshop4 itself. The program is a straightforward program and is easy to use. You can find this in C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\DEP folder. The gci files and dat files should be manually copied to the SDCard and your project is ready.

    [ATTACH]n64824[/ATTACH]

    Also, Workshop4 offers a 7-day free trial of its Pro version. Just go to Files > Options > License and Click Start Pro Trial.

    There is another option as well that lets you transfer files using Serial Cable Utility and is posted here: https://forum.4dsystems.com.au/forum...lity#post62492


    Hope this helps and all the best for your project.
    Hi Eran,

    my development partner has hit a bit of a snag using the program loader. Code that works on my system is not working correctly on his (loaded via the programme loader)

    One thing we are not sure of, my software requires the maximum string length to be increased from the default value of 75 in the genie options. When I compile the code does this setting get 'compiled' such that his screen will also have this increased setting when the code is loaded using the programme loader?

    Thanks

    Tim

    Leave a comment:


  • Bigtim
    replied
    Fantastic thamks Eran

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    You can show the Leddigits by Writing a value to it again. The latest object to be updated will be the one shown on top.

    I have actually included the hiding/revealing of Leddigits in the sample code.

    You can always ask if you need more clarifications.

    Best Regards,

    Leave a comment:


  • Bigtim
    replied
    Thanks Eran. If i use the userbutton to hide my object, how would i go about revealing it?

    thanks for the casting code. Im away for a few days but that will certainly be a big help

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    You can hide an object using a userButton to overlap your object to hide. I have made a workaround with your other concern. Please see the sample code and compare it with what you've already made.

    Best Regards,
    Attached Files

    Leave a comment:


  • Bigtim
    replied
    Thanks Eran, will give that a try.

    Couple more questions if I may (I'm trying to optimise my code and the number of screens I'm using)

    1) Is it possible to 'cast' a numeric value held in a variable such that I can display it in a string object using the printstrings function?

    for example I have a value (say 127) held in a byte variable called editvalue, and I'd like to display the value in a stringobject using something like PrintStrings(2, editvalue, 1) ;

    I've been looking for a numeric to string convertor function but can't seem to find one?

    2) Is it possible to hide an object on a screen. I have a screen with some led digits and a string objects but sometimes I would like to hide them. Is there an attribute I can set to hide/show them?

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    Congratulations on building your project.

    Workshop4 IDE folder has actually a program called LoadProgram.exe that lets you upload code without opening Workshop4 itself. The program is a straightforward program and is easy to use. You can find this in C:\Program Files (x86)\4D Labs\4D Workshop 4 IDE\DEP folder. The gci files and dat files should be manually copied to the SDCard and your project is ready.

    programLoader.mp4

    Also, Workshop4 offers a 7-day free trial of its Pro version. Just go to Files > Options > License and Click Start Pro Trial.

    There is another option as well that lets you transfer files using Serial Cable Utility and is posted here: https://forum.4dsystems.com.au/forum...lity#post62492


    Hope this helps and all the best for your project.

    Leave a comment:


  • Bigtim
    replied
    Hi Eran, hope you are well. Our project is going well (slower than we'd like as ever but going well)

    Quick question if I may. Is it possible for me to create an 'executable' file of my code such that my development partner can upload it to his screen? He doesn't have the pro licence so I assume my code won't load in his free version of the environment? Going forwards this will also help my users to load up firmware updates too without needing the pro licence?

    Thanks in advance

    Tim

    Leave a comment:


  • Eran
    replied
    Hi Tim,

    Glad to know that we have helped you in building your project and that you’re enjoying the Magic codes.

    About your first question, Yes, "Drag and drop" is possible with Workshop4. This function, however, is limited to strings having dynamic texts. Just a short overview about string objects: A static text can be touched, but its text cannot be changed; a dynamic string’s text can be changed, but it cannot be touched. When moving a non-fixed object, it needs to be printed every time you move from one point to another, so it should be “touchable” and “dynamic”.

    Still, I have made a sample project for a “long press” function to delete a certain object. Feel free to use/ modify it.

    I’m not sure if my comprehension with your second question is right, but just in case it is, I have added a few lines in your previously uploaded code. Just drag the “Action lists” to move the lists up or down.

    You’re free to clarify your inquiry if I got it wrong of course.

    Best Regards,
    Attached Files

    Leave a comment:


  • Bigtim
    replied
    Hi Eran,

    So my development is going great thanks to your amazing support and advice.

    I just wanted to pick your brains before I set off on the next bit of the development.

    Essentially I want to implement some 'drag and drop' type functionality. In my Arduino I have a list of string type data (100 entries in the list each a 5 characters long). The 'list box' screen you helped my create calls up 5 entries from this list (using magic byte messages), displays them and when the entry is touched, I can go off and edit it and then return the edited version to the Arduino in order to update the list.

    What I'd like to do next is two things:

    1) if I do a long touch on the item in the list (i'd like my strings object containing the data to change colour) and then drag it to a 'trash icon' on the screen, I'd like to send a message back to the Arduino to delete this entry.
    2) if I do a long touch and then drag the item up or down, I'd like to be able to call up the next or previously entries in the list and depending on when I release the screen generate a message to insert the data from its original position into the new position. I'm thinking this might be possible via a combination of the magic move and magic release functions? Does that sound possible? What I'm a bit worried about is somehow being able to make repeated requests for data and update that data (ie scroll a long way through my list) whilst the user continues to hold their finger n the screen

    I suppose my initial query is, do you think this kind of list 'management' is possible?

    Leave a comment:


  • Eran
    replied
    No worries Tim! Glad it helped you.

    Best Regards,
    Eran

    Leave a comment:

Working...
X