示例#1
0
/**
 * Get the PWM value directly from the hardware.
 *
 * Read a raw value from a PWM channel.
 *
 * @param channel The PWM channel connected to this speed controller
 * @return Raw PWM control value.  Range: 0 - 255.
 */
UINT8 GetJaguarRaw(UINT32 channel)
{
	Jaguar *jaguar = (Jaguar *) AllocatePWM(SensorBase::GetDefaultDigitalModule(), channel, CreateJaguarStatic);
	if (jaguar)
		return jaguar->GetRaw();
	else
		return 0;
}
示例#2
0
/**
 * Get the PWM value directly from the hardware.
 *
 * Read a raw value from a PWM channel.
 *
 * @param slot The slot the digital module is plugged into
 * @param channel The PWM channel connected to this speed controller
 * @return Raw PWM control value.  Range: 0 - 255.
 */
UINT8 GetJaguarRaw(UINT32 slot, UINT32 channel)
{
	Jaguar *jaguar = (Jaguar *) AllocatePWM(slot, channel, CreateJaguarStatic);
	if (jaguar)
		return jaguar->GetRaw();
	else
		return 0;
}