Pages: 1 ... 6 7 [8] 9   Go Down
Author Topic: Due GUI (Graphical user interface) - [now community project]  (Read 33090 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Darren,

Well thankyou for all your efforts with this project that gave us the start point.....

It would be nice to see your face around here again at some time in the future should you be able to find the time.... smiley-grin

Regards,

Graham

Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm still about just not as often as I would like at the moment.  I have several hobbies on the go at the same time with one of them being rebuilding my land rover which is nearly there now.  Once that is up and running I have lots of ideas for things in my electronics workshop which I've spent quite a bit to build up but not had much chance to use yet PCB plant (MEGAUK kit D - http://www.megauk.com/pcb_kits.php), colour digital storage scope, SMD rework station & preheater, nice bench PSU etc etc not to mention a vast array of parts.  I've had some great ideas for gadgets and gizmos for the landrover but they will have to wait till it is actually water proof smiley-grin

Anyway I will be hovering about and I have a good few ideas for future objects such as rev counter type dials, gauges and other car related stuff.

Logged

UK
Offline Offline
Sr. Member
****
Karma: 7
Posts: 436
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just changed the thread title too......

Let me know if it needs changing again to reflect versioning etc.
Logged

UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just changed the thread title too......

Let me know if it needs changing again to reflect versioning etc.

Its nice to see you are still around, and if you feel inclined to stay involved that would be good! smiley-grin

mmmm  rover of any description land or otherwise, they never were great in the wet!!  smiley-lol

G
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Darren and Graham,

"..I got was a cryptic response from someone rather than a useful explanation of how to call one library from another!"

This one had me for a while. It wasn't until how I saw how UButtons was implemented by Hennings, that I figured it out. I have been on the fence about how a GUI with limited memory should be implemented. It would be nice to be able to have a true OO implementation. I am not a static member expert, but I believe a static method cant access member variables, which is what we would really need, so that all the object methods would reside in flash, and just the variables(which are currently in an array form) would reside in SRAM.  I think the best implementation given the Arduino constraints would be to leave it in an indexed array methodology as it currently is.

Btw, I noticed that in last post I failed to mention how to instantiate the DUEGUI object, for others to see:

Code:
#include <UTFT.h>
#include <UTouch.h>
#include <DUEGUI.h>     

UTFT myutft(HX8352A,22,23,31,33);                   
UTouch touch(25,26,27,29,30);
DUEGUI DueGUI(&myutft, &touch);

Thank you Darren for your support. Time is a precious thing, and I can relate to having to many projects and to little time. smiley

Thanks,
Edward
Logged

UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Btw, I noticed that in last post I failed to mention how to instantiate the DUEGUI object, for others to see:

Code:
#include <UTFT.h>
#include <UTouch.h>
#include <DUEGUI.h>    

UTFT myutft(HX8352A,22,23,31,33);                  
UTouch touch(25,26,27,29,30);
DUEGUI DueGUI(&myutft, &touch);

Thank you Darren for your support. Time is a precious thing, and I can relate to having to many projects and to little time. smiley

Thanks,
Edward

Hmm, what shield are you using with your display? That is not a combination of pins I have seen before....

My tuppence for what it is worth, I think the coldtears DUE shield was probably the first to come out, and naturally mates well with the CTE displays so far favoured by this project until now. As such I think it is worth mentioning the initialisation code for that situation.

Code:
UTFT       myGLCD(ITDB32S,25,26,27,28);
UTouch  myTouch(6,5,32,3,2);
DUEGUI  DueGUI( &myGLCD , &myTouch);

@Edward
,
Quote
The DUEGUI UTouch->getX and getY have to be fudged. I noticed that on my display UTouch doesnt work quite right. So the getX and getY functions take the absolute values and corrects for X and Y.

Is this also the case with the genuine Henning library examples? Also what about the calibration routine? I was just thinking if possible it would be better to cure the cause, not the symptom. Since the underlying aim is now to produce a hardware independent DUEGUI, I just wonder if this fix could potentially cause problems as yet unknown on different hardware?

Was just wondering where the error may have cropped up.

I am still tinkering and going through the changes you have made, I also have yet to finish my test sketch which will essentially just be a modified version of Darren's original demo.

HOWEVER...............This is where I got distracted and went off at a tangent...... I don't like the single 16x16 font option, I was thinking it would be nice to assimilate a variety of fonts which would be a close approximation to the CTE Font ic fonts. The first problem with that idea is 34 point is not divisible by 8... similarly, neither is 28 which are the two principle font sizes in DUEGUI so far that I have encountered.

I was also thinking this is specifically to you Edward, is there anything in particular you want me to try/test/do for you, as I suspect I am likely to go off on several tangents with this thing..... smiley-roll

Regards,

Graham
« Last Edit: November 21, 2013, 11:22:22 am by ghlawrence2000 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I use the elechouse 3.2" display that rotates the display so that you can still get to the other headers.  I think most displays have the 0-3900 a2d read back range. Its in the conversion to XY that it need to be fudged based on display size and rotation of the touch film and how it was placed.

Thanks,
Edward
Logged

UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

I am still tinkering with the text/font side of things, while doing so I came across this slight gremlin if anybody else is still playing with this?.....smiley-roll smiley-razz

Just a small bug in date format, 2 digit did not work correctly, here's the fix:

Code:
void DUEGUI::setObjectDate(int objectNumber,int yyyy, int month, int day, bool dateNorm, bool dateFour){
  if (dateNorm){
    GUIobject_top[objectNumber]=displayNumFormat(day,2)+"/"+displayNumFormat(month,2);
  } else {
    GUIobject_top[objectNumber]=displayNumFormat(month,2)+"/"+displayNumFormat(day,2);
  }
  if (dateFour){
    GUIobject_top[objectNumber]=GUIobject_top[objectNumber]+"/"+String(yyyy,10)+" ";
  } else {
    GUIobject_top[objectNumber]=GUIobject_top[objectNumber]+"/"+String(yyyy,10).substring(2)+" ";
  }
}

Regards,

Graham
Logged

UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Edward/Ediaz,

Are you still following this thread?

Now I have a preliminary tentative working sketch, I have a few points, one of which I think we perhaps need to collaborate on, the others I only mention that I have discovered, not that I have tried to diagnose or resolve yet.

1st) Touch is flipped on the X axis, but as you will be aware the

