Ersky9x Bug Reporting

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 Bug Reporting

Post by MikeB »

I'm not sure how to change that text under the avatar, possibly it is set when uploading a new avatar!
I've fixed the curve display bug and re-posted a new r222 zip file.

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

User avatar
mentero
Posts: 92
Joined: Sat Apr 23, 2016 1:11 pm
Country: Spain

Re: Ersky9x Bug Reporting

Post by mentero »

Solved, thank you Mike,

Miguel
We demand rigidly defined areas of doubt and uncertainty. Douglas Adams.
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

Hello Mike. It seems I have found something which looks like bugs in a version 21-May-2019 23:55
1) Script won't run
Radio: 'PRO
Problem: A script won't run after a script crashed with error
To reproduce: Run a script which causes a error several times than try to run any. You won't be able to do so until you powercycle the radio.
Expectancy: Script should run reardless of what happened before
2) No telemerty after Alert (Not a bud but still annoying)
Radio: 'PRO
Problem: Voice message "No telemetry" plays when you press aby key to skip "Reciever is still powered"
To reproduce: Turn off the radio when a connected telemetry reciever is powered on, skip warning.
Expectancy: No message played
3)

Code: Select all

while i <= 6
	rem --- payloadTx[2]=payload size
	payloadTx[i] = mspTxBuf[mspTxIdx]
	mspTxIdx = mspTxIdx + 1
	mspTxCRC ^= payloadTx[i]
	i += 1
	if mspTxIdx > t_size
		break
	end
end
This raises error 13 while it shouldn't

Thanks in advance!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

I have the fix for '3'.
2) will need some more investigation. I think it is due to the module being powered off by the power switch, so of course telemetry stops!
1) is the error between 1 and 15, or is it 101 to 115? It sounds like memory is being left "in use" after the script has stopped, I need to find out when the script stops. Edit: I can't make this happen, testing on a SKY board that has less RAM for scripts with a script that fails when running (subscript out of range), just keeps loading.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

2) Sure. Then I have two suggestions for 'PRO where a module seems to be hardwired to the switch. First: If the firmware is unable to prevent connection loss, the warning should be removed. Second: The warning should remain but telemetry must be ignored when the warning is shown
1) https://drive.google.com/open?id=18fra4 ... 412Ti1bLND Sorry for heavy breathing and budgie chirping. Here's my problematic script, can't get what I'm doing wrong. Must be working with any Cleanflight derivative with S.Port enabled. Should draw pages even without a module.
Attachments
bf_pid_vtx.bas.txt
(19.87 KiB) Downloaded 334 times

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

Re: Ersky9x Bug Reporting

Post by MikeB »

I've found a couple of missing "end" instructions that upset the program flow. Also "lastRunTS = now" was in the wrong place.
I've attached an updated version.

I'll hopefully post updated firmware with (3) fixed. I've still to look into (2).

Mike
Attachments
bf_pid_vtx.zip
(4.92 KiB) Downloaded 335 times
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

Thanks, Mike. Well, (1) is still a problem. If a broken script is interrupted or raised a runtime error, it prevents the script engine from normal operation until power cycle as shown in the video.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

Something very odd was happening there. I ran a test with your script and it appeared not to run, but it was actually running but never reaching the stop statement due to the missing "end" statements. Because it didn't reach the stop, the display wasn't re-drawn, leaving the file list showing. I'm adding detection of, one or more, missing "end" statements, so a script with that error won't try to run.

For (2), normally you should power the Rx off first, then the Tx. The Rx warning won't appear if you leave 3 seconds between powering the Rx off and powering the Tx off. Of course, when you power the Rx off you get a "no telemetry" voice message, which is normal.
I may be able to stop the "no telemetry" voice message, but I need to be certain to only stop it in the correct power off condition.

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 Bug Reporting

Post by MikeB »

I've posted a test version for you for the 'PRO, together with the script that runs (all the missing "end"s in place).
The script code now checks to make sure there are the correct number of "end" statements in the file and reports error 16 if one, or more, are missing.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

WOW, that's just awesome
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

So, another video. popup(...) is broken for sure. Error 16 should've been there from the beginning, it's just awesome. However, after it kicks in on the old version of the script, i'm yet unable to run any script until power cycle. Here's the video and the script which works fine, the only problem is popup(...).
https://drive.google.com/open?id=1-18nW ... C5z5v2jBuB
Attachments
bf_pid_vtx.bas.txt
(20.08 KiB) Downloaded 382 times
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

