OCCRA
Go to Post So please, think twice before you click that little button that says "reply". - Ken Leung [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-15-2008, 10:38 PM
aeasson aeasson is offline
Registered User
FRC #2435
 
Join Date: Jan 2008
Location: Lawton, ok
Posts: 29
aeasson is an unknown quantity at this point
EasyC Copy & Paste

If a function is written within EasyC using the drag & drop coding blocks. Is there any way to copy the code within that function to another function so that you can modify it for a slightly different use? Or can you copy the whole function and give it a different name?
Reply With Quote
  #2   Spotlight this post!  
Unread 01-16-2008, 10:41 AM
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 858
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: EasyC Copy & Paste

You can do both.

1.) Right click on your function can click copy function easyC will ask for a new function name.

2.) You can copy multiple blocks using shift / control just like any other windows app
__________________
Intelitek Support

[BFIRST Team 146 Blue Lightning - Alumni[/b]
FIRST Team 40 Checkmate
Reply With Quote
  #3   Spotlight this post!  
Unread 01-16-2008, 12:57 PM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
None #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 666
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Send a message via AIM to Chris_Elston Send a message via Yahoo to Chris_Elston
Re: EasyC Copy & Paste

How about this.

Three programmers. Each with is own copy of EasyC. Each programmer working on a Function, and one MASTER CODE.

Can we copy and paste a function from programmer #1 EasyC file to the MASTER CODE EasyC file?

We tried running two instances of EasyC on the same laptop, and copy between the two applications, but that does not work....

We have "teams" of programmers and it's hard to share with each other, with out recoding the entire function in the MASTER COPY...
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
Reply With Quote
  #4   Spotlight this post!  
Unread 01-22-2008, 11:52 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 7,916
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Send a message via AIM to Alan Anderson
Re: EasyC Copy & Paste

Quote:
Originally Posted by Chris_Elston View Post
Can we copy and paste a function from programmer #1 EasyC file to the MASTER CODE EasyC file?
I don't have a copy of the software handy at the moment, so forgive any minor inaccuracies in what I'm about to say.

When you right-click on the user functions, you get two options. One is to make a new function. The other is to copy an existing function from another project. I think that does what you want.

(You apparently can't copy the Initialize or Autonomous or OperatorControl functions, but a bit of creative copy & paste in both the source and target projects can work around that restriction.)
Reply With Quote
  #5   Spotlight this post!  
Unread 01-24-2008, 09:21 AM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
None #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 666
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Send a message via AIM to Chris_Elston Send a message via Yahoo to Chris_Elston
Re: EasyC Copy & Paste

Quote:
Originally Posted by Alan Anderson View Post
When you right-click on the user functions, you get two options. One is to make a new function. The other is to copy an existing function from another project. I think that does what you want.
Why didn't I ever notice that before...that will work for what I am doing. It does not import variables...that's a good thing and a bad thing, but I'll take it! Saves alot of time reconstructing the EasyC Blocks.

I see that if somehow I export a function in another project as a library file, I can then attach with it, macros, variables, and code. That might be the way to go to move massive amounts of functions around from team member to team member.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
Reply With Quote
  #6   Spotlight this post!  
Unread 01-24-2008, 03:10 PM
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 858
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: EasyC Copy & Paste

If you save a project as a library it will import variables.
__________________
Intelitek Support

[BFIRST Team 146 Blue Lightning - Alumni[/b]
FIRST Team 40 Checkmate
Reply With Quote
  #7   Spotlight this post!  
Unread 01-24-2008, 04:48 PM
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Re: EasyC Copy & Paste

You could use the approach we are using this year. We have a total of 6 programmers each working on their own seperate parts of the code. To get around this, we have a "master program" which is just made up of seperate functions (in operator control, two functions are used, operator drive and operator arm for ex.) Each person works on their own seperate function, ex, I work on operator arm. I make any variables I use local variables, and when we import the function into the master code, outside of rewriting a couple of constants under the global category, it is pretty much copy and play.
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid



Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Vista/EasyC & EasyC Pro rswsmay Programming 1 04-25-2007 10:47 AM
Copy and Paste Rules Yan Wang Rules/Strategy 2 01-13-2006 04:04 PM
pic: #1213 Undo Copy Paste CD47-Bot Robot Showcase 1 02-14-2004 06:37 PM


All times are GMT -5. The time now is 04:38 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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