/** * 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; }
/** * 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; }
/** * Set the PWM value directly to the hardware. * * Write a raw value to a PWM channel. * * @param slot The slot the digital module is plugged into * @param channel The PWM channel connected to this speed controller * @param value Raw PWM value. Range 0 - 255. */ void SetJaguarRaw(UINT32 slot, UINT32 channel, UINT8 value) { Jaguar *jaguar = (Jaguar *) AllocatePWM(slot, channel, CreateJaguarStatic); if (jaguar) jaguar->SetRaw(value); }
/** * Set the PWM value directly to the hardware. * * Write a raw value to a PWM channel. * * @param channel The PWM channel connected to this speed controller * @param value Raw PWM value. Range 0 - 255. */ void SetJaguarRaw(UINT32 channel, UINT8 value) { Jaguar *jaguar = (Jaguar *) AllocatePWM(SensorBase::GetDefaultDigitalModule(), channel, CreateJaguarStatic); if (jaguar) jaguar->SetRaw(value); }
/** * Set the PWM value. * * The PWM value is set using a range of -1.0 to 1.0, appropriately * scaling the value for the FPGA. * * @param channel The PWM channel connected to this speed controller * @param speed The speed value between -1.0 and 1.0 to set. */ void SetJaguarSpeed(UINT32 channel, float speed) { Jaguar *jaguar = (Jaguar *) AllocatePWM(SensorBase::GetDefaultDigitalModule(), channel, CreateJaguarStatic); if (jaguar) jaguar->Set(speed); }
/** * Set the PWM value. * * The PWM value is set using a range of -1.0 to 1.0, appropriately * scaling the value for the FPGA. * * @param slot The slot the digital module is plugged into * @param channel The PWM channel connected to this speed controller * @param speed The speed value between -1.0 and 1.0 to set. */ void SetJaguarSpeed(UINT32 slot, UINT32 channel, float speed) { Jaguar *jaguar = (Jaguar *) AllocatePWM(slot, channel, CreateJaguarStatic); if (jaguar) jaguar->Set(speed); }
/** * Free the underlying Jaguar object. * Free the underlying object and free the associated resources. * * @param slot The slot the digital module is plugged into * @param channel The PWM channel connected to this speed controller */ void DeleteJaguar(UINT32 slot, UINT32 channel) { Jaguar *jaguar = (Jaguar *) AllocatePWM(slot, channel, CreateJaguarStatic); DeletePWM(slot, channel); delete jaguar; }
/** * Set the PWM value directly to the hardware. * * Write a raw value to a PWM channel. * * @param slot The slot the digital module is plugged into * @param channel The PWM channel used for this Victor * @param value Raw PWM value. Range 0 - 255. */ void SetVictorRaw(UINT32 slot, UINT32 channel, UINT8 value) { Victor *victor = (Victor *) AllocatePWM(slot, channel, CreateVictorStatic); if (victor) victor->SetRaw(value); }
/** * Set the PWM value. * * The PWM value is set using a range of -1.0 to 1.0, appropriately * scaling the value for the FPGA. * * @param channel The PWM channel used for this Victor * @param speed The speed value between -1.0 and 1.0 to set. */ void SetVictorSpeed(UINT32 channel, float speed) { Victor *victor = (Victor *) AllocatePWM(channel, CreateVictorStatic); if (victor) victor->Set(speed); }
/** * Delete resources for a Victor * Free the underlying object and delete the allocated resources for the Victor * * @param slot The slot the digital module is plugged into * @param channel The PWM channel used for this Victor */ void DeleteVictor(UINT32 slot, UINT32 channel) { Victor *victor = (Victor *) AllocatePWM(slot, channel, CreateVictorStatic); delete victor; DeletePWM(slot, channel); }