Hi Mike
I am experiencing the same glitch for quite a long time, with 9xtreme, and a 6 position switch.
If I turn the 6pos switch slowly, there is no problem, but If I turn it from pos 1 to 6 fast, the reversed color screen changes to nomal (I use reverse as default)

Video here: https://youtu.be/oNWnREkTcjU
I am using ersky9xProvR222d4, but with older versions I had the same issue.
My 9xr pro is fine.
Last edited by Rad on Tue May 28, 2019 7:04 pm, edited 1 time in total.
https://radindustries.wordpress.com/
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

Rad: How is the 6-pos switch wired? It looks like the original AVR processor may be resetting. Does the display return to reversed if you go to the Display menu and toggle the reverse option off and then on?

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 Bug Reporting

Post by MikeB »

The subroutine "invalidatePages" changes gState so, if called, cancels the popup. I got the popup to display by changing "invalidatePages" to:

Code: Select all

invalidatePages:
	j = 1
	while j < 32
		values_pid[j] = 0
		values_rates[j] = 0
		values_vtx[j] = 0
		j += 1
	end
	if gState # MENU_DISP
		gState = PAGE_DISPLAY
	end
	saveTS = 0
return
I'm unclear what the code:

Code: Select all

	now = gettime()

	if lastRunTS + 50 < now
		gosub SetupPages
		gosub invalidatePages
	end
	lastRunTS = now
is intended to do. As it stands (putting my change back!) I think it just runs calls the two gosubs once when the script first runs.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

MikeB wrote: Tue May 28, 2019 6:00 pm Rad: How is the 6-pos switch wired? It looks like the original AVR processor may be resetting. Does the display return to reversed if you go to the Display menu and toggle the reverse option off and then on?

Mike
Hi Mike, I have been testing everything that I could imagine, and the problem might be something in my radio, but just in case I will report here, so you might know if it is a bug or if it is damaged somehow.

The 6 pos switch I am using is the one Hobbyking sold years ago. I am using it in the 9xr pro and in this radio. I think it was a 10 or 12 position switch or so, but you can fit the desired position. As i said, no problem at all with the 9xr pro.

How is it wired? Straight fit, just replaced the original pot with it, thats all.

So what it happens is what you have seen in the video, and if I go to the display meny, the reverse option still appears as activated. If I deactivate it, and activate it again, the screen is back to reversed. If I turn that 6 pos switch fast, the screen goes back to unreversed.

Also it seems it only changes the screen once. I mean, starting as reversed, I move it to the sixth position and the screen is normal. No matter how many times I move it, the screen wont change. Moving the switch from pos 1 to 6th, when it arrives the 6th I can see for a fraction of second "9xtreme" in the screen.


AND I have just discovered something, that might give you more clues of what is going wrong.

If I switch on the radio with the 6pos switch in the 6th position, the screen does this: Blinks in red, again in red, then in blue and then in green. After that the screen keeps the green but there is nothing on it. The backlight color I am using is green and the radio plays the welcome sound and the switch positions alarm.

Hope it helps and it is something easy to fix in the code.
https://radindustries.wordpress.com/
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

Seeing "9xtreme" indicates the AVR processor is rebooting. The pots are still wired to the AVR. Your report suggests something odd with how the 6-pos is wired.
The flashing backlight colours indicate the 9xtreme is trying to "talk" to the AVR, it isn't responding, so the 9xtreme tries to flash the AVR with the required firmware, the green colour at the end indicating it did this successfully.

I'm tempted to suggest wiring a 1K resistor in the "wiper" signal from the 6-pos switch. The signal from the "pot" has a 0.1uF capacitor to ground. If the 6-pos switch connects the "wiper" to 5V, you could get a momentary "short" to ground through this capacitor until it charges. This could cause the 5V supply to drop enough that the processor sees a "brownout". Moving the switch slowly would give time for the capacitor to charge to intermediate levels, so the last change would not need to charge the capacitor much.

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 Bug Reporting

Post by jhsa »

Mike, I agree with you, specially if the radio's 9x mainboard has an m128 on it.

On mine, I remember I had to remove all capacitors from the digital inputs.. It was also always rebooting for no reason..

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
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

