HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Hardware Support for the 9XR Pro
BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

Reinhard, that is a super cool build! I saw that a couple days ago, when I discovered there was a specific sub-forum for our "case modding". :shock: Ooop, oh well! On the side like that was one of my alternate placement thoughts, the other would be to use the back. But my final choice is still going to be to stick with the original plan. The trim buttons are just way too useful for other purposes to not have them. And since I already have the 3d printed levers to fit in my slider holes and a couple plans to mount the boards and switches, I might as well! I need the back and side panel real estate on the radio for some of the other bits. My speaker for one. I LOVE how you made yours fit into the vintage case! I ruined a mainboard getting my analog power meter to work, so ya better believe I am using it!!!

Mike, I discovered two more encoder not working spots. I have just been fiddling with the radio sitting on my side table by the couch for the past couple weeks. The first spot is possibly user error, but I think the encoder isn't implemented here. Power on, main screen, encoder button short push brings up the main menu. Select run scripts. There is something there default and I can select it with the encoder. But once in, the button doesn't get me out and the encoder doesn't work either. Let me know if you want me to try anything specific/different. I don't know if I need this ever? I was able to maneuver and exit it with the main navi buttons.

The second one is more of a problem. Especially when I swap the board into the Futaba case. I will be doing so WITHOUT all the switches in place, and probably without the gimbals hooked up. I will get a switch error warning. No big deal, flip switches into correct... oh yeah there aren't any switches! :P "Or push any button" but that doesn't work with the encoder button.

ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by ReSt »

BiggsDarklighter wrote: Sun Oct 18, 2020 2:51 am I will be doing so WITHOUT all the switches in place, and probably without the gimbals hooked up. I will get a switch error warning. No big deal, flip switches into correct... oh yeah there aren't any switches! :P "Or push any button" but that doesn't work with the encoder button.
That's no problem.
In Model setup - General - third page (or eepsky), you can select which switches are allowed to create a possible switch warning and/or in the next line you can set all the switch positions that are to be checked.

Two possibilities to avoid a switch warning due to not existent switches,

Reinhard
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

BiggsDarklighter wrote: Sun Oct 18, 2020 2:51 am. . .Mike, I discovered two more encoder not working spots. I have just been fiddling with the radio sitting on my side table by the couch for the past couple weeks. The first spot is possibly user error, but I think the encoder isn't implemented here. Power on, main screen, encoder button short push brings up the main menu. Select run scripts. There is something there default and I can select it with the encoder. But once in, the button doesn't get me out and the encoder doesn't work either. Let me know if you want me to try anything specific/different. I don't know if I need this ever? I was able to maneuver and exit it with the main navi buttons. . . .
I can easily fix the first item, I've done the change in the source files.
What script did you run? The encoder should send UP and DOWN key presses to a script when you rotate it. This works for me on my SKY board (same code as the 'PRO). A long press of EXIT always terminates a script. This is built in to the firmware. Scripts themselves may detect a long press of the encoder and terminate when detected. If you don't need scripts at present, this is not a problem.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

I selected the script that was in there if it isn't a default script, then it is a remnant left behind from previous owner. Let me go grab the radio... Okay it is S6R.bas. Good chance it is simply a broken script. I tried to navigate with the menu and navi buttons, locked up. As far as I know I do not need any scripts, nor know how to write one, or even positive what they would be used for... I suspect they are used for complex behaviors not easily programmed in the menus. I might have a scenario that would take one...

I would like to use the ID switch and trainer switch to reset the trims. ID up and a pull on the trainer switch would center them all. ID- (middle spot) and pull would center horizontal trims. ID down and pull would center vertical trims. Maybe not in that exact order (I would need to think about that some more), but that is the general idea. Is something like this what one would use a script for? If so, how would I go about building one and applying it?

Ah thank you Reinhard! I figured something like that was there, but I was looking in the radio setup menu! It was easy to miss in the model setup... Alright, for now I just unchecked switch warning.

Mike, if there is a new test firmware for me to try, please let me know! I need to bookmark that thread... I didn't find it this time.

EDIT: Okay here is the right thread for the test versions!
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

That script works OK in general with the encoder. Unless you have a S6R (or S8R) receiver bound and powered, the data fields on the first page do not fill in, so the fields are not accessible. Currently, you need a long press of the MENU button to switch to the second page, but on there, there are more fields than screen lines, so the encoder will scroll the screen.

Currently there is no way to change the trim settings other than use the trim switches or use the "Instant trim" function.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

Haha well I did state it was likely user error! :lol:

Humm... I am looking through my RCG threads and can't find this, but I thought my idea was expanding on what somebody else had already done. But I did find a reference to something else that sounds familiar, so maybe it was all my idea.

Is there a way to activate the instant trim function and just reset the trims to zero? Even if they all reset, that would work. I am not sure where this instant trim is or how it works. I dug through the various manuals, but didn't stumble across this.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

You define a "Insta-Trim" switch in the MODEL|GENERAL menu. The following item lets you select whether the result of the instant trim function is applied to the trims or the sub-trims.
Instant trim takes the current output positions (set by sticks, trims and sub-trims) and sets the trim or sub-trim values to that position. If setting the sub-trims, then the trim values are set to 0. This is mainly for use when maidening an aircraft, just hold the aircraft straight and level with the sticks and apply the insta-trim switch, all trims/subtrims are immediately set as needed and you release the sticks and you then have a fully trimmed aircraft!

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

That is super cool! And yeah no way to hodge it into my idea... Oh well! Well it looks like everything I set out to figure out for this thread, is pretty well sorted. Thank you guys! And especially thank you Mike!!!

I’m going to recase it into the Futaba in the next day or so.

Oh one last random question for this thread. Is there ANY scenario where I need the erase button? It seams l smarter to eliminate that pin than have it hanging out like it was before. I have to relocate the sd card slot somewhere else.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

You should only need the erase function if there is some major malfunction where you need to need to flash the processor using the built in bootloader (not the erskyTx one) and nothing else works. There is a special feature of the erskyTx bootloader for the SKY and 'PRO boards. Plug in the USB cable, hold the trainer switch on, then power on. This starts in the built in bootloader.

The only other use for the erase signal is if you want to add a bluetooth module (HC-05). The erase signal is then used as a control signal to the bluetooth module.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

Might as well leave it then. I have a bunch of HC-05 and/or HC-06 modules. Not sure what I would need bluetooth for, I can crash my planes perfectly fine without help. :mrgreen:
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

I've just tested a change to erskyTx. One feature available is Global Variables (GVARS). These may be used in all sorts of places, and there are two way to change their values. One is to assign a source that is used as the GVAR value, the other is to set up some "Adjusters" that modify their value based on changing switches (physical or logical). There are 7 possible GVARS available. Each takes a value between -125 and +125, which is the same range as the trims take. So, I've added the 4 trims as targets for GVAR adjusters. This allows you to modify the trim values from switches.
The adjustments you may make are:
Add (switch,value) - When the switch changes from false to true, value is added to the target.
Set C (switch,value) - When the switch changes from false to true, the target is set to value.
Set V (switch,source) - When the switch changes from false to true, the target is set the the value of the source.
+/- (switch1,switch2) - When the switch1 changes from false to true, the target has 1 added to it, when switch 2 changes from false to true the target has 1 subtracted from it.
Inc/0 (switch1,switch2) - When the switch1 changes from false to true, the target has 1 added to it, when switch 2 changes from false to true the target is set to 0.
Dec/0 (switch1,switch2) - When the switch1 changes from false to true, the target has 1 subtracted from it, when switch 2 changes from false to true the target is set to 0.
+/Lim (switch,value) - When the switch1 changes from false to true, the target has 1 added to it, stopping when it reaches value.
-/Lim (switch,value) - When the switch1 changes from false to true, the target has 1 subtracted from it, stopping when it reaches value.

I hope to post a test version with this in tomorrow.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggsDarklighter
Posts: 68
Joined: Mon Aug 17, 2020 4:25 pm
Country: United States

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by BiggsDarklighter »

Mike I am running your ersky9xr version with the encoder updates. Will this be ported over into that too? This is JUST the ticket! But don't want to loose the encoder bits to get it.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: HELP PLEASE! Possible encoder issue, don't want to fry the new board...

Post by MikeB »

Yes, both sets of changes are in. There was no reason to leave the encoder changes out.
I've been delayed, so test version posting will probably be tomorrow now.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “Turnigy 9XR PRO radio”