- Posts: 25
How To apply "two switches" patch for Devo7e soft
- RW9UAO
-
- Offline
Less
More
15 Mar 2013 11:39 #7780
by RW9UAO
Replied by RW9UAO on topic How To apply "two switches" patch for Devo7e soft
hi. how to use additional swtches in "simple mixer" for dual-rates?
- Krejzi
-
Topic Author
- Offline
Less
More
- Posts: 33
15 Mar 2013 11:42 #7781
by Krejzi
Replied by Krejzi on topic How To apply "two switches" patch for Devo7e soft
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
There you should apply changes as you want. new sweitches are ALI D&R and ELV D&R
- RW9UAO
-
- Offline
Less
More
- Posts: 25
15 Mar 2013 11:54 #7783
by RW9UAO
Replied by RW9UAO on topic How To apply "two switches" patch for Devo7e soft
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 =)
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 =)
- cmpang
-
- Offline
Less
More
- Posts: 296
16 Mar 2013 07:03 #7799
by cmpang
Replied by cmpang on topic How To apply "two switches" patch for Devo7e soft
Krejzi,
any new update for the patched build?
cmPang
any new update for the patched build?
cmPang
- Krejzi
-
Topic Author
- Offline
Less
More
- Posts: 33
16 Mar 2013 09:38 #7802
by Krejzi
Replied by Krejzi on topic How To apply "two switches" patch for Devo7e soft
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:
And filesystem:
But it's not testet by me, 'cause I moved to UK and I don't have all my stuff yet.
Cheers.
Patched Soft:
And filesystem:
- jeff
-
- Offline
Less
More
- Posts: 1
01 Apr 2013 13:41 #8361
by jeff
don`t used this patch it will burn your servo used PB software tested
Replied by jeff on topic How To apply "two switches" patch for Devo7e soft
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:
And filesystem:
don`t used this patch it will burn your servo used PB software tested
- rbe2012
-
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
01 Apr 2013 13:48 #8362
by rbe2012
Replied by rbe2012 on topic How To apply "two switches" patch for Devo7e soft
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).
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).
- Mullson
-
- Offline
Less
More
- Posts: 114
07 Apr 2013 20:22 #8716
by Mullson
Replied by Mullson on topic How To apply "two switches" patch for Devo7e soft
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.
I don't feel comfortable doing it my self.
- Mullson
-
- Offline
Less
More
- Posts: 114
16 Apr 2013 13:40 #8985
by Mullson
Replied by Mullson on topic How To apply "two switches" patch for Devo7e soft
I patched the latest build with the extra switches. Tested and all seems to work as expected.
Here it is if anybody needs it:
Here it is if anybody needs it:
- FDR
-
- Offline
16 Apr 2013 13:50 #8987
by FDR
Replied by FDR on topic How To apply "two switches" patch for Devo7e soft
Please, attach builds only in the
"Development/Builds"
forum, and post only the links here...
- IMback!
-
- Offline
Less
More
- Posts: 84
01 Jul 2013 19:49 #11683
by IMback!
Replied by IMback! on topic How To apply "two switches" patch for Devo7e soft
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- Krejzi
-
Topic Author
- Offline
Less
More
- Posts: 33
02 Jul 2013 20:13 #11771
by Krejzi
Replied by Krejzi on topic How To apply "two switches" patch for Devo7e soft
Still working for me, you sure you're using patch from this thread ?
- IMback!
-
- Offline
Less
More
- Posts: 84
03 Jul 2013 17:58 - 03 Jul 2013 19:47 #11814
by IMback!
Replied by IMback! on topic How To apply "two switches" patch for Devo7e soft
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
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!.
- Xermalk
-
- Offline
Less
More
- Posts: 181
22 Jul 2013 11:59 - 22 Jul 2013 12:01 #12421
by Xermalk
Replied by Xermalk on topic How To apply "two switches" patch for Devo7e soft
I just modded my 7E with the 3 pos switch mod.
But when i tired to patch the firmware i got this error message.
Patch code from here www.deviationtx.com/forum/how-to/1436-ad...vo-7e?start=40#11635
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.cPatch 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.
- Krejzi
-
Topic Author
- Offline
Less
More
- Posts: 33
22 Jul 2013 12:07 - 22 Jul 2013 12:08 #12422
by Krejzi
Replied by Krejzi on topic How To apply "two switches" patch for Devo7e soft
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.
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.
- Xermalk
-
- Offline
Less
More
- Posts: 181
23 Jul 2013 21:33 - 23 Jul 2013 21:34 #12460
by Xermalk
Replied by Xermalk on topic How To apply "two switches" patch for Devo7e soft
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.
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.
- kaworu
-
- Offline
Less
More
- Posts: 5
27 Jul 2013 11:18 #12548
by kaworu
Replied by kaworu on topic How To apply "two switches" patch for Devo7e soft
Sorry I butchered the patch while putting it here. I edited the post so it should work now.
- Xermalk
-
- Offline
Less
More
- Posts: 181
27 Jul 2013 20:44 - 27 Jul 2013 20:44 #12560
by Xermalk
Thanks, but i already have a Devo 10 on the way now
Il'l give it a try tomorrow, but from Monday and forward the 7E will only be used for buddy boxing.
Replied by Xermalk on topic How To apply "two switches" patch for Devo7e soft
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
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.
- Xermalk
-
- Offline
Less
More
- Posts: 181
30 Jul 2013 17:29 - 30 Jul 2013 17:31 #12621
by Xermalk
Replied by Xermalk on topic How To apply "two switches" patch for Devo7e soft
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
Tx Files
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
Tx Files
Last edit: 30 Jul 2013 17:31 by Xermalk.
- kaworu
-
- Offline
Less
More
- Posts: 5
30 Jul 2013 19:31 #12625
by kaworu
Replied by kaworu on topic How To apply "two switches" patch for Devo7e soft
Are you sure this is caused by the patch? it sounds like the last build you used was from before newgui.
Time to create page: 0.117 seconds
-
Home
-
Forum
-
Development
-
Development
- How To apply "two switches" patch for Devo7e soft