Can Any help me with my F7

More
30 Apr 2015 03:19 #31827 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, I'm working in the character map, I'm using the "centered dot" for the trimer. it's showing well for the horizontal trim. the code is not ready. the next is the vertical trim, I mapped the vertical bar, but it doesn't work. In the data sheet there are 2 notes for 0x7e and 0x7f.
Mr google say:

NOTE1: display off
NOTE2: 2-byte contiguous mode end flag
what that mean?

the other question is, where I must call the function for the trim bar (for showing in the main screen).
I put the code for testing into main_page.c after :
GUI_CreateLabelBox(&gui->name, 0, 0, //64, 12, 0, 0, &DEFAULT_FONT, NULL, NULL, Model.name);
but I know that is not the right place.

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

More
30 Apr 2015 03:46 #31828 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
the 7e and 7f characters are special characters for terminating a line write (multi-character writes). You should never use them.
With the latest code, I have mapped all characters, and you have access to the special characters through defines in char_map.h

Also note that I significantly reworked the screen code in the commit I just pushed. The code now supports using the 2x font as well as the normal font. Using it is tricky since it changes how all characters below are displayed. I'm not sure if we should actually allow it, but it might be useful for the main screen

the trims will be placed in main_page.c, but the entire file needs to be rewritten. In general we'll follow the code from pages/128x64x1/main_page.c but may need to disable some of the object types. Basically the idea is that the screen is fully customizable (see layout/default.ini in the filesystem)
I can work on that soon, but for now you need to get the widgets working properly. hard-coding them into main_page.c is fine for the time being.

If you look at the latest tx_configure.c and model_page.c you can see how I am sharing the devo10 code in the text display. that won't work everywhere, but it is good to do wherever possible, since it reduces support maintenance.

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

More
30 Apr 2015 04:02 #31829 by djtrance
Replied by djtrance on topic Can Any help me with my F7
i'm downloading the las code. and I will try to update my code to show the trims bars, but I'm still learning how it's work, I hope soon to have a functional bar.

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

More
30 Apr 2015 04:15 #31831 by djtrance
Replied by djtrance on topic Can Any help me with my F7
I'm receiving this error:
Could not locate character U-28ff68
:(

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

More
30 Apr 2015 04:59 #31832 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
you are getting junk sent into LCD_PrintCharXY
do you know how to use gdb to debug this?
You should be able to do:
gdb ./emu_devof7.exe
break lcd.c:127
r
then when you get that message, you should see the console give you a prompt
you then do:
bt

which will show you the call trace. Hopefully you can then figure out why junk got passed into the function.
If you can't figure it out, check everything into bitbucket and push your changes and I can take a look.

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

More
30 Apr 2015 21:10 #31862 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB,
the gdb returned this:
Starting program: C:\MinGW\msys\1.0\home\vicky_win7\7f\src/./emu_devof7.exe
[New Thread 2052.0xcf4]
[New Thread 2052.0x16c4]
[New Thread 2052.0x1568]
[New Thread 2052.0x11e4]

Breakpoint 1, LCD_PrintCharXY (x=4761488, y=2686704, c=2686824)
at target/emu_devof7/lcd.c:127
127 printf("Could not locate character U-%04x\n", (int)c);
(gdb)

But I'm not sure what happen. I have downloaded all code again, but I have the same problem. but only with the f7 emulator.

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

More
30 Apr 2015 21:34 #31863 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
you need to run 'bt' to see the back trace and determine where the value came from I do not see this in the emulator, but I don't know exactly what steps you use to reproduce it

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

More
30 Apr 2015 21:44 #31864 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB,
the emulator can't start, exactly before the emulator try to show the blue screen (can show the tabs of the controls), report a error.
gdb ./emu_devof7.exe
(gdb) break lcd.c:127
Breakpoint 1 at 0x4018aa: file target/emu_devof7/lcd.c, line 127.
(gdb) r
Starting program: C:\MinGW\msys\1.0\home\vicky_win7\djtranceDevof7\src/./emu_
of7.exe
[New Thread 812.0x1394]
[New Thread 812.0xdcc]
[New Thread 812.0x151c]
[New Thread 812.0x128c]

Breakpoint 1, LCD_PrintCharXY (x=4761520, y=2686704, c=2686824)
at target/emu_devof7/lcd.c:127
127 printf("Could not locate character U-%04x\n", (int)c);
(gdb) bt
#0 LCD_PrintCharXY (x=4761520, y=2686704, c=2686824)
at target/emu_devof7/lcd.c:127
#1 0x004047fb in Init () at main.c:121
#2 0x00404657 in main () at main.c:40
(gdb) bt
#0 LCD_PrintCharXY (x=4761520, y=2686704, c=2686824)
at target/emu_devof7/lcd.c:127
#1 0x004047fb in Init () at main.c:121
#2 0x00404657 in main () at main.c:40
(gdb)

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

More
30 Apr 2015 22:19 #31866 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
That is weird.
at line 121 in main.c I have LCD_Init() which doesn't call LCD_PrintCharXY()

is yours the same?

you could try doing:
make distclean
make TARGET=emu_devof7

Then:
gdb ./emu_devof7
b LCD_PrintCharXY
r
it should now break atthe 1sttime LCD_PRintCharXY is called. running 'bt' there may give more info.

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

More
30 Apr 2015 23:42 #31867 by djtrance
Replied by djtrance on topic Can Any help me with my F7
I think that the problem is that in f7 screen I'm using char_map with this key 0x24 ($) and 0x3d (=). I know how to map on f7, but I'm looking how to map for emu.

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

More
30 Apr 2015 23:48 #31868 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
I just pulled your latest code and ran the emulator. It doesn't display the bargraph, but it also doesn't send the message you noted. Did you try 'make distclean'?

The reason the bar doesn't display is that the gui doesn't work that way. I assume the current code is just for debug, since you seem to have coded the h-trim properly already

I swapped the code to:
diff -r 5e0031d417ff src/pages/text/main_page.c
--- a/src/pages/text/main_page.c	Thu Apr 30 17:20:46 2015 -0400
+++ b/src/pages/text/main_page.c	Thu Apr 30 16:46:08 2015 -0700
@@ -66,7 +66,7 @@
 
     GUI_CreateLabelBox(&gui->name, 0, 0, //64, 12,
             0, 0, &DEFAULT_FONT, NULL, NULL, Model.name);
-	_bargraph_trim_horizontal2(1, 10, 9,10);
+    GUI_CreateBarGraph(&gui->elem[0].bar, 1, 10, 9, 10, -10000, 10000, TRIM_INVHORIZONTAL, NULL, 0);
 	
     show_elements();
     //Battery
and it seems to work properly.

So it looks like whatever is wrong is in your build environment, since mine seems ok. Are you on Windows? I am working on Linux and that maybe why mine works. I will re-build on Windows and see if I can duplicate your issue.

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

More
30 Apr 2015 23:50 #31869 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
the emu works just like the f7. the map function is the same. You don't need to do anything special to get it to work.

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

More
30 Apr 2015 23:52 #31870 by djtrance
Replied by djtrance on topic Can Any help me with my F7
I'm working on windows (with virtual machine), maybe is better to use it on mac, but I never use it with arm toolchain.

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

More
30 Apr 2015 23:54 #31871 by djtrance
Replied by djtrance on topic Can Any help me with my F7
I have not uploaded my last code... but there are some problem with this... you can see the bar, but if you go to some menu and return to the main screen you can see it for a half of second. this happen since yesterday. before of this.. work well

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

More
01 May 2015 00:03 #31872 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
I am also seeing a problem when I build and run on Windows. I'll debug

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

More
01 May 2015 00:07 #31873 by djtrance
Replied by djtrance on topic Can Any help me with my F7
the problem is Windows!!!! :P
when I write some code on mac or linux I have only a half of problem than when I use it windows .....

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

More
01 May 2015 01:40 #31875 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
the problem is the pragma(weak)
I've hit this before a long time ago, and forgot about it. I've checked in a fix that will let you run in windows again.

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

More
02 May 2015 17:27 #31968 by djtrance
Replied by djtrance on topic Can Any help me with my F7
Hi PB,
this is my test of the trim bar. Maybe I can change the center dot for other thing. there are some thing that I must to fix. One question, I see that you are working on the new file system for the original memory on the F7. with this changes, How I must use it in my devo? because my devo have 4mb. will have a config in the hardware.ini or something similar?, ok maybe in the hardware.ini is not the right place, because is it on the file system.

if you see the the picture.. maybe we can do a special HUD when we are using the video receiver, and telemetry, something like the hud there are in the plane. I don't know if there are some telemetry system that can send gps-altimeter and compass information, but would be a good system, maybe if in the future can support mavlink.

Attachments:

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

More
02 May 2015 17:29 #31969 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB I have some problem to push my code.. I'm using source tree in windows. the source tree say:
abort: push creates new remote head d112ef7560a6 on branch 'devof7'!
how I can upload the code?

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

More
02 May 2015 18:20 #31970 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
Nice job!

at the moment I haven't turned on the new filesystem. You will need to confgure your target_defs.h for your radio and rebuild. It will not be possible to have one dfu that supports both file systems due to the limited mcu flash

I don't know anything about sorcetree, but the message you have inidicates that you may have 2 different places your've checked in from. 1st check that you are pointing at your repo and not at the central one. then do a pull and merge to resync your database. you should then be able to push your changes

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

Time to create page: 0.082 seconds
Powered by Kunena Forum