Can Any help me with my F7

More
02 May 2015 21:42 #31987 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, my code is in my branch. We are working on the barcode trim bar, how con I test it with the button if it work?

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

More
02 May 2015 22:00 #31989 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
look at how it works in common/_main_page.c
You want something like this:
                GUI_CreateBarGraph(&gui->elem[i].bar, x, y, w, h, -10000, 10000,
                    type == ELEM_VTRIM ? TRIM_VERTICAL : TRIM_INVHORIZONTAL, trim_cb, (void *)(long)(src-1));

trim_cb() gets the value. 'src-1' is the trim index. I think 0=throttle, 1=ele, 2 = rudder, 3= ail though it probably depends on stick mode.

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

More
04 May 2015 03:43 #32037 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, with your last code, when I try to build for f7, I received this error:
+ Compiling 'target/common/devo/petit_io.c'
target/common/devo/petit_io.c: In function 'disk_erasep':
target/common/devo/petit_io.c:107:32: error: 'pos' undeclared (first use in this
function)
drive[_drive_num].EraseSector(pos + drive[_drive_num].SECTOR_OFFSET) * 0x1000)
;
^
target/common/devo/petit_io.c:107:32: note: each undeclared identifier is report
ed only once for each function it appears in
target/common/devo/petit_io.c:107:79: error: expected ';' before ')' token
drive[_drive_num].EraseSector(pos + drive[_drive_num].SECTOR_OFFSET) * 0x1000)
;

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

More
04 May 2015 03:59 #32038 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
just remove the disk_erasep function. I have a fix for it, but it is embedded with a bunch of other code I'm not ready to release yet

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

More
04 May 2015 04:04 #32039 by djtrance
Replied by djtrance on topic Can Any help me with my F7
ok, no problem, I'm testing the trim_bar now... but how I'm using it into the main function, the only way that I can see if is working, is when I load a new model. the vertical bar is working well, the horizontal has some problem, because some time not detect when is in the middle position.

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

More
04 May 2015 05:56 #32047 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, this is my HUD concept. is only a test is not functional. This can be better on f12E. Can be a good idea to do this on devo radios?. maybe there are not a telemetry system yet, with all of the information that we need do use it with devo (mavlink has all information but is use it on other type of transmitter). I have a NRF system with telemetry, maybe in the future we can do a new protocol for this purpose.
in the second picture you can see the description.



Attachments:

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

More
04 May 2015 13:44 #32060 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
It looks good. It will take a little modification, but once I've enabled the proper main_page controls, it should be possible to setup a HUD layout like this pretty easily. Currently there is no compass, and altitude can't be assigned to a trim, but the concept is sound.

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

More
05 May 2015 03:06 - 05 May 2015 03:07 #32089 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
I've updated the devof7 branch to use the dveofs filessystem.
djtance, you will want to turn that off.
in the devof7 target_defs.h, set:
#define SPIFLASH_SECTORS 512
#define USE_DEVOFS 0

and remove:
#define SPIFLASH_AAI_AF 1
Hopefully it will work ok for you. I am now able to boot my devof7 using the devofs filesystem with the stock flash chip, so I can help with testing as needed.

I did run into a rather large annoyance. The bootloader does not seem to give full write access to the flash chip. In order to install the filesystem, I needed to build a custom image to copy raw data to the flash. That makes updating the filesystem really annoying. I have some ideas about working around it that I'll need to play with..
Last edit: 05 May 2015 03:07 by PhracturedBlue.

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

More
05 May 2015 11:31 #32098 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, today I will check it...

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

More
06 May 2015 03:34 #32147 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, I did the modification on the target_defs.h, but when I turned on the radio, the screen show DEVIATION USB with big font. I can upload folder and files, but event with the last protocol, and without usb cable, the screen is showing this text.

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

More
06 May 2015 03:56 #32151 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
can you post your target_defs.h file?
It doesn't make any sense, since my devo8 works just fine with the same settings.

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

More
07 May 2015 00:42 #32191 by djtrance
Replied by djtrance on topic Can Any help me with my F7
is working now :P maybe I forget to save the file ... :P, because my changes aren't into the file. I will upload my changes to the trim bar...

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

More
10 May 2015 02:17 #32323 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, I'm moving my environment to mac, because I have a lot of problem in windows when i want to merge the code and I can't upload the last changes. I hope to be ready to work on mac this weekend.

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

More
11 May 2015 19:49 #32405 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB,
How I say before, I'm moving to mac all of my environment. When I use the same code for example:
make TARGET=devo10, all is good, but if I do
make TARGET=emu_devo10 the console return a lot of problem... do you know what happened?
I'm ussing mac because with windows I have a lot if problem with mercurial. (source tree)
and my virtual machine for some reason is not working well, I must fix it, but I would like to work on mac, must be very similar to linux I guess.

./std.h:5:9: warning: 'strncpy' macro redefined
#define strncpy "BAD_FUNC" //Do not allow any use of strncpy (use strlcpy instead)
^
/usr/include/secure/_string.h:118:9: note: previous definition is here
#define strncpy(dest, src, len) \
^
In file included from target/emu_devo8/channels.c:15:
In file included from ./common.h:29:
./std.h:62:13: warning: 'sprintf' macro redefined
#define sprintf tfp_sprintf
^
/usr/include/secure/_stdio.h:46:9: note: previous definition is here
#define sprintf(str, ...) \
^
In file included from target/emu_devo8/channels.c:15:
In file included from ./common.h:29:
./std.h:63:13: warning: 'snprintf' macro redefined
#define snprintf tfp_snprintf
^
/usr/include/secure/_stdio.h:56:9: note: previous definition is here
#define snprintf(str, len, ...) \
^
In file included from target/emu_devo8/channels.c:15:
./common.h:189:8: error: expected parameter declarator
size_t strlcpy(char* dst, const char* src, size_t bufsize);
^
/usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
In file included from target/emu_devo8/channels.c:15:
./common.h:189:8: error: expected ')'
/usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
# define _USE_FORTIFY_LEVEL 2
^
./common.h:189:8: note: to match this '('
/usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
^
/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
In file included from target/emu_devo8/channels.c:15:
./common.h:189:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcpy(char* dst, const char* src, size_t bufsize);

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

More
11 May 2015 19:57 #32406 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
ugh.
I haven't seen it before. Looks like the Mac env has defined macros for all of our string handling routines. I am not an expert on Macs, so I don't know whatit will take to fix it.

From what you posted, you need to go into std.h and add this before the 'BAD_FUNC' thing:
#ifdef strncpy
    #undef strncpy
    #define USE_OWN_PRINTF 0
#endif

But you'll need to try it and see if that is sufficient

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

More
17 May 2015 14:55 #32688 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
I've merged your trim implementation into the devof7 branch and have it working for both the f7 and f12e now. I also enabled the main screen display, however the gui to configure it doesn't exist (for the f7 it probably never will). You can modify the screen layout by finding the proper section in the filesystem/common/layout/default.ini

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

More
17 May 2015 19:12 #32703 by djtrance
Replied by djtrance on topic Can Any help me with my F7
excellent!!,
I will do a special function for the mix curve, I will use a center dot and normal dot to do this. I hope this must work.

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

More
18 May 2015 14:35 #32738 by djtrance
Replied by djtrance on topic Can Any help me with my F7
I upload the last firmware to my devoF7 but I see the trim channel are inverter, the vertical is showing the horizontal trim, and the horizontal is showing the vertical, maybe when I did the function I use a wrong coordinates :P

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

More
19 May 2015 01:40 #32758 by djtrance
Replied by djtrance on topic Can Any help me with my F7
PB, I have uploaded some changes to my repository, I added some missing character from the last commit and I has put the battery and tx power on the screen. I must fix the vertical and horizontal trim bar because they are inverted and when I enter to some menus the horizontal trim bar doesn't disappear

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

More
19 May 2015 02:20 #32759 by PhracturedBlue
Replied by PhracturedBlue on topic Can Any help me with my F7
I've checked in the rest of my work now. I have fully implemented the advanced interface, so now almost all necessary functionality is available. I still need to work on the toggle icons (I'm not sure how to handle them for the devof7, but they'll work just like on the devo10 for the f12e

As far as the horizontal trims go, positive should be to the left. If it isn't, then likely the trims are reversed in tx_buttons.c

If the trims don't disappear when entering the menu, there may be something wrong with the LCD_Clear() function.

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

Time to create page: 0.103 seconds
Powered by Kunena Forum