ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Joao.
I will do.
Thank you.
I am not good at language, so typing very slow.
Your reply very quick ( ^ o ^ )

ys11

User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

83% was failed.

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

Re: ERSKY9X Coding

Post by MikeB »

Definitely try removing a couple of protocols to make the code smaller. The flash space use may actually be slightly larger than shown and 98% could be too large.

Did the 83% fail to flash, or is it failing to run?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Thank you Mike B.
83% fail to flash, but with bind button is OK.
I will do more smaller one.
You quick too.

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

Re: ERSKY9X Coding

Post by MikeB »

In your _config.h file, have you got:
#define CHECK_FOR_BOOTLOADER
not commented?

Hmmmm, it is possible, my code for checking for flashing when the main progrm is running may not be on the Github sources. This would explain why using the bind button works, but not using it doesn't work.

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

User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike B.
Strange, I made 71% and 60%.
Both fail to flash, but with bind button OK.
4in1 module runs very well.
I think it shows no relationship with file size.
Just once I can flash with no bind button, 2nd attempt need bind button.
What this indicate ?.......
Thank you.

ys11
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike B.
I never seen befor about CHECK_FOR_BOOTLOADER.
I will check.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike B.
I can not find out " #define CHECK_FOR_BOOTLOADER ".

ys11
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike B.
Thank you.
I will try this.
Goodnight and for me good morning.

ys11
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike and Joao.
I finished RTC MOD with no short circuit trouble ( ^ o ^ )

Then I try to update 4in1 module with ar9x board again.
I have no idea, where to add "#DEFINE_CHECK_FOR_BOOTLOADER" in config.h
So I try with bind button several times.
It works and now I can use all the protocol with Banggood 4in1 module.

Thank you Mike, you made this function really really nice.

I made a firmware:
1. A7105,CYRF6936,CC2500,CX10 and MJXQ ver 1.1.6.21.
Which shows "Sketch uses 31,758 bytes (96%) of program storage space, Maximum is 32,768 bytes.
Global variables use 854bytes (41%) of dynamic memory, leaving 1,194 bytes for local variables, Maximum is 2,048 bytes."

2. All NRF24L01 exclude CX10 and MJXQ ver 1.1.6.21
Sketch uses 29,458 bytes (89%) of program storage space, Maximum is 32,768 bytes.
Global variables use 944bytes (46%) of dynamic memory, leaving 1,104 bytes for local variables, Maximum is 2,048 bytes."

3. All NFR24L01 ver 1.1.6.21
Sketch uses 32,386 bytes (98%) of program storage space, Maximum is 32,768 bytes.
Global variables use 956bytes (46%) of dynamic memory, leaving 1,092 bytes for local variables, Maximum is 2,048 bytes.

I use 1. and 2. for model that I have, so I don't need new STM32 module for a while.

But when I update with 3.
It doesn't work, green light steady lit and red light doesn't.
And can not update with bind button any more.
It seems broke opti bootloader.
With 3. firmware flashed using USBASP, ends up with same condition, it doesn't work.

So I assume 96% of size firmware is safe, but 98% one over written boot loader as Mike stated before.

My radio :
Turnigy 9x with ar9x B v1.3 3SD8
firmware ersky r211c8
Banggood module YRFM02_V1.2

Is there any chance to get firmware that having "#DEFINE_CHECK_FOR_BOOTLOADER" ?

ys11
edit
Last edited by ys11 on Sun May 14, 2017 4:10 am, edited 1 time in total.
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Yesterday and even today rainy around here.
I'm in home and making try and error error error ( * _ * )
Then I realized when I check internal RF check box and remove external check box, still external RF's LED lit, green is steady and red is slow blink.
External RF still powered.
Is this design to do so ?
Or my TX faulty ?
Thank you.

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

Re: ERSKY9X Coding

Post by jhsa »

Yes, Ersky9x supports switching the RF Modules power, but the Ar9x (and some other boards) don't, unless a little circuit is added.
Without this circuit both modules are ON when you switch the radio ON..
João



EDIT: I will post a link to the project as soon as I get to my computer, but I have also just posted it in the Ar9x thread at RCG.
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
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Joao.
I'm very interested that little circuit.
I'd like to make it and install in my radio.
I hope it's not too difficult for me.
Thank you Joao.
Weather is coming good, but sun going down ( T o T )

ys11
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Joao.
Is this thread you mentioned ?
viewtopic.php?f=85&t=8471

I'll read carefully.
Thank you.

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

Re: ERSKY9X Coding

Post by jhsa »

Yep, that one.. Actually there is someone building a verobard version of it right now, but it will control only the internal module.
The original project controls both internal and external..
João

Sent from my thor 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: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I've posted test version "c9" of ersky9x.
I found a bug (added when I "improved" the protocol setting), where the custom failsafe setting for the XJT was not carried over to the new settings, so the failsafe would be set to all channels at 0% (not good for the throttle).

You will need to configure the custom settings.


Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Thanks, Mike - appreciate your vigilance and persistence :) Have downloaded it, but sadly will not be back to my radio until next Sunday night - I will install it soon after but cannot report back on any test flying until a week later - other things to do in the meantime, not flying related.
MikeB wrote: Mon May 15, 2017 10:44 pm I've posted test version "c9" of ersky9x.
I found a bug (added when I "improved" the protocol setting), where the custom failsafe setting for the XJT was not carried over to the new settings, so the failsafe would be set to all channels at 0% (not good for the throttle).

You will need to configure the custom settings.


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

Re: ERSKY9X Coding

Post by MikeB »

RCHH wrote: Thu Mar 30, 2017 2:37 pm Ooooooo LUA script .... yes please!
As noted on a 9Xtreme thread, I have a start to LUA support working. I can run a "standalone" LUA script in ersky9x. I have this tested on a standard Taranis, a 9Xtreme and a 9XR-PRO. The 9XR-PRO has limited RAM compared to the others, so won't be able to run a lot of scripts or large ones, but it does work. I have compiled LUA into the Taranis plus and the QX7, but not tested them yet. I can see no reason for this not to work on the Horus, the 9XE or the AR9X, and should also work on "SKY/AR9X" boards upgraded to the larger RAM processor.

This is a "work in progress", only the one type of script is supported, and there are a very limited number of support functions in ersky9x, but more types and functions should be fiarly easy to add.

Mike.

Edit: Tested on a AR9X with upgraded processor, although I think it will still only be using the first 64K RAM.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Just FYI - flew 6 different models today (some several times) on 'c9' and could detect no issues which could be traced to the firmware or radio, only to the pilot(!) Checked Failsafe operation on several models before flight, no issues noticed - all worked as expected. I did not do any creating or copying of models, so cannot directly report on those issues, but everything else was 'stable as before'.

Regards,
ozphoenix
ozphoenix wrote: Mon May 15, 2017 11:04 pm Thanks, Mike - appreciate your vigilance and persistence :) Have downloaded it, but sadly will not be back to my radio until next Sunday night - I will install it soon after but cannot report back on any test flying until a week later - other things to do in the meantime, not flying related.
MikeB wrote: Mon May 15, 2017 10:44 pm I've posted test version "c9" of ersky9x.
I found a bug (added when I "improved" the protocol setting), where the custom failsafe setting for the XJT was not carried over to the new settings, so the failsafe would be set to all channels at 0% (not good for the throttle).

You will need to configure the custom settings.


Mike.
User avatar
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike.
I'm testing c9,works well on my V8FR, D8R-II plus, D4R II, VD5M.
E010 and CX10 green works fine.
And I still can not flash Banggood 4in1 module without bind button.
Read carefully RCG thread and compile HEX, doesn't work.

Yesterday I used ARDUINO IDE Ver 1.6.13 to compile 1.1.6.21 all NRF, HEX came out size of 95% , 31,200 bites.
With ARDUINO IDE Ver 1.6.09, all NRF came out size of 98%, 32,386 bytes.
98% was too big and broke boot loader and doesn't work.
95% works with E010 and CX10 green, and all protocol seems to work because green and red LED lit steady.
I am happy with this result, but how come?...
I'm still working to flash with no bind button.
Any suggestion ?..

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

Re: ERSKY9X Coding

Post by MikeB »

I'll try to post a file for you to test. I'm still getting my new PC sorted since the PSU failed on my previous one, so I can't build it just yet.

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

Re: ERSKY9X Coding

Post by MikeB »

"d2" posted. Use this with care. I've added LUA scripting, a bit limited at present, but I'm working on it. More details on LUA specifics are here: viewtopic.php?f=7&t=10230.

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 »

Mike, as you might have already read, I am reviving an old, completely destroyed, 9x radio that was given to me for parts. I had an extra Ar9x board and a 7 way encoder.
On this one, and as I have made a smaller Safe Power switch board for it, I had enough room to install a 3W speaker that can work on most of the audio spectrum. I thought it was time I can hear some nice bass frequencies :)
The problem is that due to the filter to reduce the noise, the board also cuts all higher frequencies. That is ok on those very small speakers as they don't respond to lower frequencies anyway. But on this one I notice the lack of the higher frequencies. So I have modified the low pass filter cutoff frequency at the amp's input by replacing the original 100nF cap with a 10nF one. Sound improved a lot.
The problem is that it also got louder and I am having loads of distortion at higher volumes.
So my question is, would it be possible for the volume setting in the general settings to be a hard limiting one?
Currently, When we assign a pot for controlling the volume, it ranges between min an max, no matter what the general settings value is.
So the idea here is that the pot only controls a range between min and the value set in general settings. This would allow us to set a top limit on the audio volume without having to do any hardware changes.
The radio has an excellent sound now by the way :)
Shame I don't have anymore room for another of those speakers or I would activate the amp's second channel :) That would be 6W to annoy the other club members at the field.. :D
Thanks

João


Sent from my thor 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: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

A bit messy, but you can alter the volume range.
1. Have the volume controlled by a GVAR.
2. Have the GVAR source as a Scaler.
3. Use a pot as the Scaler source, and set the Scaler to give the required range.

Notes:
A GVAR goes from -125 to +125 for minimum volume to maximum volume.
The Scaler output needs to map onto this range.
There is a bug! If you set GV4 to control the volume, it uses GV5 (etc.). I'll fix this for the bnext test version.

I just tried:
Set volume control to GV4.
Configure GV5 with source SC8.
SC8 - source P3, divisor 16, offset -61, offset at last.
SC8 with source P3 goes from -1024 to +1024.
The divisor changes this to be -64 to +64.
The offset changes this to be -125 to +3 (about half the range -125 to +125).

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, but would it be possible to do that in general settings? This affects the complete radio, not only a few models. It is a setting that stays forever, and not different for different models. OpenTX has an audio mixer where you can balance all different sounds?? That is a wonderful thing in my opinion.
As you suggest, we would have to do this for every single model :(
For that I think it will be better to change the hardware then.

Or maybe create some scalers and gvars for the radio settings?
I think it would be easier to just allow the pot volume to range between min and the value set in radio settings :)

Thanks

João

Sent from my thor 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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Never mind, problem solved :) Best way actually. The Ar9x alllows for installing a volume pot. Great board ;)
Maybe an I2C volume chip could be connected here?

Thanks

JoãoImageImage

Sent from my thor 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
kiwihornplayer
Posts: 28
Joined: Thu Oct 22, 2015 8:40 pm
Country: New Zealand

Re: ERSKY9X Coding

Post by kiwihornplayer »

Hi Mike
1. I have loaded the 30 May X7.bin of ersky9xProvR221d2 onto my Qx7. Performing fine so far. Noticed the problem with using 3-pos dual rate switches which has been mentioned elsewhere. Third position always resets to first position values. It is possible to create a combination of any two of Hi - Mid - Low depending upon which switch is configured first but not all three.

2. Also noticed one of the non-customisable screens appears like a telemetry screen showing Fuel bar at top, RSSI and SWR bar values at bottom along with numeric values. There is no access to this screen so is an additional to the two custom telemetry screens. Might be a hangover from another radio version.

3. Is there any way to configure Timer 1 or 2 to provide a continuous accumulated time (ie engine hours) that stays with a particular model and does not reset with TX-off or long Menu button press? Similar to the way the non-editable 3rd timer shows total TX running time.

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

Re: ERSKY9X Coding

Post by jhsa »

kiwihornplayer wrote: Sun Jun 04, 2017 11:57 pm Hi Mike
Noticed the problem with using 3-pos dual rate switches which has been mentioned elsewhere. Third position always resets to first position values. It is possible to create a combination of any two of Hi - Mid - Low depending upon which switch is configured first but not all three.
Please download the er9x manual from the link below and check / learn how to program Dual and Triple rates.
HI, Mid and LOW are just names, all of them can assume any value. Low can be bigger than HI or MID, for example.

viewtopic.php?f=5&t=6473
2. Also noticed one of the non-customisable screens appears like a telemetry screen showing Fuel bar at top, RSSI and SWR bar values at bottom along with numeric values. There is no access to this screen so is an additional to the two custom telemetry screens. Might be a hangover from another radio version.
Nope, that is a screen that is present in all versions of ersky9x
3. Is there any way to configure Timer 1 or 2 to provide a continuous accumulated time (ie engine hours) that stays with a particular model and does not reset with TX-off or long Menu button press? Similar to the way the non-editable 3rd timer shows total TX running time.
Go to "Model Setup / Timers" menu, scroll down to the last page, and you will find the model's total time..

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
ys11
Posts: 40
Joined: Tue May 09, 2017 1:11 pm
Country: -

Re: ERSKY9X Coding

Post by ys11 »

Mike.
Finally I can flash 4in1 module without bind button.
I put Multiprotocole.ino that you gave me to ver 1.1.6.21.
I add "#define CHECK_FOR_BOOTLOADER" in _Config.h, next line of "#define ENABLE_SERIAL"
"#define INVERT_TELEMETRY" or "//#define INVERT_TELEMETRY" is not affect to flash the module.

But there is luck of DM002, so I add below to Multiprotocole.ino.
"#if defined(DM002_NRF24L01_ino)
case MODE_DM002:
next_callback=intDM002( );
remote_callback = DM002_callback;
break;
#endif"
Then I had a DM002.
I don't bind DM002, but module's green and red LED lit steady.

In maintenance mode that is horizontal trims apart then power on, I can flash without bind button.
In Radio Setup - General - Run Maintenance, I can not flash without bind button, but I can flash with bind button.
Is this normal ?..

Flash with radio is really really nice feature, Thank you Mike.

ys11

Post Reply

Return to “erskyTx (was ersky9x)”