Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve Papgets with multi aircraft support #1068

Merged
merged 13 commits into from
Jan 22, 2015
Merged

Conversation

gautierhattenberger
Copy link
Member

Makes papgets working with several aircraft. If no target A/C specified, behavior is the same then before.

This will close #181 and a part of #1056

@flixr
Copy link
Member

flixr commented Jan 16, 2015

And how do you specify the aircraft id?

@flixr flixr added the GCS label Jan 16, 2015
@gautierhattenberger
Copy link
Member Author

It is automatic for drag-and-drop.
If you make a papget from a GCS xml file, you just need to add the property to the list. Something like this should work for A/C number 10:

<property name="ac_id" value="10"/>

It reminds me that I should probably save this when using the save GCS layout option... coming soon

@flixr
Copy link
Member

flixr commented Jan 16, 2015

Ok, was wondering because you can neither select the ac_id in the papget edit popup, neither was it saved to the config...

@gautierhattenberger
Copy link
Member Author

tested and working with 2 A/C in sim, saving and loading layout

@flixr
Copy link
Member

flixr commented Jan 19, 2015

Can you also add the ac_id as an input to the papget edit popup?
On a sidenote: I also noticed that the ticks in the gauge papget are not correctly resized when zooming in.

@gautierhattenberger
Copy link
Member Author

I was wondering if adding the field ac_id to the edit box was really useful. Changing the ac_id dynamically means unbinding and binding again. I did looked at it yet if it is a pain or not, but probably a little.
But I agree that showing the ac_id (without edition) is a good idea. Would it be enough ?

I'll look at the gauge.

@flixr
Copy link
Member

flixr commented Jan 19, 2015

I guess at least displaying it (or displaying that any id is used) would be good...

@flixr
Copy link
Member

flixr commented Jan 20, 2015

The fix for the gauge papget works nicely, thanks!

Regarding the ac_id for papgets, IMHO it is still not really great and I think we should have at least one of the following options

  • upon drag-n-drop of a message: possibility to choose whether it should bind to that specific ac_id or any
    • maybe even default to "any"?
  • possibility to disable filtering on ac_id in the papget edit dialog

Otherwise it becomes rather annoying to create a layout that has the papgets you want, but works with any single aircraft.

@gautierhattenberger
Copy link
Member Author

Here, I did option 3: ask if ac_id should be saved or not when saving layout.
The reasons are:

  • it is really a annoying to unbind and bind again
  • not all papgets have config dialog box
  • drag-and-drop to "any" doesn't make mush sense to me
  • this solution is easy and covers your main use case

@flixr
Copy link
Member

flixr commented Jan 21, 2015

Sounds OK to me :-)

@flixr
Copy link
Member

flixr commented Jan 21, 2015

Some remaining things:

  • saving the layout removes <!DOCTYPE layout SYSTEM "layout.dtd">
  • it asks about saving ac_id even if there are no papgets
  • removing a papget doesn't really work, you can drag it out of the map, but it is still there somewhere and saved to the layout...

@gautierhattenberger
Copy link
Member Author

Points 1 and 2 should be okay. For the last one, removing messages papgets works for me (and they are not saved afterwards). For other papgets like buttons, it was not possible to remove them anyway (and I don't plan to do it in this pull request).

@flixr
Copy link
Member

flixr commented Jan 21, 2015

Ok, deleting a papget via the popup edit dialog works indeed.
Somehow I was under the impression that you can also remove a papget by dragging it out of the map...
That is not the case, but it would be good if this could be prevented (don't accept the drop if it is outside of the map, or really remove it in that case)...

@flixr flixr changed the title Papgets improve Papgets with multi aircraft support Jan 21, 2015
@gautierhattenberger
Copy link
Member Author

I don't really want to try to find the window size, so it is only deleted on left and top side, which are the places you have to chance get them back. On right and bottom side, you can try to make the window bigger to find your papget again...

@flixr
Copy link
Member

flixr commented Jan 22, 2015

Would have been nice to somehow get the map window size where you can place papgets.
But I guess this is good enough for now and there are more important problems to work on...

Papgets are (really) destroyed when placed outside the window
@gautierhattenberger
Copy link
Member Author

Found it ;)

@flixr
Copy link
Member

flixr commented Jan 22, 2015

nice :-)
Works and looks good to merge to me...

gautierhattenberger added a commit that referenced this pull request Jan 22, 2015
improve Papgets with multi aircraft support

close #181
@gautierhattenberger gautierhattenberger merged commit 9a0472d into master Jan 22, 2015
@flixr flixr added this to the v5.6 milestone Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

papgets should also work with more than one aircraft
2 participants