Reorg folders for UI/Screen/Pages i

More
03 Oct 2012 11:54 #1943 by suvsuv
Reorg folders for UI/Screen/Pages i was created by suvsuv
HI PB, I am working on devo10's GUI stuffs. After reading codes of the deviation repository and the deviation10 repository, I believe the deviation repo is much better than the deviation10. In addition, I notice that the deviation10 is not updated for over a months.
Hence ,I would like to start my work for the devo10 based on the deviation repo. I made a fork of the deviation and reorg some folders as I thought the GUI/Pages/Screen layers of the devo10 should be quite different from the devo8/6. Please check out the codes and let me know whether you are fine with the new folder structure and it is possible to have it merged back to the deviation repo.
Below are general desciption
a) Create devo10target, devo8target and devo6target folders inside the target folder, each of them has devoXX, emu_devoXX and common folders to hold files for real-device-specific, emulater-specific and common files
b) Move src/gui, src/pages and src/screens folders to under target/devo8target/common folder, which can be used for both devo8 and devo6 devices
c) Make a clone of the src/gui, src/pages, and src/screens and have them under target/devo10target/common folder. Interested parties can work on GUI stuffs for devo10 in these folders without interfere with the devo 8 GUI stuffs
d) Modify the Makefile and Makefile.inc accordingly. I tried the following make commands , all of them work on my Windows 7/8 and Mac OS environments
make
make TARGET=devo8
make TARGET=devo6
make TARGET=devo10
make TARGET=emu_devo8 WINDOWS=1 (Windows OS only)
make TARGET=emu_devo10 WINDOWS=1 (Windows OS only)
e) Move target_defs.h to the src folder as it is a common header for all devices. Also define LCD_WIDTH and LCD_HEIGHT based on the predifinition of target from the Makefile, in the future, we should used these 2 constants in all relevant codes instead of using hardcode of 320x240

Please Log in or Create an account to join the conversation.

More
03 Oct 2012 11:56 #1944 by suvsuv

Please Log in or Create an account to join the conversation.

More
03 Oct 2012 12:44 - 03 Oct 2012 13:25 #1945 by kohansey
Replied by kohansey on topic Reorg folders for UI/Screen/Pages i
I think this is good that you restructured, I was planning on doing something similar when I start the Devo 12 port.
Last edit: 03 Oct 2012 13:25 by kohansey.

Please Log in or Create an account to join the conversation.

More
04 Oct 2012 01:39 #1966 by PhracturedBlue
Replied by PhracturedBlue on topic Reorg folders for UI/Screen/Pages i
As I mentioned in another post, the devo10 code is already merged into the trunk. You should not use the code form the deviation10 repo. Maybe you figured that out already.

I understand what you are doing, and don't really agree with all of it.
the 'gui' code can basically be used as is for both the devo6, 8, and 12 (it'll need a little work for the 12, but fixing it to be portable should be pretty easy.

The screen code should be mostly common with the exception of bmp drawing routines that need to be different for each screen type.

the devo10 will likely need a completely different gui code, myguess is it will be mostly text-list based, but I haven't spent any time thinking about it yet.

I don't want the devo6 code pulling much from the devo8 dir. right now there are only a couple of files like this. I want to keep this number as small as possible. Otherwise the whole concept of a 'target' isn't being followed.

so:
a) I don't want to move the 'screen' code. it is setup by resolution, which I think will allow the best reuse
b) The gui code needs to be moved, but probably not to the target/ dir. Until I see what the devo10 interface looks like, I'm not sure where it should go

The emu could go under the 'devo8' dir, but I'm not really sure what gain there is to that. My long term goal is actually to have a single emulator thatcan select between models, though that is quite challenging with the current code organization.

The makefiles certainly need to be reorganized to make selection of the gui and screen-code easier

Please Log in or Create an account to join the conversation.

More
04 Oct 2012 05:52 #1971 by xCometz
Replied by xCometz on topic Reorg folders for UI/Screen/Pages i
I do agree with PB.

Maybe it is better to put gui into screen folder since the gui is also screen resolution related.

Please Log in or Create an account to join the conversation.

More
04 Oct 2012 14:17 - 04 Oct 2012 14:23 #1981 by suvsuv
Replied by suvsuv on topic Reorg folders for UI/Screen/Pages i
Thanks for above comments of both PB and xC. I now moved the screen back to under the src folder, and made minor change in the lcd_screen.c since devo10 could have a better performance LCD_Clear().
In terms of the gui folder, I don't believe devo10 could use any existing gui widgets because its' LCD has only black and white colors , hence can't support too much image-drawing, and properties such as OBJ_SET_TRANSPARENT()/OBJ_SET_MODAL. Though we can use "#ifdef devo10" to let the gui widgets be more flexible to different devo types, it will make the gui codes less readable and bug-prone to devo8, which is quite stable with PB's hard-working :lol:

Currently ,the emulator of devo10 is working properly without any hardcoding, I start to draw the main page and might have better thought about how to re-use devo8's gui codes. Your guys' comments and suggestions are highly appreciated
Last edit: 04 Oct 2012 14:23 by suvsuv.

Please Log in or Create an account to join the conversation.

More
05 Oct 2012 02:21 #1997 by PhracturedBlue
Replied by PhracturedBlue on topic Reorg folders for UI/Screen/Pages i
I expect to need the following gui widgets for the devo10:
Modal dialog (used the same as on the devo8 to present important messages)
scrolling (text) listbox (used for virtually all settings...similar to the original firmware, this will likely be the primary widget used for all configuration)
button (for the modal dialog. Not sure if it is otherwise needed)
xy graph (for showing the curves)
bar graph (for showing values and trims)

I'm not sure about the spinbox yet, though we definitely need a way to set values effectively.
We'll need a keyboard like widget, but I'm not sure how to best do it. Maybe like Devention does.

The drawing will be different (using rectangles rather than bmps) so the actual functions will likely need to be rewritten (though we'll see...maybe we can just abstract it reasonably)
but we may be able to reuse the widget handling code (or maybe that is a bad idea) I really don't know yet.
I'm definitely open to suggestions on this.

Please Log in or Create an account to join the conversation.

More
05 Oct 2012 05:17 #2000 by Ceasar
Replied by Ceasar on topic Reorg folders for UI/Screen/Pages i
I'm not a developer, but I have read a little around er9x for Turnigy 9x.
And the display resolution and lcd looks close to Devo10.
Just an idea, could it be possible to reuse the Gui from er9x instead of rewriting it for devo10 ?
Remember I'm not a developer so take it as a simple noob question ;-)

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds
Powered by Kunena Forum