Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
working commit
Browse files Browse the repository at this point in the history
-limits receiving components to game world components
-emit motion data on send controller event
  • Loading branch information
getnamo committed Jan 7, 2017
1 parent 5ce3f8e commit 4d76580
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Source/MyoPlugin/Private/FMyoPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ TSharedPtr< class IInputDevice > FMyoPlugin::CreateInputDevice(const TSharedRef<
UE_LOG(MyoPluginLog, Log, TEXT("Creating Input device"));

MyoInputDevice = MakeShareable(new FMyoInputDevice(InMessageHandler));
return TSharedPtr< class IInputDevice >(MyoInputDevice);

//Delegates may have been added before the input device is created, add them to our input device to handle
if (DeferredDelegates.Num() > 0)
Expand All @@ -100,6 +99,8 @@ TSharedPtr< class IInputDevice > FMyoPlugin::CreateInputDevice(const TSharedRef<
DeferredDelegates.Empty();
}
bInputCreated = true;

return TSharedPtr< class IInputDevice >(MyoInputDevice);
}

IMPLEMENT_MODULE(FMyoPlugin, MyoPlugin)
3 changes: 3 additions & 0 deletions Source/MyoPlugin/Public/MyoController.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ struct MYOPLUGIN_API FMyoControllerData
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Myo Controller Data")
int32 RSSI;

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Myo Controller Data")
bool bIsArmSynced;

//Conversion
void setFromMyoDeviceData(FMyoDeviceData* Data);
};
Expand Down
2 changes: 1 addition & 1 deletion Source/MyoPlugin/Public/MyoEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum EMyoPose
MYO_POSE_WAVEOUT,
MYO_POSE_FINGERSPREAD,
MYO_POSE_DOUBLETAP,
MYO_POSE_MAX = 255
MYO_POSE_UNKNOWN = 254 //should be 255 but needs to be 254 due to ue4 max enum quirks
};

UENUM(BlueprintType)
Expand Down

0 comments on commit 4d76580

Please sign in to comment.