Re: [Flightgear-devel] nasal electrical system

2005-10-12 Thread Curtis L. Olson
syd wrote: Hi Steve ...I found the file in Aircraft/c172/c172-electrical.nas It works the way I wanted 0 volts at the outputs when the switch is off. This should also model battery discharge and charge ... I'm not sure if we have a battery voltage or ammeter gauge in the default c172,

[Flightgear-devel] nasal electrical system

2005-10-10 Thread syd
Hi Steve ...I found the file in Aircraft/c172/c172-electrical.nas It works the way I wanted 0 volts at the outputs when the switch is off. ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org

Re: [Flightgear-devel] Nasal on Mac/Sparc/Irix fixed. Maybe.

2005-09-21 Thread Erik Hofman
Andy Ross wrote: Erik pinged me on the Nasal endianness bug, which I *think* has been fixed. It no longer occurs with the Mac test code I have, but I didn't find a smoking gun and can't run FlightGear on that mac (shell access only). Anyway, please update both (!) SimGear and FlightGear CVS

[Flightgear-devel] Nasal on Mac/Sparc/Irix fixed. Maybe.

2005-09-20 Thread Andy Ross
Erik pinged me on the Nasal endianness bug, which I *think* has been fixed. It no longer occurs with the Mac test code I have, but I didn't find a smoking gun and can't run FlightGear on that mac (shell access only). Anyway, please update both (!) SimGear and FlightGear CVS sources and let me

Re: [Flightgear-devel] Nasal on Mac/Sparc/Irix fixed. Maybe.

2005-09-20 Thread Ampere K. Hardraade
On September 20, 2005 05:15 pm, Andy Ross wrote: Ampere: there is one incompatible change here.  The strc() function has been removed in favor of the array syntax for addressing bytes out of a string.  The A380 scripts are the only code that uses it, so I didn't bother including a

Re: [Flightgear-devel] Nasal vs. gcc 4.0.x

2005-08-13 Thread Mathias Fröhlich
On Donnerstag 11 August 2005 10:09, Erik Hofman wrote: Mathias Fröhlich wrote: I have sometimes strange problems with some keybindings. I do not know if these are dony by nasal or if the ones in question are implementented directly. But sounds like that. I expect so. About every key I

Re: [Flightgear-devel] Nasal vs. gcc 4.0.x

2005-08-13 Thread Erik Hofman
Mathias Fröhlich wrote: You use gcc-4.* on your O2? No the O2 is big-endian, different problem. I thought that you use sgi's CC? Yes. Erik ___ Flightgear-devel mailing list Flightgear-devel@flightgear.org

Re: [Flightgear-devel] Nasal vs. gcc 4.0.x

2005-08-11 Thread Erik Hofman
Andy Ross wrote: * Yes, I'm using Nasal at work. We even have a mac here that has reproduced the endianness issues, so hopefully I'll have a fix for that ready in a few days. Yes! ;-) Seriously, it's probably a *lot* faster to hunt down the problem in a stand-alone version of Nasal.

[Flightgear-devel] Nasal vs. gcc 4.0.x

2005-08-10 Thread Andy Ross
Just in case anyone else has noticed: I discovered today at work* that the gcc 4.0.1 shipped with Fedora Core 4 miscompiles Nasal pretty badly when the optimizer is turned on. I'm not sure what the effect will be on FlightGear specifically, as I haven't had time to do a build recently.

[Flightgear-devel] Nasal runtime error

2005-07-06 Thread Martin Spott
This is just an update/reminder concerning Nasal errors on IRIX. This is the startup log of a current FG-Build. At the end I press 'v' once to change the view - which obviously doesn't work. Pressing F10 to enable the menu is still functional: SGTimeZoneContainer(): No such file or directory

Re: [Flightgear-devel] Nasal big-endian problem (still)

