Error, Insufficient contextual Information to determine type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jpa5108
    New Member
    • Aug 2013
    • 1

    #1

    Error, Insufficient contextual Information to determine type

    I am very new at programming in C++ but I have part of a class that checks to make sure there is a fault that lasts for 60 seconds. The code below is written several times throughout the class for different subsystems dealing with overcurrent.

    Code:
    	// Over Current
    	if (UUV->getCTaps(MOTORCURRPOS_1) > 1.4*UUV->getcurrMode.getMotor().Peak) // The fault
    	{ 
    		if (motor1Timer == NULL)
    			motor1Timer = time(&timer);
    		else if ( time(&timer) - motor1Timer >= 60)
    			motor1Over = true;
    	} 
    	else
    		motor1Timer = NULL;

    The timing statement is okay because it works on all of the other fault checkers. It is the if statement that is causing the error I just do not know why.
    Last edited by Rabbit; Aug 16 '13, 03:57 PM. Reason: Please use code tags when posting code.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    What is UUV->getcurrMode.ge tMotor().Peak ?

    You need the UUV->getcurrMode object in order to call
    getMotor() on it. Ooh this looks odd.

    Did you mean UUV->getcurrMode(). getMotor().Peak ?

    Comment

    Working...