I removed the code with lastRunTS at all, it's absent in my last version. With your change it resets values every 50 ticks, without it it simply runs gosubs on the first run.
The problem with popup is that it catches EVT_MENU_BREAK which causes it to return 1 right after EVT_MENU_LONG which is supposed to open it. Also it catches multiple EVT_UP/DOWN_FIRST so selection moves several times when up or down is pressed. It's barely usable now.
P.S. The problem remains with your change to invalidatePages
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

To stop the "EVT_MENU_BREAK" add "killevents" as shown below:

Code: Select all

	if Event = EVT_MENU_LONG
		gState = MENU_DISP
  	killevents(Event)
		rem -- menu is currently displayed 
	elseif gState = MENU_DISP
This is normally needed after any LONG EVENT, to prevent the following BREAK event from occurring.

I'll investigate the popup "seeing" multiple UP/DOWN events. I have a small test script that uses a popup and that works OK, so it is either a problem with a large script, or something in the script itself causing this problem.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

Hi; I have found some old photos that I took years ago. There you can see the six position switch. Sorry if the photos are not clear, but if better photos are needed I can open the radio and take some more.

So I will buy a 1k resistor today. In which wire should I install it? Would it modify in any way the setups I have? I mean, due to a hand made 6 position switch is made installing resistors, this might inferfiere somehow.
4.jpg
5.jpg
https://radindustries.wordpress.com/
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

There are 3 wires going to the switch, ground, +5V and signal. The resistor goes in the signal wire.
I don't trust the wire colours used so it is best to check which is which.

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 Bug Reporting

Post by MikeB »

vodkabears wrote: Wed May 29, 2019 4:50 am. . .Also it catches multiple EVT_UP/DOWN_FIRST so selection moves several times when up or down is pressed. It's barely usable now. . .
If you add "Event = 0" after the call to popup:

Code: Select all

popresult = popup("set\0reload\0reboot", 0b111, 8)
Event = 0
It improves the operation. It doesn't move several times any more, but may just miss the occasional button press. This should make the script useable.
I need to look a bit more closely at events being passed to the script. The problem is events may occur every 10mS, and while the script is also run every 10mS, a large script may not complete during a 10mS time (I deliberately restrict how long a script runs to prevent it from affecting normal control operation).

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
vodkabears
Posts: 47
Joined: Thu Aug 23, 2018 5:37 am
Country: Russian Federation
Contact:

Re: Ersky9x Bug Reporting

Post by vodkabears »

Works like a charm, thanks Mike!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ErskyTx Bug Reporting

Post by MikeB »

I've improved the event handling for large scripts, events are queued up so they are not missed.
I've posted an updated provr222 for all radios.

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 Bug Reporting

Post by jhsa »

Thanks Mike
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
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

Hi Mike, I have some news. I did not have the 1K resistor and the shop was closed... So I instaled a 250ohm resistor. No luck with the screen resetting...
Then I tried with a 3.9k resistor I had, and still no luck with the screen resetting neither, BUT I can swtich the radio On with the 6 position switch in the 6th position!

Then I tried with a 7K resistor I had, and the same, the screen keeps reseting, but I can switch the radio with the 6th postion on.

So I think I am going to leave the radio as it is now. I am too afraid of damaging the 9xtreme. Worst can happen is I invert the color screen... So I can change it manually or if I reset the radio it returns to the position I want, so it is good enough.
https://radindustries.wordpress.com/
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Ersky9x Bug Reporting

Post by MikeB »

What are the analog values from the 6 positions of the switch?
The fact that, without a resistor, putting the switch in position 6 stops the AVR from operating properly does suggest your switch has some very odd wiring, possibly internally.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

Hi Mike, I thing the analogs values are -100, -59.9 -19.9, +19.9, + 59.9 +100.

I hope the photos throw you some light.
IMG_20190531_184733.jpg
IMG_20190530_114255.jpg
https://radindustries.wordpress.com/
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

IMG_20190531_190105.jpg
https://radindustries.wordpress.com/
Rad
Posts: 455
Joined: Wed Apr 20, 2016 3:43 pm
Country: Austria
Contact:

Re: Ersky9x Bug Reporting

Post by Rad »

https://radindustries.wordpress.com/

Post Reply

Return to “erskyTx (was ersky9x)”