![]() |
New script system
I'm working on a new scripting framework (inspired by the premise of the navigation code of yesteryear, but implemented radically differently). I've completed basic coding but have not had the chance to test it on real hardware (I'm working on getting real hardware).
What I'm wondering is how many people would be interested in helping me test it before I release it? I plan on releasing it as freely (open source) as allowed. "scripting" is a bit of a mis-nomer. It's created in such a way as to allow a mixture of C and script. It (hopefully) addresses some of the issues of the navigation code (esp. when you have multiple scripts loaded at once). Instead of having to iterate through an array and read the data (which has two setbacks: indirect referencing and preventing certain optimizations), it creates function calls. How is this implemented? Preprocessor voodoo. ;) Here is an example command: Code:
COMMAND cmd_wait(dTIME time)Code:
SCRIPT example_script() { |
Re: New script system
Wow... that's a pretty nice. :D I would offer to help, but we unfortunately don't have quadrature encoders on our robot right now. (I'm assuming you need 'em. Do you?)
|
Re: New script system
Quote:
I've tried to make it as open-ended as possible, so you don't have to use my encoder/gyro implementation. The easiest way to insert your code is to add hooks in script_every_cycle(), and have your routines update my variables. I will, however, probably include Kevin's gyro/encoder code as a default implementation. (If I can clear it with him, that is.) |
Re: New script system
I've now got full implementation using Kevin's gyro and encoder code (unmodified). I still have not had the opportunity to test or debug this code.
You can grab the code from my site (1.32MB). I used Eclipse to create this from the beginning, so no MPLAB project is included. (Although some of us may consider that a good thing...) |
| All times are GMT -5. The time now is 04:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi