Go to Post amazing stuff. - Specialagentjim [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 03-11-2011, 07:01 PM
willson.thomas willson.thomas is offline
Registered User
FRC #1595
 
Join Date: Feb 2008
Location: Spokane, WA
Posts: 50
willson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nice
Question Task FUNCPTR Issue

I am having trouble defining a task. The code and compiler errors are below. If anyone knows what I'm doing wrong, help would be greatly appreciated!

Error:
Code:
C:/windriver/workspace/2011CompetitionCode/Arm.cpp:132: error: argument of type `int (LogomotionArm::)(LogomotionArm::ArmInitArgs*)' does not match `int (*)(...)'
Function Definition:
Code:
int InitialiseArm(ArmInitArgs *argsPTR)
	{
		while (argsPTR->armJagTask->GetForwardLimitOK())
		{
			argsPTR->armJagTask->Set(1);
			Wait(0.01);
		}
		argsPTR->armJagTask->Set(0);
		argsPTR->armPositionTask->Reset();
		argsPTR->isInitialisingTask=false;
		argsPTR->isInitialisedTask=true;
		return (int)0;
	}
Task Initialisation:
Code:
Task armInit("ArmInit",(FUNCPTR)(InitialiseArm));
		armInit.Start((INT32)(&initArgs));
Thanks!
__________________
Team Leader
Team 1595
Reply With Quote
 


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


All times are GMT -5. The time now is 10:03 AM.

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


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