Archived:某些用户定义的震动强度值不被支持
文章信息
兼容于
平台: S60 3rd Edition
文章
翻译:
翻译自: Archived:Some user-defined vibra intensity values are not supported on S60 3rd Edition (Known Issue)
由 hoolee
最后由 hamishwillee
在 16 Aug 2012 编辑
- 详细描述
定义在hwrmvibra.h中的HWRM震动API。提供了控制手机震动的能力。下列方法:
void CHWRMVibra::StartVibraL( TInt aDuration, TInt aIntensity );
允许设置一个用户自定义的震动强度。其中aIntensity定义了震动马达运转强度值。如果设置负值,这时震动马达的运转方向为相反。根据SDK文档描述。强度可以在下列值-100..100之间。超过的话将引起KErrArgument值错误。
此外。震动硬件也设置了一个震动速度最低限制。大多数机器通常为30。试图设置强度低于+/-30将会导致KErrGeneral错误。
- 解决方案
用户定义的强度值应在(+/-)30...100之间。当使用上述方法时客户端还需要处理好下列错误代码:
- KErrNotSupported - Device does not support user-defined vibra intensity values.
- KErrArgument - One of the parameters is out of range.
- KErrAccessDenied - Vibration setting in the user profile is not set.
- KErrBadHandle - Vibra session has been invalidated.
- KErrLocked - Vibra is locked down because too much continuous use or explicitly blocked (e.g. by a vibration-sensitive accessory).
- KErrTimedOut - Timeout occurred in controlling vibra.
- KErrInUse - Vibra is reserved by some other client.
- KErrNoMemory - Memory allocation failure.
- KErrGeneral - Vibra hardware does not support one of the parameters, or other hardware error.


(no comments yet)