Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   If you could write the default code... (http://www.chiefdelphi.com/forums/showthread.php?t=38812)

jdong 03-08-2005 18:18

Re: If you could write the default code...
 
I did some RTOS research with the PIC18 chipset last year, and concluded that it wasn't feasible; by the time the RTOS is on the chip, there's little/no resources for the actual code.

I've actually gone to the extreme and am experimenting with a Linux coprocessor setup via serial, using Kevin Watson's wonderful serial_ports code! It's working pretty successfully, and (if done correctly) is in full compliance with the 2004 and 2005 FIRST rules, so presumably the new rules, too, as long as we don't get a cease-and-desist for our work!

http://adambots.gotdns.com/cgi-bin/v...rceCoProcessor

Hutch 04-08-2005 01:52

Re: If you could write the default code...
 
The question I guess I have to ask is (and this is more directed at the content of the site than the actual idea), is that necessary? I mean it's cool and I like the idea, don't get me wrong. And I was the one defending shifting in drive trains, even though it's not necessary... But still, I think you kind of reach a point where you have to ask yourself, just how much processing power do you need? I mean, for most people, all their code does is map joysticks to motors (well ok, a little more than that but still). And if it really bothers you that much to write something in C, well maybe programming isn't for you :p.

I guess I just think it's kind of nice to program in a somewhat limitted environment because it makes it more challenging and fun.

EDIT: And this isn't just directed at you... I see a lot of people working on coprocessor projects and kind of wonder about it - no one seems to really use the power once they have it.

Kyle T 04-08-2005 02:31

Re: If you could write the default code...
 
Quote:

Originally Posted by Joe Ross
It's a bad idea to modify ifi_aliases.h. If IFI ever releases a new version of the default code with a new ifi_aliases.h, you'll have to redo all your changes which leads to errors and extra work. It's also almost impossible to pass your code on to the next set of programmers.

Instead, you should create a new file, perhaps "kyles_aliases.h" and add everything you want there.

If I want to add to the end of it, it's just a quick copy and paste; it's almost as simple as typing in include 'user_aliases.h';.

Speaking of which, I think any upgrades to the code should come in some kind of format (interpreted by the IDE, of course) which checks to see if the old blocks they replace are still intact and then and only then replacing them with the new ones. Having to re-insert all kinds of new sections of code in the event of an update is a real pain, and updates are sometimes neccessary.

Hutch 04-08-2005 10:41

Re: If you could write the default code...
 
To solve the problem of that, I ended up with a file, user_nav.c, and it's header - I would include the header and call four functions in it (autoInit, autoDrive, userInit, userDrive or soemthing to that effect) and the calls to those four things were the only things I would ever have to change if all of the IFI code completely changed.


All times are GMT -5. The time now is 21:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi