Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Gesture Sensor #18

Closed
tthiery opened this issue Jun 14, 2020 · 2 comments · Fixed by #84
Closed

Investigate Gesture Sensor #18

tthiery opened this issue Jun 14, 2020 · 2 comments · Fixed by #84
Assignees
Labels
area-device-hubdevices enhancement New feature or request good first issue Good for newcomers investigation Stuff to investigate

Comments

@tthiery
Copy link
Member

tthiery commented Jun 14, 2020

The SPIKE Prime Hub can recognize taps on the device. Maybe also the TechnicMediumHub since it exposes the internal device.

@tthiery tthiery added enhancement New feature or request area-device-hubdevices investigation Stuff to investigate good first issue Good for newcomers labels Jun 14, 2020
@tthiery
Copy link
Member Author

tthiery commented Aug 20, 2020

Port Mode Info

  Port: 100
    IOTypeId: TechnicMediumHubGestSensor
    HardwareRevision: 0.0.0.1
    SoftwareRevision: 0.0.0.1
    OutputCapability: False
    InputCapability: True
    LogicalCombinableCapability: False
    LogicalSynchronizableCapability: False
    ModeCombinations: []
    UsedCombinationIndex: 0
    MultiUpdateEnabled: False
    ConfiguredModeDataSetIndex: []
    Mode: 0
      Name: GEST
      IsInput: True
      IsOutput: False
      RawMin: 0
      RawMax: 4
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 4
      Symbol:
      InputSupportsNull: False
      InputSupportFunctionalMapping20: True
      InputAbsolute: False
      InputRelative: False
      InputDiscrete: True
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: SByte
      TotalFigures: 1
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False

Value is discrete and can be between 0 and 4. Which would conclude to 4-5 gestures. SPIKE Prime specification list 3 gestures: free fall, tap, shake. I rudimentary mapped them the following ... however .. the sensor emits many of them for the free fall and tapping is a pretty rough gesture. So that could be also crash or something.

    public enum Gesture : int
    {
        None = 0, // UNSPECED
        Tap = 1, // UNSPECED
        Gesture_2 = 2,
        Shake = 3, // UNSPECED
        FreeFall = 4, // UNSPECED
    }

@tthiery
Copy link
Member Author

tthiery commented Aug 20, 2020

Asked Bricks Community

tthiery added a commit that referenced this issue Aug 20, 2020
@tthiery tthiery added this to the v3.0 - Breaking Changes milestone Aug 20, 2020
@tthiery tthiery self-assigned this Aug 20, 2020
tthiery added a commit that referenced this issue Aug 24, 2020
#18 non-breaking
tthiery added a commit that referenced this issue Sep 4, 2020
- Rename GestureSensor class to avoid abbreviation

#18 (non-breaking: not released yet)
tthiery added a commit that referenced this issue Sep 4, 2020
#18 (non-breaking)
tthiery added a commit that referenced this issue Sep 4, 2020
#18 (non-breaking: documentation)
tthiery added a commit that referenced this issue Sep 26, 2020
* Add gesture sensor w/ incomplete gesture list

#18 non-breaking (new api)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-device-hubdevices enhancement New feature or request good first issue Good for newcomers investigation Stuff to investigate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant