updated enum annotation to support patching

This commit is contained in:
Peli de Halleux 2016-03-28 22:16:07 -07:00
parent 715de4dff9
commit 664b841b1c
5 changed files with 96 additions and 96 deletions

View File

@ -1,117 +1,117 @@
enum MesCameraEvent { enum MesCameraEvent {
//% enumval=MES_CAMERA_EVT_TAKE_PHOTO blockId="take photo" //% enumval=MES_CAMERA_EVT_TAKE_PHOTO block="take photo"
TakePhoto, TakePhoto,
//% enumval=MES_CAMERA_EVT_START_VIDEO_CAPTURE blockId="start video capture" //% enumval=MES_CAMERA_EVT_START_VIDEO_CAPTURE block="start video capture"
StartVideoCapture, StartVideoCapture,
//% enumval=MES_CAMERA_EVT_STOP_VIDEO_CAPTURE blockId="stop video capture" //% enumval=MES_CAMERA_EVT_STOP_VIDEO_CAPTURE block="stop video capture"
StopVideoCapture, StopVideoCapture,
//% enumval=MES_CAMERA_EVT_TOGGLE_FRONT_REAR blockId="toggle front-rear" //% enumval=MES_CAMERA_EVT_TOGGLE_FRONT_REAR block="toggle front-rear"
ToggleFrontRear, ToggleFrontRear,
//% enumval=MES_CAMERA_EVT_LAUNCH_PHOTO_MODE blockId="launch photo mode" //% enumval=MES_CAMERA_EVT_LAUNCH_PHOTO_MODE block="launch photo mode"
LaunchPhotoMode, LaunchPhotoMode,
//% enumval=MES_CAMERA_EVT_LAUNCH_VIDEO_MODE blockId="launch video mode" //% enumval=MES_CAMERA_EVT_LAUNCH_VIDEO_MODE block="launch video mode"
LaunchVideoMode, LaunchVideoMode,
//% enumval=MES_CAMERA_EVT_STOP_PHOTO_MODE blockId="stop photo mode" //% enumval=MES_CAMERA_EVT_STOP_PHOTO_MODE block="stop photo mode"
StopPhotoMode, StopPhotoMode,
//% enumval=MES_CAMERA_EVT_STOP_VIDEO_MODE blockId="stop video mode" //% enumval=MES_CAMERA_EVT_STOP_VIDEO_MODE block="stop video mode"
StopVideoMode, StopVideoMode,
} }
enum MesAlertEvent { enum MesAlertEvent {
//% enumval=MES_ALERT_EVT_DISPLAY_TOAST blockId="display toast" //% enumval=MES_ALERT_EVT_DISPLAY_TOAST block="display toast"
DisplayToast, DisplayToast,
//% enumval=MES_ALERT_EVT_VIBRATE blockId="vibrate" //% enumval=MES_ALERT_EVT_VIBRATE block="vibrate"
Vibrate, Vibrate,
//% enumval=MES_ALERT_EVT_PLAY_SOUND blockId="play sound" //% enumval=MES_ALERT_EVT_PLAY_SOUND block="play sound"
PlaySound, PlaySound,
//% enumval=MES_ALERT_EVT_PLAY_RINGTONE blockId="play ring tone" //% enumval=MES_ALERT_EVT_PLAY_RINGTONE block="play ring tone"
PlayRingtone, PlayRingtone,
//% enumval=MES_ALERT_EVT_FIND_MY_PHONE blockId="find my phone" //% enumval=MES_ALERT_EVT_FIND_MY_PHONE block="find my phone"
FindMyPhone, FindMyPhone,
//% enumval=MES_ALERT_EVT_ALARM1 blockId="ring alarm" //% enumval=MES_ALERT_EVT_ALARM1 block="ring alarm"
RingAlarm, RingAlarm,
//% enumval=MES_ALERT_EVT_ALARM2 blockId="ring alarm 2" //% enumval=MES_ALERT_EVT_ALARM2 block="ring alarm 2"
RingAlarm2, RingAlarm2,
//% enumval=MES_ALERT_EVT_ALARM3 blockId="ring alarm 3" //% enumval=MES_ALERT_EVT_ALARM3 block="ring alarm 3"
RingAlarm3, RingAlarm3,
//% enumval=MES_ALERT_EVT_ALARM4 blockId="ring alarm 4" //% enumval=MES_ALERT_EVT_ALARM4 block="ring alarm 4"
RingAlarm4, RingAlarm4,
//% enumval=MES_ALERT_EVT_ALARM5 blockId="ring alarm 5" //% enumval=MES_ALERT_EVT_ALARM5 block="ring alarm 5"
RingAlarm5, RingAlarm5,
//% enumval=MES_ALERT_EVT_ALARM6 blockId="ring alarm 6" //% enumval=MES_ALERT_EVT_ALARM6 block="ring alarm 6"
RingAlarm6, RingAlarm6,
} }
enum MesDeviceInfo { enum MesDeviceInfo {
//% enumval=MES_DEVICE_INCOMING_CALL blockId="incoming call" //% enumval=MES_DEVICE_INCOMING_CALL block="incoming call"
IncomingCall, IncomingCall,
//% enumval=MES_DEVICE_INCOMING_MESSAGE blockId="incoming message" //% enumval=MES_DEVICE_INCOMING_MESSAGE block="incoming message"
IncomingMessage, IncomingMessage,
//% enumval=MES_DEVICE_ORIENTATION_LANDSCAPE blockId="orientation landscape" //% enumval=MES_DEVICE_ORIENTATION_LANDSCAPE block="orientation landscape"
OrientationLandscape, OrientationLandscape,
//% enumval=MES_DEVICE_ORIENTATION_PORTRAIT blockId="orientation portrait" //% enumval=MES_DEVICE_ORIENTATION_PORTRAIT block="orientation portrait"
OrientationPortrait, OrientationPortrait,
//% enumval=MES_DEVICE_GESTURE_DEVICE_SHAKEN blockId="shaken" //% enumval=MES_DEVICE_GESTURE_DEVICE_SHAKEN block="shaken"
Shaken, Shaken,
//% enumval=MES_DEVICE_DISPLAY_OFF blockId="display off" //% enumval=MES_DEVICE_DISPLAY_OFF block="display off"
DisplayOff, DisplayOff,
//% enumval=MES_DEVICE_DISPLAY_ON blockId="display on" //% enumval=MES_DEVICE_DISPLAY_ON block="display on"
DisplayOn, DisplayOn,
} }
enum MesRemoteControlEvent { enum MesRemoteControlEvent {
//% enumval=MES_REMOTE_CONTROL_EVT_PLAY blockId="play" //% enumval=MES_REMOTE_CONTROL_EVT_PLAY block="play"
play, play,
//% enumval=MES_REMOTE_CONTROL_EVT_PAUSE blockId="pause" //% enumval=MES_REMOTE_CONTROL_EVT_PAUSE block="pause"
pause, pause,
//% enumval=MES_REMOTE_CONTROL_EVT_STOP blockId="stop" //% enumval=MES_REMOTE_CONTROL_EVT_STOP block="stop"
stop, stop,
//% enumval=MES_REMOTE_CONTROL_EVT_NEXTTRACK blockId="next track" //% enumval=MES_REMOTE_CONTROL_EVT_NEXTTRACK block="next track"
nextTrack, nextTrack,
//% enumval=MES_REMOTE_CONTROL_EVT_PREVTRACK blockId="previous track" //% enumval=MES_REMOTE_CONTROL_EVT_PREVTRACK block="previous track"
previousTrack, previousTrack,
//% enumval=MES_REMOTE_CONTROL_EVT_FORWARD blockId="forward" //% enumval=MES_REMOTE_CONTROL_EVT_FORWARD block="forward"
forward, forward,
//% enumval=MES_REMOTE_CONTROL_EVT_REWIND blockId="rewind" //% enumval=MES_REMOTE_CONTROL_EVT_REWIND block="rewind"
rewind, rewind,
//% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEUP blockId="volume up" //% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEUP block="volume up"
volumeUp, volumeUp,
//% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEDOWN blockId="volume down" //% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEDOWN block="volume down"
volumeDown, volumeDown,
} }
enum MesDpadButtonInfo { enum MesDpadButtonInfo {
//% enumval=MES_DPAD_BUTTON_A_DOWN blockId="A down" //% enumval=MES_DPAD_BUTTON_A_DOWN block="A down"
ADown, ADown,
//% enumval=MES_DPAD_BUTTON_A_UP blockId="A up" //% enumval=MES_DPAD_BUTTON_A_UP block="A up"
AUp, AUp,
//% enumval=MES_DPAD_BUTTON_B_DOWN blockId="B down" //% enumval=MES_DPAD_BUTTON_B_DOWN block="B down"
BDown, BDown,
//% enumval=MES_DPAD_BUTTON_B_UP blockId="B up" //% enumval=MES_DPAD_BUTTON_B_UP block="B up"
BUp, BUp,
//% enumval=MES_DPAD_BUTTON_C_DOWN blockId="C down" //% enumval=MES_DPAD_BUTTON_C_DOWN block="C down"
CDown, CDown,
//% enumval=MES_DPAD_BUTTON_C_UP blockId="C up" //% enumval=MES_DPAD_BUTTON_C_UP block="C up"
CUp, CUp,
//% enumval=MES_DPAD_BUTTON_D_DOWN blockId="D down" //% enumval=MES_DPAD_BUTTON_D_DOWN block="D down"
DDown, DDown,
//% enumval=MES_DPAD_BUTTON_D_UP blockId="D up" //% enumval=MES_DPAD_BUTTON_D_UP block="D up"
DUp, DUp,
//% enumval=MES_DPAD_BUTTON_1_UP blockId="1 down" //% enumval=MES_DPAD_BUTTON_1_UP block="1 down"
_1Down, _1Down,
//% enumval=MES_DPAD_BUTTON_1_DOWN blockId="1 up" //% enumval=MES_DPAD_BUTTON_1_DOWN block="1 up"
_1Up, _1Up,
//% enumval=MES_DPAD_BUTTON_2_DOWN blockId="2 down" //% enumval=MES_DPAD_BUTTON_2_DOWN block="2 down"
_2Down, _2Down,
//% enumval=MES_DPAD_BUTTON_2_UP blockId="2 up" //% enumval=MES_DPAD_BUTTON_2_UP block="2 up"
_2Up, _2Up,
//% enumval=MES_DPAD_BUTTON_3_DOWN blockId="3 down" //% enumval=MES_DPAD_BUTTON_3_DOWN block="3 down"
_3Down, _3Down,
//% enumval=MES_DPAD_BUTTON_3_UP blockId="3 up" //% enumval=MES_DPAD_BUTTON_3_UP block="3 up"
_3Up, _3Up,
//% enumval=MES_DPAD_BUTTON_4_DOWN blockId="4 down" //% enumval=MES_DPAD_BUTTON_4_DOWN block="4 down"
_4Down, _4Down,
//% enumval=MES_DPAD_BUTTON_4_UP blockId="4 up" //% enumval=MES_DPAD_BUTTON_4_UP block="4 up"
_4Up, _4Up,
} }

View File

@ -1,20 +1,20 @@
enum Direction { enum Direction {
//% blockId=right //% block=right
Right, Right,
//% blockId=left //% block=left
Left Left
} }
enum LedSpriteProperty { enum LedSpriteProperty {
//% blockId=x //% block=x
X, X,
//% blockId=y //% block=y
Y, Y,
//% blockId=direction //% block=direction
Direction, Direction,
//% blockId=brightness //% block=brightness
Brightness, Brightness,
//% blockId=blink //% block=blink
Blink Blink
} }

View File

@ -4,25 +4,25 @@ enum Button {
//% enumval=MICROBIT_ID_BUTTON_B //% enumval=MICROBIT_ID_BUTTON_B
B, B,
//% enumval=MICROBIT_ID_BUTTON_AB //% enumval=MICROBIT_ID_BUTTON_AB
//% blockId="A+B" block="A+B" //% block="A+B"
AB, AB,
} }
enum Dimension { enum Dimension {
//% enumval=0 blockId=x //% enumval=0 block=x
X, X,
//% enumval=1 blockId=y //% enumval=1 block=y
Y, Y,
//% enumval=2 blockId=z //% enumval=2 block=z
Z, Z,
//% enumval=3 blockId=strength //% enumval=3 block=strength
Strength, Strength,
} }
enum Rotation { enum Rotation {
//% enumval=0 blockId=pitch //% enumval=0 block=pitch
Pitch, Pitch,
//% enumval=1 blockId=roll //% enumval=1 block=roll
Roll, Roll,
} }
@ -39,22 +39,22 @@ enum AcceleratorRange {
/** /**
* The accelerator measures forces up to 1 gravity * The accelerator measures forces up to 1 gravity
*/ */
//% blockId="1g" enumval=1 //% block="1g" enumval=1
OneG, OneG,
/** /**
* The accelerator measures forces up to 2 gravity * The accelerator measures forces up to 2 gravity
*/ */
//% blockId="2g" enumval=2 //% block="2g" enumval=2
TwoG, TwoG,
/** /**
* The accelerator measures forces up to 4 gravity * The accelerator measures forces up to 4 gravity
*/ */
//% blockId="4g" enumval=4 //% block="4g" enumval=4
FourG, FourG,
/** /**
* The accelerator measures forces up to 8 gravity * The accelerator measures forces up to 8 gravity
*/ */
//% blockId="8g" enumval=8 //% block="8g" enumval=8
EightG EightG
} }
@ -80,42 +80,42 @@ enum Gesture {
/** /**
* Raised when shaken * Raised when shaken
*/ */
//% blockId=shake enumval=11 //% block=shake enumval=11
Shake, Shake,
/** /**
* Raised when the logo is upward and the screen is vertical * Raised when the logo is upward and the screen is vertical
*/ */
//% blockId="logo up" enumval=1 //% block="logo up" enumval=1
LogoUp, LogoUp,
/** /**
* Raised when the logo is downward and the screen is vertical * Raised when the logo is downward and the screen is vertical
*/ */
//% blockId="logo down" enumval=2 //% block="logo down" enumval=2
LogoDown, LogoDown,
/** /**
* Raised when the screen is pointing down and the board is horizontal * Raised when the screen is pointing down and the board is horizontal
*/ */
//% blockId="screen up" enumval=5 //% block="screen up" enumval=5
ScreenUp, ScreenUp,
/** /**
* Raised when the screen is pointing up and the board is horizontal * Raised when the screen is pointing up and the board is horizontal
*/ */
//% blockId="screen down" enumval=6 //% block="screen down" enumval=6
ScreenDown, ScreenDown,
/** /**
* Raised when the screen is pointing left * Raised when the screen is pointing left
*/ */
//% blockId="tilt left" enumval=3 //% block="tilt left" enumval=3
TiltLeft, TiltLeft,
/** /**
* Raised when the screen is pointing right * Raised when the screen is pointing right
*/ */
//% blockId="tilt right" enumval=4 //% block="tilt right" enumval=4
TiltRight, TiltRight,
/** /**
* Raised when the board is falling! * Raised when the board is falling!
*/ */
//% blockId="free fall" enumval=7 //% block="free fall" enumval=7
FreeFall FreeFall
} }