2005-06-22 Thread Andy Ross
Martin Spott wrote: Andy Ross wrote: If someone can set me up with ssh access to a shell account (no need to run the whole fgfs binary) on a Mac or SGI or whatnot, let me know. :) I could offer an account on an UltraSparc with GCC, As long as the compiler generates 32 bit executables

[Flightgear-devel] Nasal big-endian problem (still)

2005-06-21 Thread Erik Hofman
Hi, I've tried several approaches to get Nasal working for big-endian (32-bit) systems but they all fail. I don't see a way to get this working and this makes FlightGear unusable for IRIX at least: Nasal runtime error: non-objects have no members at

Re: [Flightgear-devel] Nasal big-endian problem (still)

2005-06-21 Thread Martin Spott
Erik Hofman wrote: I've tried several approaches to get Nasal working for big-endian (32-bit) systems but they all fail. I don't see a way to get this working and this makes FlightGear unusable for IRIX at least: Man, am I happy that I'm not the only one with disabled throttle on IRIX :-)

Re: [Flightgear-devel] Nasal big-endian problem (still)

2005-06-21 Thread Andy Ross
Martin Spott wrote: Erik Hofman wrote: I've tried several approaches to get Nasal working for big-endian (32-bit) systems but they all fail. I don't see a way to get this working and this makes FlightGear unusable for IRIX at least: Man, am I happy that I'm not the only one with disabled

Re: [Flightgear-devel] Nasal big-endian problem (still)

2005-06-21 Thread Erik Hofman
Andy Ross wrote: Hrm. I kinda assumed when the reports stopped that this was just a symptom of a version skew or unsynchronized checkout. :( I was waiting for a faster CPU to arrive which should speedup testing, but it takes longer than I had anticipated. Try this: hard-code the

Re: [Flightgear-devel] Nasal big-endian problem (still)

2005-06-21 Thread Martin Spott
Andy Ross wrote: Martin Spott wrote: Man, am I happy that I'm not the only one with disabled throttle on IRIX :-) Hrm. I kinda assumed when the reports stopped that this was just a symptom of a version skew or unsynchronized checkout. :( I tried to investigate the problem but failed to

Re: [Flightgear-devel] Nasal Settimer

2005-06-10 Thread theoreticle
Do you have a ref for a function definition for NASAL's settimer() please? I am working on a red_headed_stepchild_of_a_hard_to_work_with_joystick.xml that might require it also :-) - Original Message - From: Josh Babcock [EMAIL PROTECTED] To: FlightGear developers discussions

[Flightgear-devel] NASAL error

2005-06-09 Thread Josh Babcock
OK, this works great: (other than the fact that it doesn't actually do anything yet) gearLightCheck = func { for (i=0; i3; i=i+1) { thisProp = /gear/gear[ ~ i ~ ]/position-norm; if ( getprop(thisProp) == 1 ) { print(green); } elsif ( getprop(thisProp) == 0

Re: [Flightgear-devel] NASAL error

2005-06-09 Thread Andy Ross
Josh Babcock wrote: OK, this works great: (other than the fact that it doesn't actually do anything yet) if ( getprop(thisProp) == 1 ) { but this } elsif ( getprop(thisProp) 1 ) { Line 143 produces this error: Nasal runtime error: nil used in numeric context

Re: [Flightgear-devel] NASAL error

2005-06-09 Thread Josh Babcock
Josh Babcock wrote: OK, this works great: (other than the fact that it doesn't actually do anything yet) gearLightCheck = func { for (i=0; i3; i=i+1) { thisProp = /gear/gear[ ~ i ~ ]/position-norm; if ( getprop(thisProp) == 1 ) { print(green); }

Re: [Flightgear-devel] NASAL error

2005-06-09 Thread theoreticle
: [Flightgear-devel] NASAL error OK, this works great: (other than the fact that it doesn't actually do anything yet) gearLightCheck = func { for (i=0; i3; i=i+1) { thisProp = /gear/gear[ ~ i ~ ]/position-norm; if ( getprop(thisProp) == 1 ) { print(green); } elsif

Re: [Flightgear-devel] NASAL error

2005-06-09 Thread Andy Ross
[EMAIL PROTECTED] wrote: I know this is an incredibly dumb question.. but in Nasal an elseif conditon is expressed as elsif? Perl uses elsif like Nasal. C and derivatives (and Javascript) use else if only because they hack their parser grammers to handle the inherent ambiguity. The bourne

Re: [Flightgear-devel] NASAL error

2005-06-09 Thread theoreticle
Nevermind. I found the Nasal docs. - Original Message - From: [EMAIL PROTECTED] To: FlightGear developers discussions flightgear-devel@flightgear.org Sent: Thursday, June 09, 2005 4:26 PM Subject: Re: [Flightgear-devel] NASAL error I know this is an incredibly dumb question

RE: [Flightgear-devel] NASAL update YASim parameters

2005-06-08 Thread Vivian Meazza
Josh Babcock wrote Andy Ross wrote: Josh Babcock wrote: Is there a way to tell YASim to add or subtract some drag? I want to add some drag to the superfort when the bomb doors open. They were supposed to really wreck the airflow, though not as bad as the lg which doubled the drag!

[Flightgear-devel] NASAL update YASim parameters

2005-06-07 Thread Josh Babcock
Is there a way to tell YASim to add or subtract some drag? I want to add some drag to the superfort when the bomb doors open. They were supposed to really wreck the airflow, though not as bad as the lg which doubled the drag! Josh ___ Flightgear-devel

Re: [Flightgear-devel] NASAL update YASim parameters

2005-06-07 Thread Andy Ross
Josh Babcock wrote: Is there a way to tell YASim to add or subtract some drag? I want to add some drag to the superfort when the bomb doors open. They were supposed to really wreck the airflow, though not as bad as the lg which doubled the drag! Well, right now you could model them as landing

Re: [Flightgear-devel] NASAL update YASim parameters

2005-06-07 Thread Andy Ross
Josh Babcock wrote: I don't think the LG thing will work, they have to be extended independently of the LG. Just tie a different property to the EXTEND input on the gear. Nothing in YASim is hardcoded; all user inputs are configurable. Speedbrakes would be great, though I would request that

[Flightgear-devel] Nasal advice...

2005-04-24 Thread Andy Ross
More not-quite-FlightGear subject matter ahead. But I need advice: Nasal needs a character constant syntax. That is, the ability to write an ASCII charactrer as a numerical constant. In C/C++, you use single quotes to do this (e.g. the token 'A' is just a synonym for the integer value 65).

Re: [Flightgear-devel] Nasal advice...

2005-04-24 Thread Erik Hofman
Andy Ross wrote: More not-quite-FlightGear subject matter ahead. But I need advice: Nasal needs a character constant syntax. That is, the ability to write an ASCII charactrer as a numerical constant. In C/C++, you use single quotes to do this (e.g. the token 'A' is just a synonym for the

RE: [Flightgear-devel] Nasal advice...

2005-04-24 Thread Vivian Meazza
Andy Ross wrote So anyway, which of the following are good/bad choices for a character constant syntax: `A` @A $A %A A @A $A %A A cA Anything but `A` - I'm bound to misread that in the future sometime. I favour a function. Regards, Vivian

Re: [Flightgear-devel] Nasal advice...

2005-04-24 Thread Jim Wilson
From: Andy Ross snip Perl and Python get away without having character constants at all. They do string indexing by making substrings at runtime. But substrings are garbage-collected, which makes them a little expensive. I don't want to thrash the heap just to iterate through a single

Re: [Flightgear-devel] Nasal advice...

2005-04-24 Thread Andy Ross
Erik Hofman wrote: At first I was thinking using #'A' since # represents a number already in most cases, but then again; how about just using a new function? Just to be clear, there is a function to do this already: strc() returns the value of the Nth byte in a string. The index defaults to

RE: [Flightgear-devel] Nasal

2004-11-19 Thread Vance Souders
-devel] Nasal Roy Vegard Ovesen wrote: On Thursday 18 November 2004 16:53, Vance Souders wrote: Here's a snippet of code to convert the inhg property value to mbar and then use this to rotate the left-most digit on the mbar display. The code doesn't seem to work; Is this the correct usage

RE: [Flightgear-devel] Nasal

2004-11-19 Thread Vivian Meazza
Vance Souders wrote: Nope, it doesn't work. The interpolation table doesn't seem to handle the small values necessary for texture translation. For instance, you would think an input value of 29.90 into the following table would give you an output value of 0. No dice. You get .9 no

Re: [Flightgear-devel] Nasal

2004-11-18 Thread Roy Vegard Ovesen
On Thursday 18 November 2004 01:33, Boris Koenig wrote: sure, right - but putting nasal scripts into module tags like in other PropertyList encoded XML files isn't yet supported natively. Also, I don't think Vance wanted to link the Nasal script to a particular action ? I don't want to

Re: [Flightgear-devel] Nasal

2004-11-18 Thread Boris Koenig
Roy Vegard Ovesen wrote: On Thursday 18 November 2004 01:33, Boris Koenig wrote: sure, right - but putting nasal scripts into module tags like in other PropertyList encoded XML files isn't yet supported natively. Also, I don't think Vance wanted to link the Nasal script to a particular action ? I

RE: [Flightgear-devel] Nasal

2004-11-18 Thread Vance Souders
: [Flightgear-devel] Nasal On Thursday 18 November 2004 01:33, Boris Koenig wrote: sure, right - but putting nasal scripts into module tags like in other PropertyList encoded XML files isn't yet supported natively. Also, I don't think Vance wanted to link the Nasal script to a particular action

RE: [Flightgear-devel] Nasal

2004-11-18 Thread Vance Souders
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Boris Koenig Sent: Thursday, November 18, 2004 8:27 AM To: FlightGear developers discussions Subject: Re: [Flightgear-devel] Nasal Roy Vegard Ovesen wrote: On Thursday 18 November 2004 01:33, Boris Koenig wrote: sure, right - but putting nasal scripts

Re: [Flightgear-devel] Nasal

2004-11-18 Thread Boris Koenig
Roy Vegard Ovesen wrote: On Thursday 18 November 2004 16:53, Vance Souders wrote: I wish I had a clue about how to add text chunks to the 3d animation code :-| What exactly do you want to do ? Do you want to animate text ? If you only want to add text layers, then there are numerous examples in

RE: [Flightgear-devel] Nasal

2004-11-18 Thread Vivian Meazza
Roy Vegard Ovesen wrote: On Thursday 18 November 2004 16:53, Vance Souders wrote: Here's a snippet of code to convert the inhg property value to mbar and then use this to rotate the left-most digit on the mbar display. The code doesn't seem to work; Is this the correct usage of the

RE: [Flightgear-devel] Nasal

2004-11-18 Thread Vance Souders
are welcome. Thanks, Vance -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Boris Koenig Sent: Thursday, November 18, 2004 11:59 AM To: FlightGear developers discussions Subject: Re: [Flightgear-devel] Nasal Roy Vegard Ovesen wrote: On Thursday 18 November 2004

Re: [Flightgear-devel] nasal?

2004-11-17 Thread Boris Koenig
Ampere K. Hardraade wrote: On November 16, 2004 09:56 pm, Curtis L. Olson wrote: Andy Ross wrote: Sure: http://plausible.org/nasal/flightgear.html This should probably move to the FlightGear site, I suppose. Ahhh, thanks for the url ... it's been too long since the last time I looked at nasal. I

[Flightgear-devel] Nasal

2004-11-17 Thread Vance Souders
I'm working on a new cockpit for the T6; the T6's altimeter displays barometric pressure in both inches HG and MB. I want to add a small amount of script that converts from the HG reading in the property tree to MB for the gauge (I need this for the texture translation). After looking at

Re: [Flightgear-devel] Nasal

2004-11-17 Thread Boris Koenig
Vance Souders wrote: I'm working on a new cockpit for the T6; the T6's altimeter displays barometric pressure in both inches HG and MB. I want to add a small amount of script that converts from the HG reading in the property tree to MB for the gauge (I need this for the texture translation).

Re: [Flightgear-devel] Nasal

2004-11-17 Thread Roy Vegard Ovesen
On Thursday 18 November 2004 00:06, Vance Souders wrote: I'm working on a new cockpit for the T6; the T6's altimeter displays barometric pressure in both inches HG and MB. I want to add a small amount of script that converts from the HG reading in the property tree to MB for the gauge (I need

[Flightgear-devel] nasal?

2004-11-16 Thread Curtis L. Olson
Is there any documentation that explains how the nasal scripting system is integrated into FlightGear? I looked a bit, and can't find anything. If I decide I want to call a nasal script from someplace in the code, how do I go about doing that? Do I create an entirely new parser and call it?

Re: [Flightgear-devel] nasal?

2004-11-16 Thread Andy Ross
Curtis L. Olson wrote: Is there any documentation that explains how the nasal scripting system is integrated into FlightGear? I looked a bit, and can't find anything. Sure: http://plausible.org/nasal/flightgear.html This should probably move to the FlightGear site, I suppose. If I

Re: [Flightgear-devel] nasal?

2004-11-16 Thread Boris Koenig
Andy Ross wrote: Curtis L. Olson wrote: Is there any documentation that explains how the nasal scripting system is integrated into FlightGear? I looked a bit, and can't find anything. Sure: http://plausible.org/nasal/flightgear.html This should probably move to the FlightGear site, I suppose.

Re: [Flightgear-devel] nasal?

2004-11-16 Thread Curtis L. Olson
Andy Ross wrote: Sure: http://plausible.org/nasal/flightgear.html This should probably move to the FlightGear site, I suppose. Ahhh, thanks for the url ... it's been too long since the last time I looked at nasal. I can copy it into the source/docs-mini/ directory. This is pretty much

Re: [Flightgear-devel] nasal?

2004-11-16 Thread Ampere K. Hardraade
On November 16, 2004 09:56 pm, Curtis L. Olson wrote: Andy Ross wrote: Sure: http://plausible.org/nasal/flightgear.html This should probably move to the FlightGear site, I suppose. Ahhh, thanks for the url ... it's been too long since the last time I looked at nasal. I can copy it

Re: [Flightgear-devel] Nasal multiple contexts (was: AI carrier)

2004-10-28 Thread Boris Koenig
Hi Andy ! Thanks for answering my Nasal inquiry several weeks ago, regardless of your vacation - Hope you've had a good time in Japan ;-) Andy Ross wrote: I'm honestly looking for something to get me back into FlightGear development. I can do the YASim integration if you guys have an interface

[Flightgear-devel] Nasal - Question

2004-06-17 Thread Vivian Meazza
I have hit a snag while writing some Nasal script for the Spitfire model: I put this in the spitfireIIa-set.xml file controls engines engine n=0 magneto-switch type=bool1/magneto-switch magneto-switch type=bool1/magneto-switch /engine /engines

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Curtis L. Olson
Vivian Meazza wrote: I have hit a snag while writing some Nasal script for the Spitfire model: I put this in the spitfireIIa-set.xml file controls engines engine n=0 magneto-switch type=bool1/magneto-switch magneto-switch type=bool1/magneto-switch /engine

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Josh Babcock
Curtis L. Olson wrote: Vivian Meazza wrote: I have hit a snag while writing some Nasal script for the Spitfire model: I put this in the spitfireIIa-set.xml file controls enginesengine n=0 magneto-switch type=bool1/magneto-switch magneto-switch

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Curtis L. Olson
Josh Babcock wrote: Curtis L. Olson wrote: Vivian Meazza wrote: I have hit a snag while writing some Nasal script for the Spitfire model: I put this in the spitfireIIa-set.xml file controls enginesengine n=0 magneto-switch type=bool1/magneto-switch magneto-switch

RE: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Vivian Meazza
Curtis L. Olson Josh Babcock wrote: Curtis L. Olson wrote: Vivian Meazza wrote: I have hit a snag while writing some Nasal script for the Spitfire model: I put this in the spitfireIIa-set.xml file controls enginesengine n=0 magneto-switch

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Andy Ross
Vivian Meazza wrote: Curtis L. Olson wrote: Right, but the aircraft I have seen have just one *switch* ... off, both, left, right (and sometimes starter power is rolled in too.) If the physical aircraft has a separate switch for each magneto, then the underlying logic should just change

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Andy Ross
Vivian Meazza wrote: This works: setprop(controls/engines/engine/magneto-switch[0],1); But this doesn't: setprop(controls/engines/engine/magneto-switch[1],1); I can work around it no problem, but I think that it should work. I can see, but can't access ../magneto-switch[1] in the Browse

Re: [Flightgear-devel] Nasal - Question

2004-06-17 Thread David Megginson
Andy Ross wrote: Actually, it might be cleaneast to model the engine control properties as something like: /engines/engine[n]/magneto[0] (boolean) /engines/engine[n]/magneto[1] (boolean) /engines/engine[n]/starter(boolean) And re-write the standard switch binding such that it sets the

RE: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Vivian Meazza
Andy Ross wrote Sent: 17 June 2004 19:36 To: FlightGear developers discussions Subject: Re: [Flightgear-devel] Nasal - Question Vivian Meazza wrote: Curtis L. Olson wrote: Right, but the aircraft I have seen have just one *switch* ... off, both, left, right (and sometimes

RE: [Flightgear-devel] Nasal - Question

2004-06-17 Thread Vivian Meazza
Andy Ross advised Sent: 17 June 2004 19:32 To: FlightGear developers discussions Subject: Re: [Flightgear-devel] Nasal - Question Vivian Meazza wrote: This works: setprop(controls/engines/engine/magneto-switch[0],1); But this doesn't: setprop(controls/engines/engine/magneto

Re: [Flightgear-devel] Nasal in instrument config (was:YASim fuel problem)

2004-04-30 Thread Roy Vegard Ovesen
On Thursday 29 April 2004 23:19, Andy Ross wrote: This is a perfectly legal script, for example: nasal B52F script![CDATA[ myFunction = func { print(Executing myFunction()!); } print(Hello World!\n); ]]/script /B52F /nasal When you start up, it

Re: [Flightgear-devel] Nasal in instrument config

2004-04-30 Thread Andy Ross
Roy Vegard Ovesen wrote: I tried this inside an instrument config file, but it didn't work. It doesn't. The nasal code is read only from under the /nasal/* subtree of the global properties. Instruments live farther down. Would it be possible to implement the ability to include nasal code in

Re: [Flightgear-devel] nasal bug in keyboard binding

2004-03-24 Thread Andy Ross
Jim Wilson wrote: The nasal script doesn't work on the keyboard binding for the c key (99). I can't see any problem, and there apparently are not any useful debugging methods for nasal scripts Have you tried print? It goes out via the standard SG_LOG channel as an alert. It's true that

Re: [Flightgear-devel] nasal bug in keyboard binding

2004-03-24 Thread Andy Ross
Andy Ross wrote: Jim Wilson wrote: if (property) { } Does not work if the property type is undefined. I'm a little confused. Is property completely unset (which should cause a symbol lookup failure), or does if have a value of nil (which should have a boolean value of false)? Never

Re: [Flightgear-devel] nasal bug in keyboard binding

2004-03-24 Thread Jim Wilson
Andy Ross said: Jim Wilson wrote: The nasal script doesn't work on the keyboard binding for the c key (99). I can't see any problem, and there apparently are not any useful debugging methods for nasal scripts Have you tried print? It goes out via the standard SG_LOG channel as an

[Flightgear-devel] nasal question

2004-03-14 Thread David Culp
I want the 737's heading bug to be set to the aircraft's current magnetic heading at startup. I put a nasal script in 737-jsbsim-set.xml like this: nasal SetHeadingBug script setprop(/autopilot/settings/heading-bug-deg, getprop(/orientation/heading-magnetic-deg)); /script

Re: [Flightgear-devel] nasal question

2004-03-14 Thread Andy Ross
David Culp wrote: The problem is that the script is executed while the aircraft's heading is still zero, prior to it being oriented with the runway. Is there a way to have the script execute only after the aircraft is aligned with the runway? As an immediate hack, you can set it up to run

Re: [Flightgear-devel] nasal question

2004-03-14 Thread David Culp
settimer(func { setprop(SRCPROP, getprop(DSTPROP)) }, DELAY); Thanks Andy, six seconds works well for me, which seems like a lot. I wonder how much variation there is among users. It would be nice if we had a standard nasal script, init-complete.nas, that is called after everything else

Re: [Flightgear-devel] Nasal Sockets...

2004-03-12 Thread Andy Ross
Gene Buckle wrote: Andy, is it possible to make socket calls within a Nasal script? If not, how hard would it be to add that kind of ability? Right now, you can only talk to the rest of FlightGear through the properties tree. Adding the socket stuff probably wouldn't be hard at all; what do

Re: [Flightgear-devel] Nasal Sockets...

2004-03-12 Thread Gene Buckle
Gene Buckle wrote: Andy, is it possible to make socket calls within a Nasal script? If not, how hard would it be to add that kind of ability? Right now, you can only talk to the rest of FlightGear through the properties tree. Adding the socket stuff probably wouldn't be hard at all;

[Flightgear-devel] Nasal question

2004-02-10 Thread Josh Babcock
Is there a way to assign an instantaneous joystick button, but not have the value jump directly from one value to another? Currently I have the following code in my joystick file but it results in the brakes snapping on and off. I wanted to get a smoother transition to be more realistic in

Re: [Flightgear-devel] Nasal question

2004-02-10 Thread Andy Ross
Josh Babcock wrote: I tried propertySlew() but it seems that the value wasn't going to the numbers I supplied, but only slewing for a very short period of time taht wasn't even consistant. You need to mark the bindings repeatable. See the trim bindings for examples. The propertySlew()

Re: [Flightgear-devel] Nasal question

2004-02-10 Thread Josh Babcock
Andy Ross wrote: SNIP You need to mark the bindings repeatable. See the trim bindings for examples. Whoops. Typo, or cut-and-past-o I guess. That's what you get for coding with the flu I. Now the brakes go on like I want, but I have the same problem with them coming off. Apparently

Re: [Flightgear-devel] Nasal question

2004-02-10 Thread Josh Babcock
Never mind. I just remembered interpolate. This works perfectly. Josh button n=1 descLeft Brake/desc repeatable type=booltrue/repeatable binding commandnasal/command scriptinterpolate(/controls/gear/brake-left, props.globals.getNode(/controls/gear/brake-left).getValue(), 0, 1, 0.1)/script

Re: [Flightgear-devel] Nasal question

2004-02-10 Thread Andy Ross
Some quick suggestions: You wrote: interpolate(/controls/gear/brake-left, props.globals.getNode(/controls/gear/brake-left).getValue(), 0, 1, 0.1) Actually, the implementation of interpolate() always starts from the current value of a property, so in fact there's no

[Flightgear-devel] Nasal/Saitek X45

2003-12-23 Thread Andy Ross
I just commited Nasal bindings for my Saitek X45. I'll get to the rest soon, but this one is there as a working example if anyone wants to try porting the bindings for their own stick. It should be mostly self-explanatory. Andy ___ Flightgear-devel

Re: [Flightgear-devel] Nasal/Saitek X45

2003-12-23 Thread Jon Stockill
On Tue, 23 Dec 2003, Andy Ross wrote: I just commited Nasal bindings for my Saitek X45. I'll get to the rest soon, but this one is there as a working example if anyone wants to try porting the bindings for their own stick. It should be mostly self-explanatory. I'd love to add another

[Flightgear-devel] Nasal control bindings

2003-12-22 Thread Andy Ross
I finally found the Nasal memory corruption bug this morning. I was right that it was triggered by garbage collection, but it wasn't in the Nasal code. The FGBinding implementation was holding a SGPropertyNode* and assuming that its callees would never try to use the SGPropertyNode_ptr interface

[Flightgear-devel] Nasal code/continuous loop

2003-12-22 Thread Erik Hofman
Andy, What method would you recommend for a script that basically has to run forever. What I'm trying to do is add continuous motion to the sailship by interpolating between +10 and -10 degrees pitch, but I haven't found a clue on how to do this with Nasal. Any ideas? Erik

Re: [Flightgear-devel] Nasal code/continuous loop

2003-12-22 Thread Erik Hofman
Andy Ross wrote: Erik Hofman wrote: What method would you recommend for a script that basically has to run forever. What I'm trying to do is add continuous motion to the sailship by interpolating between +10 and -10 degrees pitch, but I haven't found a clue on how to do this with Nasal.

Re: [Flightgear-devel] Nasal code/continuous loop

2003-12-22 Thread Andy Ross
Erik Hofman wrote: I tried this with a linear interpolation table but I think a problem right now is the fact that the timer is frame rate dependent. And since I'm running at a frame rate of about 5 frames per second this can be a problem. The interpolator is realtime (er, simtime) based;

[Flightgear-devel] Nasal again

2003-11-30 Thread Andy Ross
Another update is available at: http://www.plausible.org/andy/fg-nasal-1.5.tar.gz This contains all the new features from yesterday, plus the ability to load code from the /nasal subtree of the global properties at initialization time. Basically, you can now do: nasal c172

[Flightgear-devel] Nasal integration docs

2003-11-25 Thread Andy Ross
I promised Curt earlier today that I would write up some integration documentation for Nasal. There is a draft available at: http://www.plausible.org/andy/fg-nasal.html This isn't documentation for the language itself. That requirement is covered (albeit poorly) by some pages and sample code

[Flightgear-devel] Nasal integration

2003-11-17 Thread Andy Ross
OK, I had some time over the weekend to carry out my threat of hacking the Nasal interpreter into FlightGear. So now we have another language to flame about. :) http://www.plausible.org/andy/fg-nasal-1.0.tar.gz [This touches SimGear, FlightGear and the base package, so you'll see

RE: [Flightgear-devel] Nasal integration

2003-11-17 Thread Jon Berndt
I just want to know: why nasal? :-) ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Re: [Flightgear-devel] Nasal integration

2003-11-17 Thread Andy Ross
Jon S. Bertdt wrote: I just want to know: why nasal? Because, sir, I am a marketing genius. :) Actually, it start out life as Nasl, which was an acronym for Not Another Scripting Language. There wasn't much purpose behind that name either, but it was reasonably descriptive. And similar

RE: [Flightgear-devel] Nasal integration

2003-11-17 Thread Jon Berndt
Jon S. Berndt wrote: I just want to know: why nasal? Like I said. I don't have a clue. Andy nasal ... Sounds like it might have something to do with the space program ... ;-) ___ Flightgear-devel mailing list [EMAIL PROTECTED]