Code:
DueGUI.setReverseX(1);

command no longer works as you stripped out the gubbins relating to it.

2nd) Unhide does not appear to work, as yet i have not persued why.

3rd) Text input formatting errors, such as ##, Cap and Space are all stacked and overlapping, again not persued yet, maybe this will resolve itself once I have done more with available font sizes.

My feeling is that we need to resolve the touch side of things more universally than at present, but I did not start to do anything about that yet, if you are still interested in trying to make this a universal project it has to be the way to go.

It would have been nice if there was more interest in this project, besides you, myself and of course Darren!!  smiley-cry

Regards,

Graham
« Last Edit: December 06, 2013, 11:06:35 am by ghlawrence2000 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Yes I agree. There needs to be a universal calibration method. The best way would be for a first time run to calibrate and self-flash the value on a known address. Maybe at the top of the flash space. On subsequent power-on events, if the values exists in flash memory, no calibration would be required(touch four corners).

(It looks like we can use the EEPROM area for what we want)   http://www.arduino.cc/en/Reference/EEPROM
To store the results of the initial calibration test.

I have been busy with holidays, family, and I sneek some Arduino time in when possible. Also trying to teach myself clojure.

Thanks,
Ed Diaz

« Last Edit: December 10, 2013, 04:38:16 pm by ediaz » Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

demos in original post do not compile... ide 1.5.5 due
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I can not insert images with DueGUI.addImage function. Only pictures of example DueGUI_demo_02 work.
Here is my code:

    #define URNTB1 1
    #define URNTB2 2
    #define URNRemove 3
    #define URNAdd 4
    #define URNRefresh 5
    #define URNFanScreen 6
    #define URNInputScreen 7     
    #define URNClockScreen 8
    #define URNCalibrate 9
    #define URNProgressbar 10
    #define URNProgressbar2 11
    #define URNghostbutton 12
    #define URNimagebutton1 13
    #define URNimagebutton2 14
    #define URNstringcycle 15
    #define URNimageLogo 16   


    DueGUI.InitGUI(6,5,32,3,2,52,2,51);
    DueGUI.addImage(320,120,287,true,URNimageLogo);
    DueGUI.drawImage(URNimageLogo);
    delay(4000);
    // Display "main_menu" screen
    DueGUI_createScreen(main_menu);

When I use it in another program the CTE_LCD.Load_image function (320,120,287), it works

Can someone tell me how to insert pictures (I may be wrong in transferring the images from the SD card to the EEPROM, or am I wrong location)?

Thank you and happy christmas
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I am trying to see if this library is still being developed?

