ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

ERSKY9X Coding

Post by Daedalus66 »

As implemented now, pressing the switch again will not restore the original setting. If the sticks are centred, it will do nothing.

The way Instant Trim works is for the pilot to hold the stick(s) off centre (so as to maintain level flight), press/flip the IT switch, and release the stick. This applies the necessary correction in the form of subtrim (or now, optionally, trim). Releasing the sticks is important, as once IT is applied it adds to any offset being applied.

If you inadvertently apply a correction you would use the same process to remove it: hold the stick(s) so as to counteract the out of trim condition, press the IT switch, and release the stick(s).

As Joao says, IT is not something to have on normally. You want to use it only during test (and maybe trimming) flights so you don’t accidentally apply it. It’s a powerful tool.

It’s not hard to use, but before you takeoff with it active, you should be sure you understand its action and can find the IT switch. A warning might be a good idea.

Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

ERSKY9X Coding

Post by Daedalus66 »

Thinking a bit more, it seems to me now that the main risk is indeed that the pilot might forget (or just not know) that Instant Trim is live.

On the other hand, I still can’t imagine a realistic scenario in which more than 25% correction (subtrim) would be needed via IT.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

So, perhaps the warning at power ON if the instarim is active should help decrease the chances of someone messing up his/her model.

João

Sent from my BLN-L21 using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Daedalus66 wrote: Sat Jun 15, 2019 1:18 amOn the other hand, I still can’t imagine a realistic scenario in which more than 25% correction (subtrim) would be needed via IT.
Except where João says he needs more than 25% subtrim to start with. The operation of "instant trim" is to use the current channel output position and put that into the subtrim. If a limit of 25% is in place, then this would be a problem.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I found a bug when editing text with CAPS selected and you try to add a SPACE. Now fixed!
I've just posted an update with this fix. You also have the "Instant Trim" option to choose to only modify the trims instead of the subtrims.

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

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

But then the trims can be copied to the subtrims, right? This would allow to perhaps fix the problem and try again without touching the subtrims. but after a second try, it could be saved if necessary..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Yes the trims may be copied to the subtrims.
One advantage of using the trims option is only the trims of the current flight mode are affected. So, for example, suppose you have two flight modes, normal and landing, and that they share the same trims except for elevator trim and that in "landing" mode you have flaps deployed.
You take off and fly normally and use instant trim to get "straight and level".
Now you change to "landing" mode, the flaps go down and you then hold the required amount of elevator for correct flight. Another use of instant trim and the elevator trim for this flight mode is now set.

After the flight, you may choose to copy the trims to subtrims, or you may adjust the linkages (if possible). If you adjust the linkages or copy the trims to subtrims, you may need to repeat using instant trim on a second flight in both modes to get everything sorted.

I've been using a "landing" mode (even without having flaps) in this way. Landing mode is on a switch, and has some up elevator trim applied, although if you open the throttle more than 20% the landing mode is cancelled.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

MikeB wrote: Sun Jun 16, 2019 11:01 pm

After the flight, you may choose to copy the trims to subtrims, or you may adjust the linkages (if possible). If you adjust the linkages or copy the trims to subtrims, you may need to repeat using instant trim on a second flight in both modes to get everything sorted.
it sounds good Mike, thank you. But you will have to decide which mode trims should be copied to the subtrim. You can't copy both.. or is the normal mode automatically selected when copying the trims? That would make sense I think. then you could create offsets to handle the other modes.
Of course, all this is only valid if we aren't able to adjust the linkages. If we are, we won't need to copy trims at all :)
I've been using a "landing" mode (even without having flaps) in this way. Landing mode is on a switch, and has some up elevator trim applied, although if you open the throttle more than 20% the landing mode is cancelled.
it is a very good idea, like any other aircraft, models may need different trim settings for landing, although they may vary with different atmospheric conditions.. :)
But you gave me an idea. I could try a switch to enable trim, and use a pot to set the amount of trim. This way I could change the trim in real time, just like on real aircraft :) Interesting idea, and not difficult to achieve ;)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

It should copy the trims of the currently active flight mode.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

MikeB wrote: Mon Jun 17, 2019 2:04 pm It should copy the trims of the currently active flight mode.

Mike
Ok, thanks, so we must be sure we have the right flight mode selected while copying the trims to the subtrims. This is something that should be mentioned on the next ErskyTX manual.. ;) Nigel?? :mrgreen:

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: ERSKY9X Coding

Post by Daedalus66 »

As I understand it, subtrims are not subject to Flight Mode. So you could transfer any FM0 trims to subtrim. But then the other FM trims would need to be reset.

