third_party/phoenixsuite/cpp/src/CANifier.cpp
/**
 * Sets the LED Output
 * @param percentOutput Output duty cycle expressed as percentage.
 * @param ledChannel 		Channel to set the output of.
 * @return Error Code generated by function. 0 indicates no error.
 */
Sets the LED Output
@param percentOutput Output duty cycle expressed as percentage.
@param ledChannel            Channel to set the output of.
@return Error Code generated by function. 0 indicates no error.
Sets the LED Output @param percentOutput Output duty cycle expressed as percentage . @param ledChannel Channel to set the output of . @return Error Code generated by function . 0 indicates no error .
ErrorCode CANifier::SetLEDOutput(double percentOutput, LEDChannel ledChannel) {
	if (percentOutput > 1) {
		percentOutput = 1;
	}
	if (percentOutput < 0) {
		percentOutput = 0;
	}
	int dutyCycle = (int) (percentOutput * 1023); 
	return c_CANifier_SetLEDOutput(m_handle, dutyCycle, ledChannel);
}
ErrorCode CANifier :: SetLEDOutput ( double percentOutput , LEDChannel ledChannel ) { if ( percentOutput > 1 ) { percentOutput = 1 ; } if ( percentOutput < 0 ) { percentOutput = 0 ; } int dutyCycle = ( int ) ( percentOutput * 1023 ) ; return c_CANifier_SetLEDOutput ( m_handle , dutyCycle , ledChannel ) ; }
Sets the LED Output
 @param percentOutput Output duty cycle expressed as percentage.
Sets the LED Output @param percentOutput Output duty cycle expressed as percentage .
/* convert float to integral fixed pt */ // [0,1023]