View File

@ -1,7 +1,7 @@
enum DisplayMode { enum DisplayMode {
//% enumval=0 blockId="black and white" //% enumval=0 block="black and white"
BackAndWhite, BackAndWhite,
//% enumval=1 blockId="greyscale" //% enumval=1 block="greyscale"
Greyscale, Greyscale,
} }

View File

@ -1,7 +1,7 @@
enum Note { enum Note {
//% enumval=262 //% enumval=262
C, C,
//% enumval=277 blockId=C# //% enumval=277 block=C#
CSharp, CSharp,
//% enumval=294 //% enumval=294
D, D,
@ -11,11 +11,11 @@ enum Note {
E, E,
//% enumval=349 //% enumval=349
F, F,
//% enumval=370 blockId=F# //% enumval=370 block=F#
FSharp, FSharp,
//% enumval=392 //% enumval=392
G, G,
//% enumval=415 blockId=G# //% enumval=415 block=G#
GSharp, GSharp,
//% enumval=440 //% enumval=440
A, A,
@ -25,7 +25,7 @@ enum Note {
B, B,
//% enumval=131 //% enumval=131
C3, C3,
//% enumval=139 blockId=C#3 //% enumval=139 block=C#3
CSharp3, CSharp3,
//% enumval=147 //% enumval=147
D3, D3,
@ -35,11 +35,11 @@ enum Note {
E3, E3,
//% enumval=175 //% enumval=175
F3, F3,
//% enumval=185 blockId=F#3 //% enumval=185 block=F#3
FSharp3, FSharp3,
//% enumval=196 //% enumval=196
G3, G3,
//% enumval=208 blockId=G#3 //% enumval=208 block=G#3
GSharp3, GSharp3,
//% enumval=220 //% enumval=220
A3, A3,
@ -49,7 +49,7 @@ enum Note {
B3, B3,
//% enumval=262 //% enumval=262
C4, C4,
//% enumval=277 blockId=C#4 //% enumval=277 block=C#4
CSharp4, CSharp4,
//% enumval=294 //% enumval=294
D4, D4,
@ -59,11 +59,11 @@ enum Note {
E4, E4,
//% enumval=349 //% enumval=349
F4, F4,
//% enumval=370 blockId=F#3 //% enumval=370 block=F#3
FSharp4, FSharp4,
//% enumval=392 //% enumval=392
G4, G4,
//% enumval=415 blockId=G#3 //% enumval=415 block=G#3
GSharp4, GSharp4,
//% enumval=440 //% enumval=440
A4, A4,
@ -73,7 +73,7 @@ enum Note {
B4, B4,
//% enumval=523 //% enumval=523
C5, C5,
//% enumval=555 blockId=C#5 //% enumval=555 block=C#5
CSharp5, CSharp5,
//% enumval=587 //% enumval=587
D5, D5,
@ -83,11 +83,11 @@ enum Note {
E5, E5,
//% enumval=698 //% enumval=698
F5, F5,
//% enumval=740 blockId=F#5 //% enumval=740 block=F#5
FSharp5, FSharp5,
//% enumval=784 //% enumval=784
G5, G5,
//% enumval=831 blockId=G#5 //% enumval=831 block=G#5
GSharp5, GSharp5,
//% enumval=880 //% enumval=880
A5, A5,
@ -98,15 +98,15 @@ enum Note {
} }
enum BeatFraction { enum BeatFraction {
//% enumval=1 blockId=1 //% enumval=1 block=1
Whole = 1, Whole = 1,
//% enumval=2 blockId="1/2" //% enumval=2 block="1/2"
Half = 2, Half = 2,
//% enumval=4 blockId="1/4" //% enumval=4 block="1/4"
Quater = 4, Quater = 4,
//% enumval=8 blockId="1/8" //% enumval=8 block="1/8"
Eighth = 8, Eighth = 8,
//% enumval=16 blockId="1/16" //% enumval=16 block="1/16"
Sixteenth = 16 Sixteenth = 16
} }