I’ll have to think a bit about the implications of the new Instant Trim setup.

Definitely something for the manual
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Daedalus66 wrote: Mon Jun 17, 2019 3:08 pm As I understand it, subtrims are not subject to Flight Mode. So you could transfer any FM0 trims to subtrim. But then the other FM trims would need to be reset.
Yes that is what Mike said.. it will copy the "Active" flight mode trims to the subtrims.
Also, as I understand from Mike's explanation, the instatrim only applies to the active mode. you will have to do it again for the other modes, that means an instatrim action for every flight mode.
Then you can work on the linkages to sort the problem and reset everything and try again, or when that is not possible, select one flight mode to be saved to the subtrims, and use trimming or apply some kind of offset to deal with the other flight modes. Some models might not allow for adjusting the linkages..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ERSKY9X Coding

Post by Kilrah »

For info, on OpenTX:
If Extended Trims is OFF (trim range is 25%) then Instant Trim can work on that trim range (25%).
If Extended Trims is ON (trim range is 100%) then Instant Trim will still only allow up to 25% on the first click, BUT if a trim has been maxed out a second click will allow this trim to go up to 100%.

For Flight Modes trims can be set up as "Trim from flight mode X plus own offset". That allows you to use for example FM0 as "base", you'd get your model in trim there, and once you switch to FM1 any further trim adjustment will be stored as an offset from FM0. That means on another flight/day if you take off in FM0 and need to adjust trim you'll do it here, and that adjustment will affect all other flight modes that use it as base and thus in most cases should not require further trimming on other modes.
Daedalus66
Posts: 1844
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

ERSKY9X Coding

Post by Daedalus66 »

All making sense.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Having the trim of a flight mode being an offset to another flight mode is interesting, although I'm tempted to only have it as an offset to flight mode 0. If it is an offset to another flight mode then that other mode could also be an offset to another mode etc.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I won't change how flight mode trims work for now, but will consider the above after I get the next release out!

The SKY board only has 256K of flash, and the current build has less than 1500 bytes spare, so something will need to be done there.

I'm adding a new "function" to voice alerts: v%val=0. This reads as v MOD val is equal to 0. MOD is the remainder when v is divided by val.
This allows a value to be spoken at intervals. My initial use is for "FUEL". I have the mAh used for the flight battery, so I'm setting up a scaler to convert this to a percentage used and storing this as the FUEL value.
Then I can set up a voice alert using v%val=0 with FUEL as the source and 10 and the val with the voice alert speaking the source value. This results in the FUEL remaining being spoken every 10% used.

The SCALER is set up as:
source mAh
offset -100
multiplier 50
divisor 1500
Mod value 1
Offset at Last
Unit Pcent
Sign -
decimals 0
Dest Fuel

This works for a 3000mAh limit. the 50 / 1500 is the same as 100/3000. The calculation is mAh*100/3000 giving percentage used. The offset of -100 results in a value that starts at -100 and goes to 0. With a - sign, this converts to a value that starts at 100 and goes down to 0.

This could be done before using a second scaler to get the MOD value and a logical switch to detect this equal to 0 and trigger the voice alert, but this new function makes it easier to set up.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I've posted a new test version, hopefully this will be the R222 release. Changes/fixes are:
Fix logfile formatting of some sensors (number of decimal places wrong and WATTS were always 0).
X9Lite includes handling of extra switches/pots (the three "spare" inputs are made available).
Voice alarms include v%val=0 function (as described above).
Trim switches detected as "autoswitch" selections (i.e. when selecting a switch for a function).

I flew yesterday with the "Fuel" voice alert I described above and it worked perfectly, giving me an alert every 10% used.

I also have a logfile start trigger configured (so I don't forget to start it). This operates by detecting the throttle channel is above -60 (i.e. about 20% throttle) for 2 seconds. This allows me to check the motor is starting OK without starting a logfile. The logfile is closed when I turn the throttle safety switch OFF.
I'm using switch SF (on a Taranis) as my safety switch, switch towards me is the SAFE position.

My current configuration for this is:
Mixer:
CH3: +100% Thr [the throttle channel]
CH8: +100% OP3 [copy of the throttle channel that includes any safety switch]
Logical switches:
L5: v>val -60 CH8
L6: 1-shot L5 2
L7: AND !L6 L5
L8 Latch L7 SF
and use L8 as the logfile enable switch.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I forgot we have delay on logical switches now, so this works just as well!
L5: v>val -60 CH8 Delay 2.0
L8 Latch L7 SF

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Thanks Mike..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
antlerhanger
Posts: 238
Joined: Tue Dec 25, 2018 3:19 am
Country: United States

Re: ERSKY9X Coding

Post by antlerhanger »

Mike I updated my pro's and Taranis . The date when I look at version shows 6/07/2019 instead of 07/07/2019 (just a heads up so there is no confusion ) . All flashed and are working fantastic .
THANK YOU so much for doing this .

Allen
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Perhaps it was.compiled one day before :)

João

Sent from my BLN-L21 using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Yes, it was compiled at 11:30 at night on the 6th. I ran a few tests before I posted it.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: ERSKY9X Coding

Post by bob195558 »

Oh yes, sometime the day is put first and not the month now.
Always changing from the way things use to be done before, year ago.
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Assuming where erskyTx is currently at, is release R222, moving forward I need to decide what to do with the original SKY board. The processor only has 256K of flash, and it is basically full, even building with limited language support and leaving out a few things where possible. The builds for other boards and radios are around 300K.

I could build for just English (currently it has English, German and French), possibly doing 3 builds one for each of these languages. This would save some space for now, but doesn't save so much space.
I could just say this is the last release that supports the SKY board (bug fixes would still be done!).
I could look for more existing features to remove from the SKY board to make space. Some small things like being able to set the stick gains on the radio could be removed, leaving the setting still possible in eepskye.
Currently, 32K is allocated for the bootloader. Not all is used, so I may be able to reduce the bootloader size and make some more space available for the main code.
Do something else I haven't thought of yet!
Upgrading the processor is possible, but I doubt many will want to do that!

Comments welcome!

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: ERSKY9X Coding

Post by bob195558 »

I have the last SKY-Board version which when I use it, it has always seem to perform,
can I say, the smoothest running of the 9x upgraded radio's that I have.
Maybe better said, most trouble free, which in part maybe because of the hardware (switches, pots,, wire connections)
have not given me as much trouble.
Owning and working on other members of our small rc-group, most of the 9x radios
have had to have there hardware re-fixed, re-placed and/or upgraded before they became reliable radios.
I have to admit I use my Taranis-x9d with erSkyTx (erSky9x) firmware most of the time
and second is the 9XTreme radio over the Sky-Radio which I do like a lot.
Sorry, I do not have a suggestions on how to manage the SKY-Board radios.
Thank you Mike for all the good work that you have done and are doing everyday. :)
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

MikeB wrote: Mon Jul 08, 2019 11:17 am Assuming where erskyTx is currently at, is release R222, moving forward I need to decide what to do with the original SKY board. The processor only has 256K of flash, and it is basically full, even building with limited language support and leaving out a few things where possible. The builds for other boards and radios are around 300K.
44K is already a big difference in my opinion :( Even if you remove languages and reduce the bootloader size, you might not even get enough space for the latest release?? :o

I have one skyboard radio with the old taranis gimbals (the ones with the IC). I guess the best option would be replacing the chip, so we could keep all features. Problem is, not all of us can do that :(

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ERSKY9X Coding

Post by Kilrah »

This is only about the first sky9x board version, of which I believe there was only a small quantity of around 100 made about 8 years ago? Doubt many are still in use, or that people who use them are going to want the latest updates...
antlerhanger
Posts: 238
Joined: Tue Dec 25, 2018 3:19 am
Country: United States

Re: ERSKY9X Coding

Post by antlerhanger »

LOL on the date ..I'm used to seeing month first :lol: :D ;)
User avatar
bob195558
Posts: 2377
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: ERSKY9X Coding

Post by bob195558 »

Maybe then, just have a separate download (http://www.er9x.com/)
for those oldest Sky-Boards as last update with a note (except for possible bug fixes).
Er9x on 9x radio, with Smartieparts Programmer and TelemetrEZ Board.
ErSky9x on Taranis, Sky9x, 9Xtreme radios.
3D-Printing: (https://openrcforums.com/forum/viewforum.php?f=129).
User avatar
RCHH
Posts: 467
Joined: Sun Jun 24, 2012 2:48 pm
Country: -
Location: Plymouth

Re: ERSKY9X Coding

Post by RCHH »

Which firmware will be suited to the "ErSky9X Rev.B+M4 with the ATSAM4S8C MCU 512K" that some of us bit the bullet and modded to?
The simpleton asked "Hows about ErSky9X for Horus???". And the Genius from Dorset replied "Why not indeed? I shall get right onto it!" And then there was light on Horus! And it was good!

Post Reply

Return to “erskyTx (was ersky9x)”