Skip to content

Commit 4085935

Browse files
committed
fix: add ClassifierEventType.UNKNOWN clearning up other enum hex
1 parent 87f1ebc commit 4085935

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

myo/types.py

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,19 @@ def to_dict(self):
6868

6969
# -> myohw_classifier_event_type_t
7070
class ClassifierEventType(Enum):
71-
ARM_SYNCED = 0x01
72-
ARM_UNSYNCED = 0x02
73-
POSE = 0x03
74-
UNLOCKED = 0x04
75-
LOCKED = 0x05
76-
SYNC_FAILED = 0x06
71+
ARM_SYNCED = 1
72+
ARM_UNSYNCED = 2
73+
POSE = 3
74+
UNLOCKED = 4
75+
LOCKED = 5
76+
SYNC_FAILED = 6
77+
UNKNOWN = 7
7778

7879

7980
# -> myohw_classifier_mode_t
8081
class ClassifierMode(Enum):
81-
DISABLED = 0x00
82-
ENABLED = 0x01
82+
DISABLED = 0
83+
ENABLED = 1
8384

8485

8586
# -> myohw_classifier_model_type_t
@@ -128,13 +129,13 @@ def to_dict(self):
128129
# cf. https://github.com/dzhu/myo-raw/issues/17#issuecomment-913140042
129130
# fmt: off
130131
class EMGMode(Enum):
131-
NONE = 0x00 # Do not send EMG data.
132-
SEND_FILT = 0x01 # Send bandpass-filtered && rectified EMG data.
133-
# noqa # - This is a hidden mode in myohw.h.
134-
# noqa # - See FVData for the interpolated type
135-
SEND_EMG = 0x02 # Send filtered && unrectified EMG data.
136-
SEND_RAW = 0x03 # Send unfiltered and unrectified EMG data.
137-
# noqa # - The values are scaled between [-128,127]
132+
NONE = 0 # Do not send EMG data.
133+
SEND_FILT = 1 # Send bandpass-filtered && rectified EMG data.
134+
# noqa # - This is a hidden mode in myohw.h.
135+
# noqa # - See FVData for the interpolated type
136+
SEND_EMG = 2 # Send filtered && unrectified EMG data.
137+
SEND_RAW = 3 # Send unfiltered and unrectified EMG data.
138+
# noqa # - The values are scaled between [-128,127]
138139
# fmt: on
139140

140141

@@ -231,11 +232,11 @@ def to_dict(self):
231232
# -> myohw_imu_mode_t
232233
# fmt: off
233234
class IMUMode(Enum):
234-
NONE = 0x00 # Do not send IMU data or events.
235-
SEND_DATA = 0x01 # Send IMU data streams (accel, gyro, and orientation).
236-
SEND_EVENTS = 0x02 # Send motion events detected by the IMU (e.g. taps).
237-
SEND_ALL = 0x03 # Send both IMU data streams and motion events.
238-
SEND_RAW = 0x04 # Send raw IMU data streams.
235+
NONE = 0 # Do not send IMU data or events.
236+
SEND_DATA = 1 # Send IMU data streams (accel, gyro, and orientation).
237+
SEND_EVENTS = 2 # Send motion events detected by the IMU (e.g. taps).
238+
SEND_ALL = 3 # Send both IMU data streams and motion events.
239+
SEND_RAW = 4 # Send raw IMU data streams.
239240
# fmt: on
240241

241242

@@ -274,9 +275,9 @@ def to_dict(self):
274275

275276
# -> myohw_motion_event_type_t
276277
class MotionEventType(Enum):
277-
TAP = 0x00
278-
UNKNOWN1 = 0x01
279-
UNKNOWN2 = 0x02
278+
TAP = 0
279+
UNKNOWN1 = 1
280+
UNKNOWN2 = 2
280281

281282

282283
# -> myohw_pose_t
@@ -305,14 +306,14 @@ class SleepMode(Enum):
305306

306307
# -> myohw_sync_result_t
307308
class SyncResult(Enum):
308-
FAILED_TOO_HARD = 0x01
309+
FAILED_TOO_HARD = 1
309310

310311

311312
# -> myohw_unlock_type_t
312313
class UnlockType(Enum):
313-
LOCK = 0x00
314-
TIMED = 0x01
315-
HOLD = 0x02
314+
LOCK = 0
315+
TIMED = 1
316+
HOLD = 2
316317

317318

318319
# -> myohw_user_action_type_t
@@ -322,10 +323,10 @@ class UserActionType(Enum):
322323

323324
# -> myohw_vibration_type_t
324325
class VibrationType(Enum):
325-
NONE = 0x00
326-
SHORT = 0x01
327-
MEDIUM = 0x02
328-
LONG = 0x03
326+
NONE = 0
327+
SHORT = 1
328+
MEDIUM = 2
329+
LONG = 3
329330

330331

331332
# -> myohw_x_direction_t

0 commit comments

Comments
 (0)