Sign up for our newsletter! 
Home News Products Downloads Forum Distributors Store Contact Us
PPE User Forum
May 24, 2013, 04:01:32 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Link to Commands Available  (Read 9532 times)
0 Members and 1 Guest are viewing this topic.
jstruts
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: December 13, 2006, 02:03:40 pm »

BrianP,

Is there any available documentation on the web that you might have that could explain some of the available resources in the API?
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #1 on: December 18, 2006, 03:22:16 pm »

We are still working on the documentation. It should be ready any day now. I'll post up and let you know when we get it online.
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #2 on: January 22, 2007, 04:04:52 pm »

Sorry for the delays. The new PCMSCAN v2.1 software includes the documentation for the script API. It is accessible under the Help menu.
Logged
jdtrites
Newbie
*
Offline Offline

Posts: 22


View Profile
« Reply #3 on: October 11, 2007, 05:21:34 pm »

Brian, is there a lexicon available?  Given that this is not running in a browser, I am assuming that not all over javascript i implemented.
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #4 on: October 12, 2007, 10:52:19 am »

Unfortunately, there isn't a lexicon available currently. But perhaps it would be a good idea to start one. You are right that not all features of Javascript (as available in a web browser) are available in our scan tool software. However, any features that are core to the Javascript language should be available. That does include enhanced types like array's, etc.

I could start a new sticky thread for the lexicon, and add all the things I know are available. If I've forgotten anything, or if you have any questions about something, just post in that thread to ask if that feature is available. How does that sound?
Logged
jdtrites
Newbie
*
Offline Offline

Posts: 22


View Profile
« Reply #5 on: October 14, 2007, 02:16:11 pm »

That would be awesome Brian
Logged
jdtrites
Newbie
*
Offline Offline

Posts: 22


View Profile
« Reply #6 on: October 15, 2007, 04:26:56 pm »

Brian,

Does the javascript implementation have an event detection function like GetKey(KeyCode)?

Thanks,

John
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #7 on: October 15, 2007, 09:44:29 pm »

Does the javascript implementation have an event detection function like GetKey(KeyCode)?

No, it does not. What would this be used for? Can you describe the use case/scenario?


BTW - I have started work on the lexicon. See here.
Logged
jdtrites
Newbie
*
Offline Offline

Posts: 22


View Profile
« Reply #8 on: October 16, 2007, 10:53:41 am »

What I have found is that the scripts don't generally reset unless you exit and restart the software.  Even if you disconnect and define another log file, all of the script variables, gauge values (average, min, max) remain.  What would be handy is the ability to reset whatever variable you want in a script; like a counter or something.  It would be really handy for testing.  If you screw up an algorithm and it goes unstable, resetting it to see what happens would be useful.

The other thing I have found very rarely, but it has happened, is that when the software launches and you connect, as soon as you start monitoring something goes wacky and you get some weird values.  I suspect it is interference of a script PID with an actual one somewhere along the way.  An example of one that happened to me was the RPM was showing more than 10,000 and the MAF was showing 1g/sec while the car was at idle.  I disconnected and reconnected and everything was fine.

Because I have a very small form-factor laptop for use in the car, doing a disconnect, reconnect, then set it to monitor, or to restart the software while driving is not a good idea.  However, if I could use a single key (say 'r' key) that would reset everything in the scripts, or a single script, is beneficial.

What I would suggest is creating a software interrupt that could be assigned to a function key not used by the software, and the interrupt buffered for a frame or two.  The scripts have a bunch of parameters on the form (like metric units, english units, script name, etc.)  Perhaps one of the parameters could be 'accepts interrupt (yes/no)'.  The a reserved word like SInterrupt could be reserved such that:

if (SInterrupt)
{   reset whatever you need reset
}

....
more code

If the script does not accept interrupts, then nothing happens since the SInterrupt condition would always be false.


Thanks,

John
« Last Edit: October 16, 2007, 06:17:26 pm by jdtrites » Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #9 on: October 19, 2007, 11:56:09 am »

I will be fixing some of the script issues you've discovered in the next software release. I also think that some of the fixes I've made may also help the "scripts don't generally reset" problem you've described. Please keep an eye out for the next software release and let me know if it solves anything. If not, we can look at other options.
Logged
jdtrites
Newbie
*
Offline Offline

Posts: 22


View Profile
« Reply #10 on: October 19, 2007, 05:35:54 pm »

I appreciate it Sir.

Thanks,

John
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #11 on: January 14, 2008, 12:09:35 pm »

Sorry for the delays with this software release. I have just released a new version of PCMSCAN (v2.4.0) that fixes these script issues. Please download it and give it a try and let me know if you still see any problems.
Logged
Mr Whippy
Newbie
*
Offline Offline

Posts: 18


View Profile
« Reply #12 on: February 22, 2008, 03:46:43 pm »

Just curious, the Lexicon suggests to avoid arrays, but above it is mentioned it may be added functionality.

Are arrays in and working (before I go trying)

Could be really handy to write in map data tables as reference with linear interpolation, and simulate internal ECU values.


Thanks

Dave
Logged
BrianP
Administrator
Hero Member
*****
Offline Offline

Posts: 1314


View Profile
« Reply #13 on: February 23, 2008, 12:09:08 pm »

Hi Dave,

Sorry, the lexicon was worded a little confusingly there. Javascript Arrays are fully supported. The lexicon meant to avoid using the word 'Array' as one of your own variable of function names. Because it is already the name of an existing object type.

Remember - all script variables and data, etc. are wiped out after each execution. If you need to keep state across PID script runs, you need to use the Obdii.PidState.xxx stuff (documented in the script api help for the scan tool).

-Brian
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.124 seconds with 20 queries.
Home | News | Products | Downloads | Forum | Distributors | Store | Contact Us
Copyright © 2012 Palmer Performance Engineering, Inc. All Rights Reserved.