ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
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's now further down the post with the label:
"r202 Release Candidate (21-Feb-2014)"
under it.

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

User avatar
Hasse.69
Posts: 143
Joined: Fri Dec 30, 2011 8:59 pm
Country: -
Location: Ostergotland Sweden

Re: ERSKY9X Coding

Post by Hasse.69 »

Downloaded and working.
Thanks a lot Mike.
To support the forum:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=82QKZZN5ZC8JE
To support ER9X:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Feedback on "r202 Release Candidate (21-Feb-2014)". There is a jitter on setup page 1 (of 13). if you scroll down to the bottom of the page the system automatically resets, ie flips back to the model's opening screen. Also if you go the other way, ie hits the opposite arrow key to go directly to the bottom of the page, the same thing happens. This only happens on the mentioned page (1 of 13), all other pages seem to be not affected. I have tried them. Coyuld you check and confirm please, just in case it is only specific to my TX, which would mean that all is not well with my setup.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
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'll look into it. I need to know what protocol you are using (PXX/PPM/DSM) as it affects what is displayed at the bottom of that menu (e.g. PXX adds BIND and RANGE).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
It's PXX on sky Rev 3 board. Thanks.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.

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 »

Just loaded that version, set the protocol to PXX and all is OK, no reboots.
Does this happen on all models, or just on one?
If just one, perhaps you could post the .eepm of the model, if all, please post a backup of your EEPROM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Here it is. It is happening on all models.
Doc-12.zip
(1.07 KiB) Downloaded 412 times
Stan
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
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 loaded that on my Tx and all is still OK, no reboots. I actually downloaded the posted firmware to be sure I had the same version running. Have you tried re-flashing the firmware?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
No not yet was waiting on your verdict. Will do it ASAP and report back. Thanks.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
As always you are on the ball, the downloaded file seemed to be a corrupt copy. I re-flashed and it was still the same, so I downloaded a fresh copy, re-flashed it and BINGO, AOK now. "All is well that ends well", (Shakespeare). Thanks a lot.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
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 »

Good to know it wasn't me!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
I have never doubted your work or ever had cause to. With this stuff, you are not only masterful but very meticulous, adept and an excellent practitioner, "THE ORACLE" so to speak, which is the basis of my consultation, thus, prior to me embarking on any however simple "corrective" procedures il-informed and il-equipped. When in doubt, as they say, always consult the Engine Driver. Hey, How's that for butter ?. Thanks a lot Mike.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
Bill
Posts: 195
Joined: Thu Jul 04, 2013 5:54 pm
Country: -

Re: ERSKY9X Coding

Post by Bill »

"All is well that ends well", (Shakespeare).
But isn't he dead!
“A good politician is quite as unthinkable as an honest banker”
They used to say "if you don’t want to work at McDonald’s, go to college." Now they say "if you want to work at McDonald’s, go to college.”
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Bill wrote:
"All is well that ends well", (Shakespeare).
But isn't he dead!
Yes Bill but never to be forgotten. The man was a master of his craft, thus I liken MikeB to him. :lol:
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
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'm finally getting round to a little addition I've had planned for some time. I'll add the concept, but may adjust it a bit later.

The idea is a general purpose "Scaler".
It takes as input almost anything (Stick, Pot, channel, GVAR or telemetry value).
To this value you apply:
An offset (currently -125 to +125)
A multiplier (currently 1 to 256)
A divisor (currently 1 to 256)
Optionally negate the result.
Specify how many decimal places are in the result (0, 1 or 2)
Choose when to apply the offset (+offset *multiplier / divisor OR *multiplier / divisor +offset)
Allocate a 'unit' to the result (e.g. volts, amps).

I may try to add a 'name' for display later.

Initially, these will be available for use as telemetry display or voice values. I'll look to see if they could be used elsewhere later (e.g. mix input? GVAR input?).

These should allow for all sorts of adjustments. Suppose you use the openXsensor, and return some value as TEMP1. A scaler will allow you to change the number into something meaningful to the value it represents.
Another possibility is to provide for offset and scaling to A1 and A2, if, e.g., you have a custom current measurement on them. I would need to do something regarding the flight battery capacity measurement such as define a single capacity value and specify the source.

If available as a mix input, then you could increase the apparent weight of an input.
They might also remove the need for the metric/imperial option, metric values can be converted to imperial using one of these.
I'm not sure how many to put in, I'm starting with 4 for testing.

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 »

wow, that sounds like big learning coming :D
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
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 »

If anyone wants to 'play' with Scalers, I've posted a test version on the test versions page.
They are NOT supported by eepskye (yet).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Mike,
Thanks. Great Job. Sounds brilliant. Looking forward to the learning challenge.

jhsa,
Yes Welcomed learning, albeit accompanied by very steep learning curves but i'll be combat ready,
at least I hope my brain will be, you know, decreasing grey cells and all. Should be fun.
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

You still got some grey cells left? Lucky you... :mrgreen:

Joao

Sent from my GT-I9195 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
skylark
Posts: 197
Joined: Mon Jul 09, 2012 6:18 pm
Country: -
Location: Oxford, England

Re: ERSKY9X Coding

Post by skylark »

Joao:
Yeah just about and that is because I'm of a rebelous nature. Never giving up. Yes, they are there alright, I can count them on one hand and still have fingers left over, but they are there nontheless :lol: . So there. Eat your heart out Joao :mrgreen: :mrgreen:
Stan.
He who knows not and knows not he knows not, is a fool: SHUN HIM.

He who knows and knows he knows, is a wise man : SEEK HIM

But he who knows not and knows he knows not, is a baby: TEACH HIM.
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 »

Updated with another test version. I've added a 4 character name to the scalers, you can edit it.
Also sorted a problem in custom switches when comparing a Scaler with a constant. The constant might need some scaling itself, that will need a little thought.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
SkyNorth
Posts: 958
Joined: Tue Dec 27, 2011 11:40 am
Country: -
Location: Mansfield , Ontario

Re: ERSKY9X Coding

Post by SkyNorth »

So with adding scalers it allows for you to calibrate inputs for Y = mx + b?
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, or Y = m(x+b).
In both cases m is p/q where p and q are positive integers >0 (up to 256).

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 »

oh-oh!! Will I have to go get a degree in rocket science to be able to use this feature?? :o
At the moment I am a bit lost.. :(

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 »

Let's try a specific example. Some time ago you wanted to use a TMP36 temperature sensor connected to either A1 or A1 of a 'D' series receiver.
This provided a voltage of 0.750 volts at 25 deg C and a change of 0.010 volts per deg C.
So at 0 deg C it gives 0.500 volts, and at 100 deg C it gives 1.500 volts.
The A1 count (8-bit converter) for 0.500 volts is 0.5/3.3*256 = 38.8, so use 39.
The A1 count (8-bit converter) for 1.500 volts is 1.5/3.3*256 = 116.4, so use 116.
The difference between these is 116-39 = 77.

So now for the Scaler (use SC1).
Set the source to A1.
Set the offset to -39. This is added to the A1 value so removes the 39 count fo 0 deg C.
Now a count of 77 represents 100 degC, so the count needs to be scaled.
Set the multiplier to 100 and the divisor to 77.
Set the units to DegC.
Set the name to (say) "Tmp".

Now, if you use SC1 for a telemetry value display, it will show the temperature in degrees C, with a unit of 'C'.
If you use Sc1 for a voice output, it will say the temperature in degrees C with units of "degrees".

These are slightly experimental. The offset can go from -125 to +125. I'm not sure if this is a wide enough range, but it is what fits in a byte.

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 for taking your time to explain this Mike.. I will have to read it again after some sleep and try to digest it better and make some sense of it. It will certainly not be easy for the common mortal to understand ;) I was never that good at math.
Can we play with this only with the skyboard at the moment? All versions? ;)
I did build a thermometer using the TMP36 (I think) as it reads negative temperature.. But I'm interested on the TMP37 for RC temperature measurement as it reads positive temp only and I expect it to give better resolution. ;)

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 »

SKY board only at present (although as the code is common it will get compiled into "ersky9x for Taranis").
I'm not sure what the impact would be on flash, RAM and EEPROM usage for er9x, nor the performance 'hit'.
I've only put 4 Scalers in so far, but if they are really useful, I can add more on the SKY board.

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 »

It seems someone has been busy changing ersky9x, although it is in fact a bit of a fake image at present!!!
s5520690.jpg
Apparentely there is a AT91SAM7S512 (ARM) processor inside!

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 committed r202.

Changes:
Add oXsensor voltage on telemetry
DSM telemetry updates
DSM telemetry auto-configure
DSM telemetry screen updated
Add current source option
Slow voice bug fix
Add Scalers and A3/A4
Bootloader fixes for MAC
Stop logging on model load
Expo/Dr fix on updating model version
Backup and restore models to SD card
Allow 'sticky' throttle with timer THs
PXX only send 8 channels in D8 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:It seems someone has been busy changing ersky9x:
s5520690.jpg
Apparentely there is a AT91SAM7S512 (ARM) processor inside!

All I know at present.

Mike.
:shock: :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

Post Reply

Return to “erskyTx (was ersky9x)”