How To apply "two switches" patch for Devo7e soft

More
15 Mar 2013 11:39 #7780 by RW9UAO
hi. how to use additional swtches in "simple mixer" for dual-rates?

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

More
15 Mar 2013 11:42 #7781 by Krejzi
In standard menu you have somethink like " switches assignment"
There you should apply changes as you want. new sweitches are ALI D&R and ELV D&R

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

More
15 Mar 2013 11:54 #7783 by RW9UAO
ok. simple mixer mode, menu - "Switch assigment".
i set for "D/R-AIL" <AIL DR> switch and "Fly mode" to <FMODE> switch. next i go to "D/R&Exp" menu and set for <AIL> channel 53% for Normal and 100% for Idle Up1.
go to Channel monitor menu and check for correct work. all good. sanks =)

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

More
16 Mar 2013 07:03 #7799 by cmpang
Krejzi,

any new update for the patched build?

cmPang

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

More
16 Mar 2013 09:38 #7802 by Krejzi
Here You Go:
But it's not testet by me, 'cause I moved to UK and I don't have all my stuff yet.

Cheers.


Patched Soft:

File Attachment:

File Name: deviation-...3e61.zip
File Size:315 KB



And filesystem:

File Attachment:

File Name: devo7e-fil...3e61.zip
File Size:275 KB
Attachments:

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

More
01 Apr 2013 13:41 #8361 by jeff

Krejzi wrote: Here You Go:
But it's not testet by me, 'cause I moved to UK and I don't have all my stuff yet.

Cheers.


Patched Soft:

File Attachment:

File Name: deviation-...3e61.zip
File Size:315 KB



And filesystem:

File Attachment:

File Name: devo7e-fil...3e61.zip
File Size:275 KB



