- Posts: 25
How To apply "two switches" patch for Devo7e soft
- RW9UAO
- Offline
Please Log in or Create an account to join the conversation.
- Krejzi
- Topic Author
- Offline
- Posts: 33
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.
- RW9UAO
- Offline
- Posts: 25
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.
- cmpang
- Offline
- Posts: 296
any new update for the patched build?
cmPang
Please Log in or Create an account to join the conversation.
- Krejzi
- Topic Author
- Offline
- Posts: 33
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:
Please Log in or Create an account to join the conversation.
- jeff
- Offline
- Posts: 1
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
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
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.
- Mullson
- Offline
- Posts: 114
I don't feel comfortable doing it my self.
Please Log in or Create an account to join the conversation.
- Mullson
- Offline
- Posts: 114
Here it is if anybody needs it:
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- IMback!
- Offline
- Posts: 84
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.
- Krejzi
- Topic Author
- Offline
- Posts: 33
Please Log in or Create an account to join the conversation.
- IMback!
- Offline
- Posts: 84
EDIT: i just patched tx_buttons.c "manualy" it works now, but somthings up with the patch ill look at it later
Please Log in or Create an account to join the conversation.
- Xermalk
- Offline
- Posts: 181
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;
}
Please Log in or Create an account to join the conversation.
- Krejzi
- Topic Author
- Offline
- Posts: 33
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;
}
Please Log in or Create an account to join the conversation.
- Xermalk
- Offline
- Posts: 181
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.
Please Log in or Create an account to join the conversation.
- kaworu
- Offline
- Posts: 5
Please Log in or Create an account to join the conversation.
- Xermalk
- Offline
- Posts: 181
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.
Please Log in or Create an account to join the conversation.
- Xermalk
- Offline
- Posts: 181
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
Please Log in or Create an account to join the conversation.
- kaworu
- Offline
- Posts: 5
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- How To apply "two switches" patch for Devo7e soft