Ediaz, I believe your approach to decouple the library from UTFT is on the right track as UTFT is
being updated and we'd need to keep it up to date easily.

Can you shine some light on the status of the library now? it would be great if we can get it
hosted on SVN and start some documentation, perhaps I can pinch in as well along side
other motivated developers. I just can't reach anyone about this library.

Thanks
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody

I follow this thread from the start. I never interfere because my knowledge in C is limited (about 20%) but I involved many times in HMIs as my job is full time Industrial automation (commercial PLC and custom made).
@cowasaki  did a grate start and really inspired me until the final grate idea @ediaz had to separate DUEGUI from UTFT libraries  (like  UTFT_Buttons.h works).

So far I was unable to run ANYTHING using DUEGUI. I have version Arduino IDE 1.5.5, I did all modifications @ediaz recommended but when I compile "DueGUI_demo_02 work" I have errors...

"DueGUI_demo_02.ino: In function 'void setup()':
DueGUI_demo_02:382: error: conversion from 'int' to 'String' is ambiguous
C:\Program Files\Arduino\hardware\arduino\sam\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
C:\Program Files\Arduino\hardware\arduino\sam\cores\arduino/WString.h:59: note:                 String::String(const char*)
"
Anyway maybe it is nothing but I do not want to look around and lost. I am willing to help @ediaz in any way I can (with my experience in commercial and custom made HMI programs) . @cowasaki as far as I remember is still with us but doing some work on his car.

So please where is the final code so far? can it run in 1.5.5? I want to help in any way
I know is Christmas but this project is joy or not?
Happy new year to everybody
Vasilis
Greece

Logged

UK
Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


"DueGUI_demo_02.ino: In function 'void setup()':
DueGUI_demo_02:382: error: conversion from 'int' to 'String' is ambiguous
C:\Program Files\Arduino\hardware\arduino\sam\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
C:\Program Files\Arduino\hardware\arduino\sam\cores\arduino/WString.h:59: note:                 String::String(const char*)
"

So please where is the final code so far? can it run in 1.5.5? I want to help in any way
I know is Christmas but this project is joy or not?
Happy new year to everybody
Vasilis
Greece



Vasilis, Hi  smiley

Yes more people joining in with this would be good, I must admit I have had a few weeks of other stuff to do, but the immediate 'cure' for that particular error is

Code:
//  (c) 2013 Darren Hill (Cowasaki)
//
#define VERSION "0.13"  <--------------------  NOTE quotes!
//
//  This program is not as yet complete.  There are a number of missing features and features not fully implemented.

I cannot as yet comment on suitability of IDE 1.5.5 as I am still on the previous release.
While I was busy creating the zip and making sure it worked, I got 1.5.5. and can confirm that it works fine  smiley-grin. FWIW, this is the current library, complete with working example for a SSD1289 based 320*240 display and CTE shield.

There is much more to be done with this as only the main screen is correctly formatted as yet, there are problems with invisibility which is as far as I got, since my touch screen is also not working correctly, and I got bogged down with a few other things too, but HOPEFULLY, this should give something at least visible and working on screen.

@marbeuhan08, I have not got as far as trying to play with image buttons yet, maybe ediaz could comment further, as far as I am aware he was looking into image storage in flash, but my own thoughts are SD (since I already modified UTFT_tinyFAT to retrieve images using sdfatlib)...... More input/discussion is needed on several aspects of this project, but sadly to date, all modifications from cowasaki's original library are entirely the work of ediaz, I can not take any credit for the work done so far.

@fadik, ediaz is currently the leading light on this project, although I am dabbling in a few areas myself at the moment, it would be great to have more eyes on this project, github is another possibility for collaboration, I don't know if Ed has any thoughts?

@ed the only differences between (ediaz) and (ghl-tweaked) versions, is that I added back in all the spaces you removed so I could do line by line side by side comparison to original cowasaki version, and also slight change to 'posCentre' parameter, and also 2digit date format.

The included archive as it stands, and the ghl_DueGUI_CTEshield_320x240_SSD1289 example is formatted nicely. The ediaz version of the library will rapidly show the differences  smiley-wink

HAPPY NEW YEAR everyone !!!  smiley-grin

Regards,

Graham

* DUEGUI.zip (86.1 KB - downloaded 41 times.)
« Last Edit: December 30, 2013, 04:53:33 pm by ghlawrence2000 » Logged

Pages: 1 ... 6 7 [8] 9   Go Up
Jump to: