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 »

Perhaps, although I could take the view that is what the custom switches are for.

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 »

I would leave the custom switches for programming purposes. It can get quite complicated sometimes with some models.. And if we could keep all related to voice/audio/alarms together would make it easier, and also clear the custom switches of some stuff that gets in the way of real programming :) That was the reason to create the voice alarm menu in first place? If desired, we can still use the custom switches. we just don't use the function in the voice alarm menu, but I don't know why one would want to do that. I can see the benefit of adding the other logical functions to the voice alarms menu. Obviously we don't need the timers as we have already the rates.. :)
Maybe one day you could even decrease the number of C.switches if you really need the eeprom space. As quite a few of them were used for alarms.

Just my 2 cents
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 »

The biggest problem is we would need a second switch input stored somewhere in the "voice alarm" configuration.
I'm not ruling it out, but I need to think exactly what we try to configure.
Are we looking to allow "telemetry value" v<ofs "value" AND "switch1" AND "switch2"?

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: Are we looking to allow "telemetry value" v<ofs "value" AND "switch1" AND "switch2"?

Mike.
I was thinking more to do it like we have currently on C.switches.. if the AND, OR, etc is selected than a second switch would appear under the switch we already have there..
But I don't dislike your idea ;)
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 »

Do we need more functions for two switches than AND? We already have an implicit AND for the function test and the switch.
If you really do need an OR function on the switche(s) then you use a custom switch to provide it.

Thinking for the future as well, it seems it might be useful to tie 3 or 6 position switches to 3 or 6 voice messages.

Perhaps a source of 3-POS (or 6-POS) switch and a function of "Change". Then you have either a numbered file or a named file. The actual message output would be the numbered file plus 0-2 (0-5) or the named file with 0-2 (0-5) added to the last character.
I'm not sure how easy it would be to implement though.

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:Do we need more functions for two switches than AND? We already have an implicit AND for the function test and the switch.
If you really do need an OR function on the switche(s) then you use a custom switch to provide it.
so you allow only an AND between 2 switches for now??

Thinking for the future as well, it seems it might be useful to tie 3 or 6 position switches to 3 or 6 voice messages.

Perhaps a source of 3-POS (or 6-POS) switch and a function of "Change". Then you have either a numbered file or a named file. The actual message output would be the numbered file plus 0-2 (0-5) or the named file with 0-2 (0-5) added to the last character.
I'm not sure how easy it would be to implement though.
You could do it.. It would save some switches I guess ;)
But I can't provide that in my pack as there are "n" combinations.. I have a few files for multirotors and UAVs, etc, but people would have to rename or renumber them according to their setup..

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

Re: ERSKY9X Coding

Post by jhsa »

Mike, another situation here.. as you know I have been testing the oXs :(

I wonder if you could improve this.. When I turn the model off, the radio tells me that the flight battery is low and then no telemetry.. Would it be possible that in case of link loss it would only say "No telemetry" only?? I think in this case all the other information is irrelevant because of course "No telemetry" already says it all :)

Thanks,

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 »

In which field are you sending the flight battery voltage (from the oXs)?

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 »

This one:

FRSKY_USERDATA_VFAS_NEW , VOLT1 , 1 , 1 , 0
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
Toxi81
Posts: 7
Joined: Thu Jun 19, 2014 4:48 pm
Country: -

Re: ERSKY9X Coding

Post by Toxi81 »

Hello Mike,

I have one crazy idea about tripple axis acceleration senzor like ADXL345 supports on sky9x v3 board. It would be crazy handle your plane not only gimbals but also with acceleration senzor. The sensitivity of senzor should be set in the menu also the senzor could be reset standby counter. What do you think about it?
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 »

Could be interesting. I see it supports I2C. We have an I2C interface on the board, brought out to a connector, so we might be able to hook it in easily. I don't have much time available just now to do anything with it though. I've made a note to think about it.

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 »

João: What do you have set to output the voice messages?

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, what do you mean? You mean the voices that I hear when I turn the rx off? Basically a reportoire of all the alarms plus the "No telemetry" message.
For example, I have an alarm on the tssi, a voltage alarm followed by the voltage reading. So when I turn the plane off the radio says "No telemetry, receiver signal lost, flight battery low no telemetry (because I asked it to read the voltage after the alarm). As I said before if it would say only no telemetry would be fine. . But then, I would lose the tssi alarm (receiver signal lost) I guess..

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 »

Trying to think my way through this.
We have two types of telemetry, receiver specific and sensor.
For 'D' series, receiver specific is RSSI, TSSI, A1 and A2, all in a single packet. Sensor type is in a "user" packet.
For 'X' series, receiver specific is RSSI, RxVoltage, A1 and A2. Sensor type is anything else.

Receiver specific runs with a 350mS timeout, sensor with a 900mS timeout.

Currently, if something from a sensor is no longer valid, then the value obtained for that sensor is forced to 0 (zero). This will typically cause an alarm to be activated. So this causes your "Flight battery Low". Attempting to output the value detects that the value is invalid (not just 0) and replaces the spoken value with "No Telemetry".

Now, if I don't force a sensor value to zero, you won't get the alarm being triggered, because you will just get the last value that was returned when it was valid.

Perhaps I then need to monitor the telemetry timeouts separately.
If the "receiver specifc" timeout expires, then we haven't received ANY telemetry packets for that time. So this is basically "Telemetry lost". If the "sensor" timeout expires, then we have received no sensor packets, but we have received "receiver specific" packets, so this is "sensor telemetry lost", but we are still receiving things like RSSI.

So, possibly:
1. Don't force telemetry values to 0 so we avoid "spurious" alarms.
2. If we timeout "receiver specific" packets, report "Telemetry lost", or "No Telemetry".
3. When trying to speak a sensor value, if a "receiver specific" timeout has occured, don't speak anything. If only a "sensor" timeout has expired, then say "No Telemetry".
4. Do we need any sort of automatic "Telemetry Regained" message?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Toxi81
Posts: 7
Joined: Thu Jun 19, 2014 4:48 pm
Country: -

Re: ERSKY9X Coding

Post by Toxi81 »

Toxi81 wrote:Hello Mike,

I have one crazy idea about tripple axis acceleration senzor like ADXL345 supports on sky9x v3 board. It would be crazy handle your plane not only gimbals but also with acceleration senzor. The sensitivity of senzor should be set in the menu also the senzor could be reset standby counter. What do you think about it?
MikeB wrote: Could be interesting. I see it supports I2C. We have an I2C interface on the board, brought out to a connector, so we might be able to hook it in easily. I don't have much time available just now to do anything with it though. I've made a note to think about it.
Hello Mike,

if You will have a much time for this, I send You some usefull links:

There is 4 in 1 module with gyro. I think gyro is better solution for handling model or camera gimbal and accelerometer for wake up from "stand by mode". I have bought one for testing.
http://www.banggood.com/10DOF-9-axis-In ... 80213.html

There is links with sample code:
Tri-Axis Gyro Breakout - L3G4200D
http://dlnmh9ip6v2uc.cloudfront.net/dat ... xample.zip
http://www.parallax.com/sites/default/f ... e-Code.zip

Acceleration adxl345
http://www.sparkfun.com/datasheets/Sens ... lktest.zip
http://www.adafruit.com/products/1231

Compass HMC5883L
http://www.parallax.com/sites/default/f ... 2-demo.zip
http://www.parallax.com/product/29133
https://www.sparkfun.com/products/10530

Pressure BM085
https://www.sparkfun.com/products/retired/12882
http://www.sparkfun.com/datasheets/Sens ... 20Code.zip
Toxi81
Posts: 7
Joined: Thu Jun 19, 2014 4:48 pm
Country: -

Re: ERSKY9X Coding

Post by Toxi81 »

Hello Mike,

Will ever the ersky9x firmware supports MAVLINK ? Because I don't have the ersky platform and I would try make the telemetry via APC220 455MHZ RS232 module.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

Mike, I have an alarm on TSSI, v>Val TSSI 15
This would report if the signal is lost.. But I guess that if the telemetry is lost and the radio warns me than this alarm is not necessary anymore, right?

I'm not sure on the Telemetry regained message.. We could try it.. As long as it doesn't play at start up :D :D

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 »

Toxi81 wrote:Will ever the ersky9x firmware supports MAVLINK ?
It's on my list of things to do, I just don't know when I'll have time to do it!

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 »

Just posted new test versions with the "no telemetry" ideas above.

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. Will test later tonight or tomorrow, depending on how early I manage to come back

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 »

I been thinking a bit again (oops!).
We have the Futaba trainer connection, and it has both Tx and Rx of COM2 available on it. So, we could make up a cable, and connect two transmitters together with a high speed serial connection (while not using the connector for DJT telemetry of course).

This could make it relatively easy to send a model from one Tx to another.
Another item for my todo list!

Using the JR trainer jack is much more involved as it doesn't have serial hardware available on the processor pins that drive it.

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, sorry I don't get it.. what kind of transmitter to send models? Or you mean to control a model? And also which module work with serial? Only the XJT and DSMX as far as I know.. :o
Wouldn't it be better to send models over bluetooth? They are just a few kilobytes, right?

João
EDIT: Aaaahhhhh connect the 2 tx physically. Now I got it.. sometimes I must read the stuff 3 times.. that could be an option.. but bluetooth still sounds better ;) we could have both options. And they could both also work as trainer.. bluetooth wireless and trainer over serial with cable.. many possibilities.. :)
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 »

Ok, first report on voice. It was late last night so not so much testing. The voices at startup seem to be working good. Nothing apart from the model name and welcome message at startup, and my TSSI alarm + "No Telemetry" when turning off. That is wonderful as the other alarms seem to be irrelevant at shut down. Well, all of them are but obviously the link related ones must play, and that is that ;) :)
The only little thing is that before, when announcing telemetry events on a switch, and telemetry was missing, the radio would for example say " flight pack voltage No Telemetry, radio voltage 9.8 Volts..
Now it doesn't play the no telemetry file in between anymore. Could that be fixed, or is it a consequence of the other fixes and must stay like that? As I said, the startup and turning off seem to be excellent now. Until one person comes and say he/she liked it more the old way with all the noise, of course :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
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ERSKY9X Coding

Post by KAL »

Hi Mike,

I found a bug within the menu structure between MIXER and EXPO/DR:

In the "edit mix" when I place the cursor on weight and push menu long,
make some changes (or even none) in "expo/dr"
and return to "mixer" via exit button
the weight is either zero or GVx.

(Newest test version, but it seems this thing is still older)
One time I got a stack overflow error, but I can't reproduce it ...

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
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 »

The bug is you are only supposed to get to the EXPO/DR menu if you are on the source line.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ERSKY9X Coding

Post by KAL »

Aah, I see. Never thought of getting to the "expo/dr" from the source line.
For me it was somehow more logical to get there from the weight line.

btw: same problem with the "offset" line.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
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 posted new test versions.
This should fix the expo/dr problem. You get to the expo/dr menu from the mix menu if you are on the source line, and the source is one of AIL, ELE, THR or RUD, then press MENU LONG.

The "No Telemetry" message should now be played. Hopefully this won't cause any other things to play when they shouldn't.

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. Will check all tomorrow..

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
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ERSKY9X Coding

Post by KAL »

Hi Mike,

while playing a bit with GVARs and rotary encoder an idea came to my mind.
Would it be possible in the Global Vars menu to add a switch for rotary encoder
just to change a GVAR only if a certain switch is active?

reason: there are gyros out there being capable of heading hold and rate mode.
Some of them are controlled via a single channel.
e.g.
0 to +100% = gyro weight in rate mode
0 to -100% = gyro weight in hold mode
unfortunately this weights are not symmetrical.

With this additional switch it would be possible to feed 2 different GVARs
according to a 3-pos-switch, that controls hold/off/rate of the gyro.
The same switch then can be used in mixer menu to select which GVAR value is send to the gyro

I hope you understand what I want to express.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ERSKY9X Coding

Post by jhsa »

MikeB wrote:You get to the expo/dr menu from the mix menu if you are on the source line, and the source is one of AIL, ELE, THR or RUD, then press MENU LONG.
Just thinking, shouldn't you extend that to the scalers as well? They are also inputs..
Just for consistency of course, as a simple curve would do the same job I guess :)

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

Post Reply

Return to “erskyTx (was ersky9x)”