Highlighted knob shows through panel.
Re: Highlighted knob shows through panel.
BTW, this is how I see it working....not how it currently is.
Re: Highlighted knob shows through panel.
After I updated to 3.6 the other day, all my attempted codes started working. YAY!!!
Re: Highlighted knob shows through panel.
First let me thank SLING for his help and support...invaluable.
Steve
This was the starting point.
Placing all instruments in 1 panel where you want them to be when you show/hide the ones you want.
This worked for changing panels and using the HSI Course dial, but didn't allow the dials for the Altimeter, Heading bug of the HSI or the OBS dial of the NAV2 gauge to work.
The reason is that they are under or behind other instruments.
They must be in front or on top of other instruments that share the same space.
Shown is the wrong(top image) and right(bottom image) way to layer images with dials.
This is the results of running the script. Just the flight instruments show.
After touching the dial in the upper right corner it turns yellow waiting for the Knobster to be turned.
After turning the Knobster to the Engine selection. It hides the flight instruments and shows the engine instruments.
The Knobster remains highlighted waiting for the turn back to Flt. instruments.
This was the first attempt using a pushbutton switch to toggle between panels.
The "heading bug" for the HSI has been touched and turned with the Knobster.
After pushing the button to change panels, notice the highlighted button
showing through from the previous now hidden panel.
There is code I believe that can turn off the highlight, but I opted to go with a dial switch for now.
Below is the code I used to show/hide different instruments using groups and a dial switch.
function callback_dial(direction)
if direction == 1 then
group_visible(group_id1, false)
group_visible(group_id3, true)
else
group_visible(group_id1, true)
group_visible(group_id3, false)
end
end
img_add("dial_switch_bg.png",1202,0,99,120)
dial_knob = dial_add("dial_switch_knob.png", 1208,26, 87, 87, callback_dial)
touch_setting(dial_knob , "ROTATE_TICK", 60)
dial_click_rotate(dial_knob,60)
id1 = instrument_get("ee69cfea-2ed5-45a0-15e6-ca1ed8005382")--Clock
id2 = instrument_get("45fd30ce-50dc-451e-9854-93f1d6198a4f")--Outside temp
id3 = instrument_get("26b3801a-3d81-4a02-883e-d2c8b3e194f8")--Audio Panel
id4 = instrument_get("518f5e35-a3a2-49ee-8bb2-ead02de460e5")--Airspeed
id5 = instrument_get("7f1b789b-1a11-4dd0-3ec5-7a933f3933c9")--Garmin HSI/Vor
id6 = instrument_get("7b4bd7b9-5422-4b60-a962-8824d25bcf86")--Attitude Indicator
id7 = instrument_get("59557b1b-2d76-483b-12be-02d6954f38a5")--HSIC
id8 = instrument_get("df50d81a-7713-4100-8c88-5d005ac3c69a")--Altimeter
id9 = instrument_get("a47db2c2-eb87-47ac-9194-23da5124beb3")--VSI
id10 = instrument_get("fa2e2c88-6830-4ea6-82eb-0a8a3d345699")--L.Temps Small
id11 = instrument_get("89aa3df8-1514-497f-30dc-fc411a16f72a")--Manifold Press. Small
id12 = instrument_get("a24cb3db-1a6d-4965-a461-9fdef285e5bc")--RPM Small
id13 = instrument_get("d80fa550-9cde-45de-b674-847c69adef19")--R.Temps Small
--
id14 = instrument_get("2f67312c-cda6-4c8e-9d9e-c091137cb46e")--Manifold Press.
id15 = instrument_get("3d1c5229-6029-4cff-332f-c39aa3e89c3c")--L.Temps.
id16 = instrument_get("f3adbd19-8cab-47e6-911b-f2871f4b0fa1")--OXY
id17 = instrument_get("6eba8bc6-df83-4395-2040-313ae94d349f")--RPM
id18 = instrument_get("fb10057f-ceb7-42b5-99e3-483dd36a3c2f")--R.Temps.
id19 = instrument_get("a1ca484a-bd9f-4d26-308a-d3d8d1f31a43")--EGT
id20 = instrument_get("1ed11bcd-f1b5-4feb-1c3c-480e2c2f8262")--L.Fuel
id21 = instrument_get("009fb07e-961d-4717-b0d7-3bd5fe19cda4")--Fuel Flow
id22 = instrument_get("3ba8df47-309d-416c-a215-7c0e2cc44bcb")--Volts
id23 = instrument_get("6c5ba8df-cbd9-43b1-833b-aa52f6a5db2a")--Amps
id24 = instrument_get("4fa9ab9d-def1-4c18-b77c-81d233899e0a")--Fuel Press.
id25 = instrument_get("43dd3eaa-a213-4542-b800-1f566d6e0a98")--Vacuum
id26 = instrument_get("1c8bd514-e277-4f9c-b168-65d9a653bfee")--R.Fuel
group_id1 = group_add(id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,id12,id13)
group_id3 = group_add(id14,id15,id16,id17,id18,id19,id20,id21,id22,id23,id24,id25,id26)
group_visible(group_id3, false)
Steve
This was the starting point.
Placing all instruments in 1 panel where you want them to be when you show/hide the ones you want.
This worked for changing panels and using the HSI Course dial, but didn't allow the dials for the Altimeter, Heading bug of the HSI or the OBS dial of the NAV2 gauge to work.
The reason is that they are under or behind other instruments.
They must be in front or on top of other instruments that share the same space.
Shown is the wrong(top image) and right(bottom image) way to layer images with dials.
This is the results of running the script. Just the flight instruments show.
After touching the dial in the upper right corner it turns yellow waiting for the Knobster to be turned.
After turning the Knobster to the Engine selection. It hides the flight instruments and shows the engine instruments.
The Knobster remains highlighted waiting for the turn back to Flt. instruments.
This was the first attempt using a pushbutton switch to toggle between panels.
The "heading bug" for the HSI has been touched and turned with the Knobster.
After pushing the button to change panels, notice the highlighted button
showing through from the previous now hidden panel.
There is code I believe that can turn off the highlight, but I opted to go with a dial switch for now.
Below is the code I used to show/hide different instruments using groups and a dial switch.
function callback_dial(direction)
if direction == 1 then
group_visible(group_id1, false)
group_visible(group_id3, true)
else
group_visible(group_id1, true)
group_visible(group_id3, false)
end
end
img_add("dial_switch_bg.png",1202,0,99,120)
dial_knob = dial_add("dial_switch_knob.png", 1208,26, 87, 87, callback_dial)
touch_setting(dial_knob , "ROTATE_TICK", 60)
dial_click_rotate(dial_knob,60)
id1 = instrument_get("ee69cfea-2ed5-45a0-15e6-ca1ed8005382")--Clock
id2 = instrument_get("45fd30ce-50dc-451e-9854-93f1d6198a4f")--Outside temp
id3 = instrument_get("26b3801a-3d81-4a02-883e-d2c8b3e194f8")--Audio Panel
id4 = instrument_get("518f5e35-a3a2-49ee-8bb2-ead02de460e5")--Airspeed
id5 = instrument_get("7f1b789b-1a11-4dd0-3ec5-7a933f3933c9")--Garmin HSI/Vor
id6 = instrument_get("7b4bd7b9-5422-4b60-a962-8824d25bcf86")--Attitude Indicator
id7 = instrument_get("59557b1b-2d76-483b-12be-02d6954f38a5")--HSIC
id8 = instrument_get("df50d81a-7713-4100-8c88-5d005ac3c69a")--Altimeter
id9 = instrument_get("a47db2c2-eb87-47ac-9194-23da5124beb3")--VSI
id10 = instrument_get("fa2e2c88-6830-4ea6-82eb-0a8a3d345699")--L.Temps Small
id11 = instrument_get("89aa3df8-1514-497f-30dc-fc411a16f72a")--Manifold Press. Small
id12 = instrument_get("a24cb3db-1a6d-4965-a461-9fdef285e5bc")--RPM Small
id13 = instrument_get("d80fa550-9cde-45de-b674-847c69adef19")--R.Temps Small
--
id14 = instrument_get("2f67312c-cda6-4c8e-9d9e-c091137cb46e")--Manifold Press.
id15 = instrument_get("3d1c5229-6029-4cff-332f-c39aa3e89c3c")--L.Temps.
id16 = instrument_get("f3adbd19-8cab-47e6-911b-f2871f4b0fa1")--OXY
id17 = instrument_get("6eba8bc6-df83-4395-2040-313ae94d349f")--RPM
id18 = instrument_get("fb10057f-ceb7-42b5-99e3-483dd36a3c2f")--R.Temps.
id19 = instrument_get("a1ca484a-bd9f-4d26-308a-d3d8d1f31a43")--EGT
id20 = instrument_get("1ed11bcd-f1b5-4feb-1c3c-480e2c2f8262")--L.Fuel
id21 = instrument_get("009fb07e-961d-4717-b0d7-3bd5fe19cda4")--Fuel Flow
id22 = instrument_get("3ba8df47-309d-416c-a215-7c0e2cc44bcb")--Volts
id23 = instrument_get("6c5ba8df-cbd9-43b1-833b-aa52f6a5db2a")--Amps
id24 = instrument_get("4fa9ab9d-def1-4c18-b77c-81d233899e0a")--Fuel Press.
id25 = instrument_get("43dd3eaa-a213-4542-b800-1f566d6e0a98")--Vacuum
id26 = instrument_get("1c8bd514-e277-4f9c-b168-65d9a653bfee")--R.Fuel
group_id1 = group_add(id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,id12,id13)
group_id3 = group_add(id14,id15,id16,id17,id18,id19,id20,id21,id22,id23,id24,id25,id26)
group_visible(group_id3, false)