Board index FlightGear Support Hardware

Just a comment

Joysticks, pedals, monitors.

Re: Just a comment

Postby Philosopher » Fri Jul 12, 2013 12:41 pm

If we don't get dynamic repeatability in this release, then we can simulate it:

Code: Select all
<button>
    <repeatable>false</repeatable>
    <binding>
        .....
        if (cmdarg().getValue("repeatable")) func {
            var _b = cmdarg().getChildren("binding");
            settimer(func foreach (var b; _b) props.runBinding(b), 0);
        }
    </binding>
</button>
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Just a comment

Postby macnab » Fri Jul 12, 2013 12:51 pm

And if the button is repeatable and it shouldn't be, then need a flag that forces run-once, cleared on mod-up.

Better than being restricted with the modified choices.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Fri Jul 12, 2013 4:04 pm

given the developer activity during the last weeks and months and the current git status, I'd guess it's pretty safe to say that there won't be any relevant changes... I am not even sure if we have a corresponding issue filed at the tracker ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 3:40 am

The wiki says that zakalawe is a mentor for C++ hooks. Is he not tracking this thread? Should we put something in the issue tracker, mentioning his name? (Stuart also offered his help in the older thread.) Apart from dynamic repeatable, we are going to need some special magic anyway for aircraft overridden functions - flaps is a common one.

Ideas:
The function library is currently called joylib.nas. If the GUI uses joylib for everything, even the basics, then the GUI can call joylib.throttleAxis() and joylib.throttleAxis() can call controls.throttleAxis().

While waiting for dynamic repeatable, rather than have complicated code in the xml file (we do want that as simple as possible), make every button repeatable, with a mod-up call. Joylib knows what should not be repeatable, and can use a flag to force one-shot action, until mod-up received.

With joylib having many functions that currently only exist as snippets, if the details of joylib are published, then users who can work with xml, but don't want to use the GUI, can use some of the functions, just by making the button repeatable and calling joylib.function.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Philosopher » Sat Jul 13, 2013 3:57 am

I'm not sure why you wouldn't just use controls.nas -- I can write glue code, and ultimately each button&mod combo will get its own binding and repeatability flag, and it's not like there's anything we could "fix" in joylib on top of controls since most planes do actually follow the same plan and (try) to ensure compatibility (if they don't, then I vote we patch them, say Nick Ivyca's two aircraft).

There's reasons why I don't want a whole lib of wrappers...
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 4:36 am

The big problem is repeatable/non-repeatable. We need buttons to be both, or the system is limited.

Currently:
We don't have dynamic switching, so we have to fudge it.
This can be done in the xml, which makes the xml file complicated, or in Nasal, implemented as a simple busy flag.

The future:
We get dynamic switching. The current fudge becomes redundant.
If fudge in Nasal, joylib.nas gets updated and distributed with the new release. Change is trivial (per function). No change to Joystick GUI.
If fudge in xml, we cannot get rid of it without forcing everyone to redo their joysticks. Joystick GUI will have to be changed to no longer add the fudge.
If xml uses controls.nas, then controls.nas will have to be updated to do dynamic switching.
If xml only uses joylib.nas, no changes needed to controls.nas.

There may be other factors as well.

I don't see the wrapper issue, unless it is for Cyborg Mode. That is an entirely different issue, and will have to probably use a totally different method. It is the same (on a much, much smaller scale) with the Saitek Quadrant mode based lever assignment. I suggest we leave these out for Version 1.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Sat Jul 13, 2013 7:29 am

The wiki says that zakalawe is a mentor for C++ hooks.

Actually, I am the one who added him, because of the discussion that he started here a while ago (which is linked to, next to his nick)

Is he not tracking this thread?

I think most of the core developers are busy with the upcoming release, especially zakalawe who's been shouldering more than 50% of the whole project for months ... so frankly, I wouldn't bother him currently, without him, there would be no regular FG releases at all. He's the single guy who's omni-present in all places and juggling tons of duties. Many other long-term developers are not very active currently. So let's just face it, that the discussion is pretty late for the 2.12 release, and should be revisited after the release, i.e. once the code freeze is lifted for the 3.0 release, which would probably be a good time to add relevant stuff to the issue tracker.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 7:42 am

I was thinking of Ver 3 release anyway. We can fudge it in the meantime to test it

I think we should put the necessary files in something like dropbox or 2shared, otherwise anybody who uses git will suffer if we commit. I can't use a branch of git because of bandwidth problems, so I will have to store and replace, retrieve and replace, etc to test.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Sat Jul 13, 2013 7:49 am

with various people working on different aspects of this, I am not sure if dropbox will suffice - but you can have your own little 20kbyte repo if you wanted to, completely separate from fgdata, which should in fact be more efficient than dropbox bandwidth-wise.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 8:04 am

You mean start a JoystickGUI project at gitorious?

That should work fine. Everyone could then use it. It would have to be considerably bigger than 20k though the joylib.nas is already 21kb and that's just the beginning. Then there is the GUI itself, and possibly a readme so that Philosopher can find the various functions.

I'll investigate. It's better than pasting all the code here.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Sat Jul 13, 2013 8:37 am

still, size should not be a factor, even if the two of you were to spend a whole week writing XML/Nasal code, it'd be hard to beat the base package in size :lol:
Also, at least after the initial clone, git is pretty smart about what to transmit, and it's also pretty efficient - when compressed via SSH, it's not like such a repo would include lots of binary data, it will be 99% text, which can be efficiently compressed - so even if you are on a 56k dialup or behind a GSM connection, you should be fine.

In fact, you could probably copy the corresponding git repo right into fgdata and manually keep it in sync.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 9:37 am

OK. I have created an account at Gitorious.
I created an empty folder called Joystick GUI and ran git init.
Then I ran ssh-keygen.
Copied and pasted the contents of the pub file to save my SSH key.
I then created a new project and repo fgjoystickgui->fgjoystickgui.
I ran the config user.name and user.email as they say.

I then moved the 2 files I have to this folder and ran
Code: Select all
git checkout master
git remote add origin git@gitorious.org:fgjoystickgui/fgjoystickgui.git
git push origin master


This gives me an error pathspec 'master' did not match any files known to git. And bits about authenticity, should continue to connect?

Need help now.
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Sat Jul 13, 2013 9:55 am

@all: the repo is at: https://gitorious.org/fgjoystickgui/fgjoystickgui (it's empty ATM)

@macnab: go to your local git repo, run "git status", "git branch", "git remote -v" to check if the output is sane (i.e. as expected), in case of doubt, post the output here so that we can have a look. Note that you'll probably want to use the gitorious SSH url for pushing, i.e. change the remote accordingly.

To push anything, you'll want to "git add" the files first, and then use "git commit" to commit all added files.

push url: git@gitorious.org:fgjoystickgui/fgjoystickgui.git

A simple way to get started now, would be cloning your repo:


PS: Feel free to add me to the list of contributors
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Just a comment

Postby macnab » Sat Jul 13, 2013 10:35 am

Everything looks fine with the checks.

Missed doing the clone, though. Add the 2 files. Did the commit. Reported create mode for each file. Seems fine to me.

Now I need to push the commits.
Did git remote set-url origin git@gitorious.org:fgjoystickgui/fgjoystickgui.git
No complaints.
Tried git push origin master and it complained about authenticity again.

EDIT: I said yes, and it added gitorious to list of known hosts. But it then said permission denied (public key).
macnab
 
Posts: 886
Joined: Tue Aug 02, 2011 7:20 am
Location: Johannesburg, South Africa
Callsign: ZS-ILH
Version: Git
OS: Win7Pro 64bit SP1

Re: Just a comment

Postby Hooray » Sat Jul 13, 2013 10:51 am

sorry for asking the obvious, but did you upload your public SSH key to gitorious ?
If you haven't, use the dashboard.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests