Module: Toybox::Attention
The Tone module allows for making pre-defined sounds. Not all devices support this API.
- Since : 1.0.0
- App Types : Widget,App
Defined Under Namespace
Classes: VibeProfile
Constant Summary
Supported Devices :All except vivoactive
- TONE_KEY = 0 : Indicates that a key was pressed. Since : 1.0.0
- TONE_START = 1 : Indicates that an activity has started. Since : 1.0.0
- TONE_STOP = 2 : Indicates that an acitivty has stopped. Since : 1.0.0
- TONE_MSG = 3 : Indicates that a message is available. Since : 1.0.0
- TONE_ALERT_HI = 4 : An alert ending with a high note. Since : 1.0.0
- TONE_ALERT_LO = 5 : An alert ending with a low note. Since : 1.0.0
- TONE_LOUD_BEEP = 6 : A loud beep. Since : 1.0.0
- TONE_INTERVAL_ALERT = 7 : Indicates a change in interval. Since : 1.0.0
- TONE_ALARM = 8 : Indicates an alarm has triggered. Since : 1.0.0
- TONE_RESET = 9 : Indicates that the activity was reset. Since : 1.0.0
- TONE_LAP = 10 : Indicates that the user has completed a lap. Since : 1.0.0
- TONE_CANARY = 11 : An annoying sound to get the users attention. Since : 1.0.0
- TONE_TIME_ALERT = 12 : An alert that a time threshold has been met. Since : 1.0.0
- TONE_DISTANCE_ALERT = 13 : An alert that a distance threshold has been met. Since : 1.0.0
- TONE_FAILURE = 14 : Indicates that the activity was a failure. Since : 1.0.0
- TONE_SUCCESS = 15 : Indicates that the activity was a success. Since : 1.0.0
- TONE_POWER = 16 : The power on tone. Since : 1.0.0
- TONE_LOW_BATTERY = 17 : Indicates that the device has low battery power. Since : 1.0.0
- TONE_ERROR = 18 : Indicates an error occurred. Since : 1.0.0
関数(要約)
- (Object) backlight(onOff) : バックライトを点灯/消灯する
- (Object) playTone(tone) : ビープ音を鳴らす
- (Object) vibrate(vibe) : Use the vibe motor.
関数(詳細)
(Object) backlight(onOff) : バックライトを点灯/消灯する
- Parameters
- onOff (Boolean) : true to turn on backlight, false otherwise.
- Since : 1.0.0
- Supported Devices : All devices
(Object) playTone(tone) : ビープ音を鳴らす
- Parameters
- tone : TONE_XXX value to play
- Since :1.0.0
- Supported Devices : All except vivoactive
(Object) vibrate(vibe) : Use the vibe motor
- Parameters
- vibe (Array) : Array of VibeProfile objects to play in sequence. Maximum of 8 supported.
- Since : 1.0.0
- Supported Devices : All non-Edge devices
最終更新:2016年03月02日 23:46