- #1
Lancelot59
- 646
- 1
This is once again for my robot. My current issue is with a define command:
I have the following function defined in motor_control.c:
The throttle value controls speed, trim offsets the speed variable. Although it probably will be eliminated.
Anyhow, I have throttle defined in a header called system_config.h:
The value for "fast" has been enumerated in the header for motor_control.c
I have included the system_config.h file in the motor_control.c library, so what can't I see it? As far as I'm aware it should be able to see that defined value.
I have the following function defined in motor_control.c:
Code:
//*****************************************************************************
//Motor Control Functions
//*****************************************************************************
void forward(void) //Go striaght forward
{
motorR(THROTTLE,TRIM);
motorL(THROTTLE,TRIM);
}
Anyhow, I have throttle defined in a header called system_config.h:
Code:
#define THROTTLE = fast //Default forward throttle value to use
The value for "fast" has been enumerated in the header for motor_control.c
I have included the system_config.h file in the motor_control.c library, so what can't I see it? As far as I'm aware it should be able to see that defined value.