Skip to content

Commit

Permalink
CHANGE: Kinect image stream now ServiceTypeImage (instead of ServiceT…
Browse files Browse the repository at this point in the history
…ypeGeneric)
  • Loading branch information
arthurnishimoto committed Jan 28, 2019
1 parent ba74cf4 commit e2894b2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
4 changes: 3 additions & 1 deletion include/connector/omicronConnectorClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ namespace omicron
ServiceTypeGeneric,
ServiceTypeBrain,
ServiceTypeWand,
ServiceTypeSpeech };
ServiceTypeSpeech,
ServiceTypeImage
};

//! #PYAPI Supported event types.
//! The python API exposed this enum in the EventType object.
Expand Down
22 changes: 12 additions & 10 deletions include/omicron/Service.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@ namespace omicron
//! This enumeration is kept for compatibility reason and may be removed in the future.
//! To add new service types modify the relative enumeration in the EventBase class
//! (connector/omicronConnectorClient.h)
enum ServiceType {
Pointer = EventBase::ServiceTypePointer,
Mocap = EventBase::ServiceTypeMocap,
Keyboard = EventBase::ServiceTypeKeyboard,
Controller = EventBase::ServiceTypeController,
Ui = EventBase::ServiceTypeUi,
Generic = EventBase::ServiceTypeGeneric,
Brain = EventBase::ServiceTypeBrain,
Wand = EventBase::ServiceTypeWand,
Speech = EventBase::ServiceTypeSpeech };
enum ServiceType {
Pointer = EventBase::ServiceTypePointer,
Mocap = EventBase::ServiceTypeMocap,
Keyboard = EventBase::ServiceTypeKeyboard,
Controller = EventBase::ServiceTypeController,
Ui = EventBase::ServiceTypeUi,
Generic = EventBase::ServiceTypeGeneric,
Brain = EventBase::ServiceTypeBrain,
Wand = EventBase::ServiceTypeWand,
Speech = EventBase::ServiceTypeSpeech,
Image = EventBase::ServiceTypeImage
};

enum ServicePollPriority { PollFirst, PollNormal, PollLast };

Expand Down
4 changes: 2 additions & 2 deletions src/omicron/omicron/MSKinect2Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void MSKinectService::poll()
{
memcpy(imageEventBuffer, &color_pImage[currentPacket * dataPacketSize], dataPacketSize);
Event* evt = mysInstance->writeHead();
evt->reset(Event::Update, Service::Generic, currentFrameTimestamp);
evt->reset(Event::Update, Service::Image, currentFrameTimestamp);
evt->setPosition(cColorWidth, cColorHeight, 0); // Position: imageWidth, imageHeight, typeFlag (Color = 0, Depth = 1)
evt->setFlags(currentPacket);

Expand Down Expand Up @@ -460,7 +460,7 @@ void MSKinectService::pollDepth()
{
memcpy(imageEventBuffer, &pImage[i * dataPacketSize], dataPacketSize);
Event* evt = mysInstance->writeHead();
evt->reset(Event::Update, Service::Generic, timestamp);
evt->reset(Event::Update, Service::Image, timestamp);
evt->setPosition(cDepthWidth, cDepthHeight, 1); // Position: imageWidth, imageHeight, typeFlag (Color = 0, Depth = 1)
evt->setFlags(i);

Expand Down

0 comments on commit e2894b2

Please sign in to comment.