Rotary Encoders stopped working after update to 4.1

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
LittleWing918
Posts: 7
Joined: Sat Nov 12, 2022 4:58 pm

Re: Rotary Encoders stopped working after update to 4.1

#11 Post by LittleWing918 »

Absolutely sure. It shows as 'connected'.
I've kept it the same Channel A on both 3.7 and 4.1.
Everything's identical – except that it just doesn't work in 4.1.

The 4 encoders show up in the window to the right of the console window, too.

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Rotary Encoders stopped working after update to 4.1

#12 Post by SimPassion »

LittleWing918 wrote: Sat Nov 12, 2022 7:07 pm Absolutely sure. It shows as 'connected'.
I've kept it the same Channel A on both 3.7 and 4.1.
Everything's identical – except that it just doesn't work in 4.1.

The 4 encoders show up in the window to the right of the console window, too.

Could you please post a screenshot of your AM UI showing the hardware connections ?
Perhaps some weird mixing in the wiring !?!
Last edited by SimPassion on Sat Nov 12, 2022 7:31 pm, edited 1 time in total.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Rotary Encoders stopped working after update to 4.1

#13 Post by Keith Baxter »

Hi,

I will be back after the F1 sprint race.

And yes as Gilles says. something like this...
ice_screenshot_20221112-212849.png
ice_screenshot_20221112-212849.png (13.86 KiB) Viewed 725 times
Keith

After that
Last edited by Keith Baxter on Sat Nov 12, 2022 8:18 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Rotary Encoders stopped working after update to 4.1

#14 Post by SimPassion »

Meanwhile, could you check with this working code @LittleWing918 ?
Better using named hw

Code: Select all

--====================================================================================
--								CHECK PURPOSE
--====================================================================================


function dial_vor1_callback(direction)
if direction == 1 then
		xpl_command("sim/radios/obs1_down")
		print("OBS1 clockwise")
	elseif direction == -1 then
		xpl_command("sim/radios/obs1_up")
		print("OBS1 counterclockwise")
	end
end

hw_dial_add("OBS1", dial_vor1_callback)

function dial_vor2_callback(direction)
if direction == 1 then
		xpl_command("sim/radios/obs2_down")
		print("OBS2 clockwise")
	elseif direction == -1 then
		xpl_command("sim/radios/obs2_up")
		print("OBS2 counterclockwise")
	end
end

hw_dial_add("OBS2", dial_vor2_callback)

function dial_heading_indicator_callback(direction)
if direction == 1 then
		xpl_command("sim/instruments/DG_sync_up")
		print("HDG SET clockwise")
	elseif direction == -1 then
		xpl_command("sim/instruments/DG_sync_down")
		print("HDG SET counterclockwise")
	end
end

hw_dial_add("HDG SET", dial_heading_indicator_callback)

function dial_headingbug_callback(direction)
	if direction == 1 then
		xpl_command("sim/autopilot/heading_up")
		print("HDG BUG clockwise")
	elseif direction == -1 then
		xpl_command("sim/autopilot/heading_down")
		print("HDG BUG counterclockwise")
	end
end

hw_dial_add("HDG BUG", dial_headingbug_callback)
image.png
 

LittleWing918
Posts: 7
Joined: Sat Nov 12, 2022 4:58 pm

Re: Rotary Encoders stopped working after update to 4.1

#15 Post by LittleWing918 »

It now works. Flashed the wrong COM port.

But now I have a bigger problem to solve... apparently in reflashing my Arduino I chose the wrong COM port and erased my RealSimGear 430W.
I'm now on their support page hoping they can restore the software on it.

Clearly user error on my part. (facepalm)

Thanks for everyone's help tho!

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Rotary Encoders stopped working after update to 4.1

#16 Post by Ralph »

They have a tool on their website to flash it with their firmware.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Rotary Encoders stopped working after update to 4.1

#17 Post by Keith Baxter »

SimPassion wrote: Sat Nov 12, 2022 7:39 pm Meanwhile, could you check with this working code @LittleWing918 ?
Better using named hw
@SimPassion @Corjan

I have have beef with the way one can select boards and channels within both the create/edit page or the panel options.
Only flashed boards should be available for selection on instruments using named hardware. Also boards called in code should report an error if not available.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Rotary Encoders stopped working after update to 4.1

#18 Post by SimPassion »

Keith Baxter wrote: Sat Nov 12, 2022 8:30 pm
SimPassion wrote: Sat Nov 12, 2022 7:39 pm Meanwhile, could you check with this working code @LittleWing918 ?
Better using named hw
@SimPassion @Corjan

I have have beef with the way one can select boards and channels within both the create/edit page or the panel options.
Only flashed boards should be available for selection on instruments using named hardware. Also boards called in code should report an error if not available.

Keith
+1
Could be fair and wise precaution, indeed ;-)

Post Reply