don`t used this patch it will burn your servo used PB software tested

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

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
01 Apr 2013 13:48 #8362 by rbe2012
Jeff,
could you be more precise? I know the patch is used by some users but such effects were not described yet.
It depends on the model config what the additional switches will bring; also a servo running against a limit is possible (due to some kind of misconfiguration).

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

More
07 Apr 2013 20:22 #8716 by Mullson
Does the two new switches work with 3.0 or do we need to patch it? If so have anybody patched it yet?
I don't feel comfortable doing it my self.

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

More
16 Apr 2013 13:40 #8985 by Mullson
I patched the latest build with the extra switches. Tested and all seems to work as expected.

Here it is if anybody needs it:

File Attachment:

File Name: deviation-...88c3.zip
File Size:331 KB


File Attachment:

File Name: devo7e-fil...88c3.zip
File Size:244 KB
Attachments:

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

More
16 Apr 2013 13:50 #8987 by FDR
Please, attach builds only in the "Development/Builds" forum, and post only the links here...

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

More
01 Jul 2013 19:49 #11683 by IMback!
I cant apply the patch to the latest source, ist there a new one avialable?
patching file src/target/devo7e/capabilities.h
patching file src/target/devo7e/channels.c
patching file src/target/devo7e/tx_buttons.c
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 46.
1 out of 2 hunks FAILED -- saving rejects to file src/target/devo7e/tx_buttons.c.rej

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

More
02 Jul 2013 20:13 #11771 by Krejzi
Still working for me, you sure you're using patch from this thread ?

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

More
03 Jul 2013 17:58 - 03 Jul 2013 19:47 #11814 by IMback!
yes the one form the op

EDIT: i just patched tx_buttons.c "manualy" it works now, but somthings up with the patch ill look at it later
Last edit: 03 Jul 2013 19:47 by IMback!.

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

More
22 Jul 2013 11:59 - 22 Jul 2013 12:01 #12421 by Xermalk
I just modded my 7E with the 3 pos switch mod.
But when i tired to patch the firmware i got this error message.
Xerx@Serenity ~/deviation
$ patch -p1 < file.patch
patching file src/target/devo7e/capabilities.h
patch: **** malformed patch at line 24: diff -r 1ae61a3d88c3 src/target/devo7e/channels.c

Patch code from here www.deviationtx.com/forum/how-to/1436-ad...vo-7e?start=40#11635
diff -r 1ae61a3d88c3 src/target/devo7e/capabilities.h
--- a/src/target/devo7e/capabilities.h	Sun Apr 07 13:15:41 2013 -0700
+++ b/src/target/devo7e/capabilities.h	Sun Jun 30 14:32:36 2013 +0200
@@ -7,6 +7,9 @@
   CHANDEF(HOLD1)
   CHANDEF(FMOD0)
   CHANDEF(FMOD1)
+  CHANDEF(FMOD2)
+  CHANDEF(AIL_DR0)
+  CHANDEF(AIL_DR1)
 #endif
 
 #ifdef UNDEF_INP
@@ -14,9 +17,9 @@
 #define INP_RUD_DR1 INP_HOLD1
 #define INP_ELE_DR0 INP_HOLD0
 #define INP_ELE_DR1 INP_HOLD1
-#define INP_AIL_DR0 INP_HOLD0
-#define INP_AIL_DR1 INP_HOLD1
-#define INP_FMOD2  INP_FMOD1
 #define INP_MIX0   INP_FMOD0
 #define INP_MIX1   INP_FMOD1
 #define INP_MIX2   INP_FMOD1
diff -r 1ae61a3d88c3 src/target/devo7e/channels.c
--- a/src/target/devo7e/channels.c	Sun Apr 07 13:15:41 2013 -0700
+++ b/src/target/devo7e/channels.c	Sun Jun 30 14:32:36 2013 +0200
@@ -40,6 +40,7 @@
     gpio_set(GPIOC, GPIO10 | GPIO11);
 }
 
+extern u32 glbl_buttons;
 s32 CHAN_ReadRawInput(int channel)
 {
     s32 value = 0;
@@ -50,8 +51,21 @@
     case INP_ELEVATOR:  value = adc_array_raw[3]; break;  // bug fix: left vertical
     case INP_HOLD0:    value = gpio_get(GPIOC, GPIO11); break;
     case INP_HOLD1:    value = ! gpio_get(GPIOC, GPIO11); break;
-    case INP_FMOD0:    value = gpio_get(GPIOC, GPIO10); break;
-    case INP_FMOD1:    value = ! gpio_get(GPIOC, GPIO10); break;

+
+    case INP_FMOD0:    value = !!(glbl_buttons & (1 << 31)); break;
+    case INP_FMOD1:    value = !(glbl_buttons & (3 << 30)); break;
+    case INP_FMOD2:    value = !!(glbl_buttons & (1 << 30)); break;
+
+    case INP_AIL_DR0:  value = gpio_get(GPIOC, GPIO10); break;
+    case INP_AIL_DR1:  value = ! gpio_get(GPIOC, GPIO10); break;
     }
     return value;
 }
diff -r 1ae61a3d88c3 src/target/devo7e/tx_buttons.c
--- a/src/target/devo7e/tx_buttons.c	Sun Apr 07 13:15:41 2013 -0700
+++ b/src/target/devo7e/tx_buttons.c	Sun Jun 30 14:32:36 2013 +0200
@@ -20,9 +20,9 @@
 static const u16 rows[] = {GPIO6, GPIO7, GPIO8, GPIO9, 0xffff};
 static const u8 buttonmap[] = {
     BUT_TRIM_RH_POS, BUT_TRIM_RH_NEG, BUT_TRIM_RV_POS, BUT_TRIM_RV_NEG,
-    BUT_LAST,        BUT_ENTER,       BUT_RIGHT,       BUT_LEFT,
+    32,              BUT_ENTER,       BUT_RIGHT,       BUT_LEFT,
     BUT_TRIM_LV_POS, BUT_TRIM_LV_NEG, BUT_TRIM_LH_NEG, BUT_TRIM_LH_POS,
-    BUT_LAST,        BUT_DOWN,        BUT_UP,          BUT_EXIT,
+    31,              BUT_DOWN,        BUT_UP,          BUT_EXIT,
     };
 
 #define COL_PORT GPIOB
@@ -46,30 +46,33 @@
   gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
                 GPIO_CNF_OUTPUT_PUSHPULL, GPIO5 | GPIO6 | GPIO7 | GPIO8);
 
-  gpio_set(GPIOB, GPIO5 | GPIO6| GPIO7 | GPIO8);
+  gpio_clear(GPIOB, GPIO5 | GPIO6| GPIO7 | GPIO8);
 
   /* PortC 6-9 are pull-up inputs */
   gpio_set_mode(GPIOC, GPIO_MODE_INPUT,
                 GPIO_CNF_INPUT_PULL_UPDOWN, GPIO6 | GPIO7 | GPIO8 | GPIO9);
-  gpio_set(GPIOC, GPIO6 | GPIO7 | GPIO8 | GPIO9);
+  gpio_clear(GPIOC, GPIO6 | GPIO7 | GPIO8 | GPIO9);
 }
 
+u32 glbl_buttons = 0;
 u32 ScanButtons()
 {
     u8 idx = 0;
     u32 result = 0;
     const u16 *c, *r;
-    gpio_set(COL_PORT, COL_PORT_MASK);
+    gpio_clear(COL_PORT, COL_PORT_MASK);
     for(c = columns; *c != 0xffff; c++) {
+        gpio_set(COL_PORT, *c);
+        u16 but = gpio_port_read(ROW_PORT);
         gpio_clear(COL_PORT, *c);
-        u16 but = gpio_port_read(ROW_PORT);
-        gpio_set(COL_PORT, *c);
         for(r = rows; *r != 0xffff; r++) {
-            if(! (but & *r)) {
+            if((but & *r)) {
                 result |= 1 << (buttonmap[idx] - 1);
             }
             idx++;
         }
     }
-    return result;
+    if (! (result & 0x3FFFFFFF))
+        glbl_buttons = result;
+    return result & 0x3FFFFFFF;
 }
Last edit: 22 Jul 2013 12:01 by Xermalk.

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

More
22 Jul 2013 12:07 - 22 Jul 2013 12:08 #12422 by Krejzi
this patch:
www.deviationtx.com/forum/how-to/1436-ad...vo-7e?start=40#11635

doesn't work, get the path file from the first post in this thread.
diff -r d7e61bcd6c44 src/target/devo7e/capabilities.h
--- a/src/target/devo7e/capabilities.h	Fri Feb 15 08:17:51 2013 -0800
+++ b/src/target/devo7e/capabilities.h	Fri Feb 15 14:47:52 2013 -0800
@@ -7,15 +7,19 @@
   CHANDEF(HOLD1)
   CHANDEF(FMOD0)
   CHANDEF(FMOD1)
+  CHANDEF(AIL_DR0)
+  CHANDEF(AIL_DR1)
+  CHANDEF(ELE_DR0)
+  CHANDEF(ELE_DR1)
 #endif
 
 #ifdef UNDEF_INP
 #define INP_RUD_DR0 INP_HOLD0
 #define INP_RUD_DR1 INP_HOLD1
-#define INP_ELE_DR0 INP_HOLD0
-#define INP_ELE_DR1 INP_HOLD1
-#define INP_AIL_DR0 INP_HOLD0
-#define INP_AIL_DR1 INP_HOLD1
+//#define INP_ELE_DR0 INP_HOLD0
+//#define INP_ELE_DR1 INP_HOLD1
+//#define INP_AIL_DR0 INP_HOLD0
+//#define INP_AIL_DR1 INP_HOLD1
 #define INP_FMOD2  INP_FMOD1
 #define INP_MIX0   INP_FMOD0
 #define INP_MIX1   INP_FMOD1
diff -r d7e61bcd6c44 src/target/devo7e/channels.c
--- a/src/target/devo7e/channels.c	Fri Feb 15 08:17:51 2013 -0800
+++ b/src/target/devo7e/channels.c	Fri Feb 15 14:47:52 2013 -0800
@@ -40,6 +40,7 @@
     gpio_set(GPIOC, GPIO10 | GPIO11);
 }
 
+extern u32 glbl_buttons;
 s32 CHAN_ReadRawInput(int channel)
 {
     s32 value = 0;
@@ -52,6 +53,12 @@
     case INP_HOLD1:    value = ! gpio_get(GPIOC, GPIO11); break;
     case INP_FMOD0:    value = gpio_get(GPIOC, GPIO10); break;
     case INP_FMOD1:    value = ! gpio_get(GPIOC, GPIO10); break;
+
+    case INP_AIL_DR0:  value = !(glbl_buttons & (1 << 31)); break;
+    case INP_AIL_DR1:  value = !!(glbl_buttons & (1 << 31)); break;
+    
+    case INP_ELE_DR0:  value = !(glbl_buttons & (1 << 30)); break;
+    case INP_ELE_DR1:  value = !!(glbl_buttons & (1 << 30)); break;
     }
     return value;
 }
diff -r d7e61bcd6c44 src/target/devo7e/tx_buttons.c
--- a/src/target/devo7e/tx_buttons.c	Fri Feb 15 08:17:51 2013 -0800
+++ b/src/target/devo7e/tx_buttons.c	Fri Feb 15 14:47:52 2013 -0800
@@ -20,9 +20,9 @@
 static const u16 rows[] = {GPIO6, GPIO7, GPIO8, GPIO9, 0xffff};
 static const u8 buttonmap[] = {
     BUT_TRIM_RH_POS, BUT_TRIM_RH_NEG, BUT_TRIM_RV_POS, BUT_TRIM_RV_NEG,
-    BUT_LAST,        BUT_ENTER,       BUT_RIGHT,       BUT_LEFT,
+    32,              BUT_ENTER,       BUT_RIGHT,       BUT_LEFT,
     BUT_TRIM_LV_POS, BUT_TRIM_LV_NEG, BUT_TRIM_LH_NEG, BUT_TRIM_LH_POS,
-    BUT_LAST,        BUT_DOWN,        BUT_UP,          BUT_EXIT,
+    31,              BUT_DOWN,        BUT_UP,          BUT_EXIT,
     };
 
 #define COL_PORT GPIOB
@@ -46,30 +46,33 @@
   gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
                 GPIO_CNF_OUTPUT_PUSHPULL, GPIO5 | GPIO6 | GPIO7 | GPIO8);
 
-  gpio_set(GPIOB, GPIO5 | GPIO6| GPIO7 | GPIO8);
+  gpio_clear(GPIOB, GPIO5 | GPIO6| GPIO7 | GPIO8);
 
   /* PortC 6-9 are pull-up inputs */
   gpio_set_mode(GPIOC, GPIO_MODE_INPUT,
                 GPIO_CNF_INPUT_PULL_UPDOWN, GPIO6 | GPIO7 | GPIO8 | GPIO9);
-  gpio_set(GPIOC, GPIO6 | GPIO7 | GPIO8 | GPIO9);
+  gpio_clear(GPIOC, GPIO6 | GPIO7 | GPIO8 | GPIO9);
 }
 
+u32 glbl_buttons = 0;
 u32 ScanButtons()
 {
     u8 idx = 0;
     u32 result = 0;
     const u16 *c, *r;
-    gpio_set(COL_PORT, COL_PORT_MASK);
+    gpio_clear(COL_PORT, COL_PORT_MASK);
     for(c = columns; *c != 0xffff; c++) {
+        gpio_set(COL_PORT, *c);
+        u16 but = gpio_port_read(ROW_PORT);
         gpio_clear(COL_PORT, *c);
-        u16 but = gpio_port_read(ROW_PORT);
-        gpio_set(COL_PORT, *c);
         for(r = rows; *r != 0xffff; r++) {
-            if(! (but & *r)) {
+            if((but & *r)) {
                 result |= 1 << (buttonmap[idx] - 1);
             }
             idx++;
         }
     }
-    return result;
+    if (! (result & 0x3FFFFFFF))
+        glbl_buttons = result;
+    return result & 0x3FFFFFFF;
 }
Last edit: 22 Jul 2013 12:08 by Krejzi.

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

More
23 Jul 2013 21:33 - 23 Jul 2013 21:34 #12460 by Xermalk
That's for 2 separate switches, i wanted the one with a 3 state fmod switch :<.
Iv already soldered the wires for it, as i presumed the patch would still work.

I intended to use the 3 modes to swap between vbar banks.
Last edit: 23 Jul 2013 21:34 by Xermalk.

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

More
27 Jul 2013 11:18 #12548 by kaworu
Sorry I butchered the patch while putting it here. I edited the post so it should work now.

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

More
27 Jul 2013 20:44 - 27 Jul 2013 20:44 #12560 by Xermalk

kaworu wrote: Sorry I butchered the patch while putting it here. I edited the post so it should work now.


Thanks, but i already have a Devo 10 on the way now :whistle:
Il'l give it a try tomorrow, but from Monday and forward the 7E will only be used for buddy boxing.
Last edit: 27 Jul 2013 20:44 by Xermalk.

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

More
30 Jul 2013 17:29 - 30 Jul 2013 17:31 #12621 by Xermalk
I applied the patch and i got a extra working fmod state.
However i also lost everything on the "main/home screen"
It's completely empty except for the model name, tx voltage and tx power ratings. And there's no errors in the errors.txt


Iv attached the build, and all files on my tx.

Build

File Attachment:

File Name: h5ab67e9.zip
File Size:368 KB

Tx Files

File Attachment:

File Name: hd0ba2ec.zip
File Size:261 KB
Attachments:
Last edit: 30 Jul 2013 17:31 by Xermalk.

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

More
30 Jul 2013 19:31 #12625 by kaworu
Are you sure this is caused by the patch? it sounds like the last build you used was from before newgui.

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

Time to create page: 0.080 seconds
Powered by Kunena Forum