Skip to content

Commit

Permalink
fix: add ClassifierEventType.UNKNOWN clearning up other enum hex
Browse files Browse the repository at this point in the history
  • Loading branch information
iomz committed Jun 24, 2023
1 parent 87f1ebc commit 4085935
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions myo/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,19 @@ def to_dict(self):

# -> myohw_classifier_event_type_t
class ClassifierEventType(Enum):
ARM_SYNCED = 0x01
ARM_UNSYNCED = 0x02
POSE = 0x03
UNLOCKED = 0x04
LOCKED = 0x05
SYNC_FAILED = 0x06
ARM_SYNCED = 1
ARM_UNSYNCED = 2
POSE = 3
UNLOCKED = 4
LOCKED = 5
SYNC_FAILED = 6
UNKNOWN = 7


# -> myohw_classifier_mode_t
class ClassifierMode(Enum):
DISABLED = 0x00
ENABLED = 0x01
DISABLED = 0
ENABLED = 1


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


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


Expand Down Expand Up @@ -274,9 +275,9 @@ def to_dict(self):

# -> myohw_motion_event_type_t
class MotionEventType(Enum):
TAP = 0x00
UNKNOWN1 = 0x01
UNKNOWN2 = 0x02
TAP = 0
UNKNOWN1 = 1
UNKNOWN2 = 2


# -> myohw_pose_t
Expand Down Expand Up @@ -305,14 +306,14 @@ class SleepMode(Enum):

# -> myohw_sync_result_t
class SyncResult(Enum):
FAILED_TOO_HARD = 0x01
FAILED_TOO_HARD = 1


# -> myohw_unlock_type_t
class UnlockType(Enum):
LOCK = 0x00
TIMED = 0x01
HOLD = 0x02
LOCK = 0
TIMED = 1
HOLD = 2


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

# -> myohw_vibration_type_t
class VibrationType(Enum):
NONE = 0x00
SHORT = 0x01
MEDIUM = 0x02
LONG = 0x03
NONE = 0
SHORT = 1
MEDIUM = 2
LONG = 3


# -> myohw_x_direction_t
Expand Down

0 comments on commit 4085935

Please sign in to comment.