7f40aea
diff -up ./Data/GlobalDefaults.ini.willow ./Data/GlobalDefaults.ini
7f40aea
--- ./Data/GlobalDefaults.ini.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Data/GlobalDefaults.ini	2014-06-01 16:23:35.072680642 -0400
7f40aea
@@ -6,7 +6,7 @@ LogMasks=ALL
7f40aea
 ; 0 - No (default), 1 - Yes
7f40aea
 ;LogWriteToConsole=1
7f40aea
 ; 0 - No (default), 1 - Yes
7f40aea
-LogWriteToFile=1
7f40aea
+;LogWriteToFile=1
7f40aea
 ; 0 - No (default), 1 - Yes
7f40aea
 ;LogWriteLineInfo=0
7f40aea
 ; leave empty for nothing (default). ALL - all masks
7f40aea
diff -up ./Source/XnDeviceSensorV2/Registration.cpp.willow ./Source/XnDeviceSensorV2/Registration.cpp
7f40aea
--- ./Source/XnDeviceSensorV2/Registration.cpp.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/Registration.cpp	2014-06-01 16:23:35.064680329 -0400
7f40aea
@@ -466,13 +466,28 @@ void XnRegistration::Apply1000(XnDepthPi
7f40aea
 			nNewX = (XnInt32)(XnDouble(*pRegTable)/XN_REG_X_SCALE + XnInt32(pDepth2ShiftTable[nValue]/XN_REG_PARAB_COEFF - nConstShift) * dShiftFactor);
7f40aea
 			nNewY = *(pRegTable+1);
7f40aea
 
7f40aea
-			if ((XnUInt32)nNewX-1 < (XnUInt32)nDepthXRes-1)
7f40aea
+			if ((XnUInt32)nNewX-1 < (XnUInt32)nDepthXRes-1 && (XnUInt32)nNewY <(XnUInt32) nDepthYRes)
7f40aea
 			{
7f40aea
 				nArrPos = nNewY * nDepthXRes + nNewX;
7f40aea
 				nOutValue = pOutput[nArrPos];
7f40aea
 
7f40aea
 				if (nOutValue == 0 || nOutValue > nValue)
7f40aea
 				{
7f40aea
+				  if ( nNewX > 0 && nNewY > 0 )
7f40aea
+					{
7f40aea
+						pOutput[nArrPos-nDepthXRes] = nValue;
7f40aea
+						pOutput[nArrPos-nDepthXRes-1] = nValue;
7f40aea
+						pOutput[nArrPos-1] = nValue;
7f40aea
+					}
7f40aea
+					else if( nNewY > 0 )
7f40aea
+					{
7f40aea
+						pOutput[nArrPos-nDepthXRes] = nValue;
7f40aea
+					}
7f40aea
+					else if( nNewX > 0 )
7f40aea
+					{
7f40aea
+						pOutput[nArrPos-1] = nValue;
7f40aea
+					}
7f40aea
+    
7f40aea
 					pOutput[nArrPos] = nValue;
7f40aea
 					pOutput[nArrPos-1] = nValue;
7f40aea
 					pOutput[nArrPos-nDepthXRes] = nValue;
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnDataProcessor.h.willow ./Source/XnDeviceSensorV2/XnDataProcessor.h
7f40aea
--- ./Source/XnDeviceSensorV2/XnDataProcessor.h.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnDataProcessor.h	2014-06-01 16:23:35.065680368 -0400
7f40aea
@@ -89,7 +89,9 @@ protected:
7f40aea
 	/* The number of bytes received so far (since last time this member was reset). */
7f40aea
 	XnUInt32 m_nBytesReceived;
7f40aea
 	/* Stores last packet ID */
7f40aea
-	XnUInt16 m_nLastPacketID;
7f40aea
+	//XnUInt16 m_nLastPacketID;
7f40aea
+	// --avin mod--
7f40aea
+  XnUInt8  m_nLastPacketID;
7f40aea
 	/* The name of the stream. */
7f40aea
 	const XnChar* m_csName;
7f40aea
 
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp.willow ./Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h.willow ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h
7f40aea
--- ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnDeviceSensorProtocol.h	2014-06-01 16:23:35.066680407 -0400
7f40aea
@@ -85,7 +85,10 @@ typedef struct XnSensorProtocolResponseH
7f40aea
 {
7f40aea
 	XnUInt16 nMagic;
7f40aea
 	XnUInt16 nType;
7f40aea
-	XnUInt16 nPacketID;
7f40aea
+	//XnUInt16 nPacketID;
7f40aea
+  // --avin mod--
7f40aea
+  XnUInt8  nPacketID;
7f40aea
+  XnUInt8  nUnknown;
7f40aea
 	XnUInt16 nBufSize;
7f40aea
 	XnUInt32 nTimeStamp;
7f40aea
 } XnSensorProtocolResponseHeader;
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp.willow ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp
7f40aea
--- ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnFirmwareStreams.cpp	2014-06-01 16:23:35.067680446 -0400
7f40aea
@@ -110,11 +110,12 @@ XnStatus XnFirmwareStreams::CheckClaimSt
7f40aea
 				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Cannot set depth stream to resolution %d when IR is set to resolution %d!", nRes, pIRStreamData->nRes);
7f40aea
 			}
7f40aea
 
7f40aea
+      // highres enable from avin
7f40aea
 			// check FPS
7f40aea
-			if (pIRStreamData->nFPS != nFPS)
7f40aea
-			{
7f40aea
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
7f40aea
-			}
7f40aea
+			//if (pIRStreamData->nFPS != nFPS)
7f40aea
+			//{
7f40aea
+			//	XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
7f40aea
+			//}
7f40aea
 		}
7f40aea
 	}
7f40aea
 	else if (strcmp(strType, XN_STREAM_TYPE_IR) == 0)
7f40aea
@@ -146,10 +147,10 @@ XnStatus XnFirmwareStreams::CheckClaimSt
7f40aea
 			}
7f40aea
 
7f40aea
 			// check FPS
7f40aea
-			if (pDepthStreamData->nFPS != nFPS)
7f40aea
-			{
7f40aea
-				XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
7f40aea
-			}
7f40aea
+			//if (pDepthStreamData->nFPS != nFPS)
7f40aea
+			//{
7f40aea
+			//	XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_BAD_PARAM, XN_MASK_DEVICE_SENSOR, "Depth and IR streams must have the same FPS!");
7f40aea
+			//}
7f40aea
 		}
7f40aea
 	}
7f40aea
 	else if (strcmp(strType, XN_STREAM_TYPE_IMAGE) == 0)
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnHostProtocol.h.willow ./Source/XnDeviceSensorV2/XnHostProtocol.h
7f40aea
--- ./Source/XnDeviceSensorV2/XnHostProtocol.h.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnHostProtocol.h	2014-06-01 16:23:35.067680446 -0400
7f40aea
@@ -107,8 +107,8 @@ enum EPsProtocolOpCodes_V017
7f40aea
 typedef enum
7f40aea
 {
7f40aea
 	XN_HOST_PROTOCOL_ALGORITHM_DEPTH_INFO	= 0x00,
7f40aea
-	XN_HOST_PROTOCOL_ALGORITHM_REGISTRATION	= 0x02,
7f40aea
-	XN_HOST_PROTOCOL_ALGORITHM_PADDING		= 0x03,
7f40aea
+	XN_HOST_PROTOCOL_ALGORITHM_REGISTRATION	= 0x40,
7f40aea
+	XN_HOST_PROTOCOL_ALGORITHM_PADDING		= 0x41,
7f40aea
 	XN_HOST_PROTOCOL_ALGORITHM_BLANKING		= 0x06,
7f40aea
 	XN_HOST_PROTOCOL_ALGORITHM_DEVICE_INFO	= 0x07,
7f40aea
 	XN_HOST_PROTOCOL_ALGORITHM_FREQUENCY	= 0x80
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp
7f40aea
--- ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnSensorDepthStream.cpp	2014-06-01 16:23:35.068680486 -0400
7f40aea
@@ -319,6 +319,8 @@ XnStatus XnSensorDepthStream::ConfigureS
7f40aea
 	nRetVal = m_Helper.GetCmosInfo()->SetCmosConfig(XN_CMOS_TYPE_DEPTH, GetResolution(), GetFPS());
7f40aea
 	XN_IS_STATUS_OK(nRetVal);
7f40aea
 
7f40aea
+  // Thanks to avin again! :-)
7f40aea
+  XnHostProtocolSetParam(GetHelper()->GetPrivateData(), 0x105, 0);
7f40aea
 	return XN_STATUS_OK;
7f40aea
 }
7f40aea
 
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorDepthStream.h.willow ./Source/XnDeviceSensorV2/XnSensorDepthStream.h
7f40aea
--- ./Source/XnDeviceSensorV2/XnSensorDepthStream.h.willow	2014-06-01 16:23:35.068680486 -0400
7f40aea
+++ ./Source/XnDeviceSensorV2/XnSensorDepthStream.h	2014-06-01 16:31:59.481440578 -0400
7f40aea
@@ -38,13 +38,13 @@
7f40aea
 	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_QQVGA
7f40aea
 #else
7f40aea
 	#define XN_DEPTH_STREAM_DEFAULT_INPUT_FORMAT				XN_IO_DEPTH_FORMAT_UNCOMPRESSED_11_BIT
7f40aea
-	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_QVGA
7f40aea
+	#define XN_DEPTH_STREAM_DEFAULT_RESOLUTION					XN_RESOLUTION_VGA
7f40aea
 #endif
7f40aea
 
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_FPS							30
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_OUTPUT_FORMAT				XN_OUTPUT_FORMAT_DEPTH_VALUES
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_REGISTRATION				FALSE
7f40aea
-#define XN_DEPTH_STREAM_DEFAULT_REGISTRATION_TYPE			XN_PROCESSING_DONT_CARE
7f40aea
+#define XN_DEPTH_STREAM_DEFAULT_REGISTRATION_TYPE			XN_PROCESSING_SOFTWARE
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_HOLE_FILLER					TRUE
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_WHITE_BALANCE				TRUE
7f40aea
 #define XN_DEPTH_STREAM_DEFAULT_GAIN_OLD					50
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp.willow ./Source/XnDeviceSensorV2/XnSensorFirmwareParams.cpp
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorImageStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorImageStream.cpp
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorImageStream.h.willow ./Source/XnDeviceSensorV2/XnSensorImageStream.h
7f40aea
--- ./Source/XnDeviceSensorV2/XnSensorImageStream.h.willow	2013-11-12 08:00:50.000000000 -0500
7f40aea
+++ ./Source/XnDeviceSensorV2/XnSensorImageStream.h	2014-06-01 16:23:35.071680603 -0400
7f40aea
@@ -31,8 +31,8 @@
7f40aea
 // Defines
7f40aea
 //---------------------------------------------------------------------------
7f40aea
 #define XN_IMAGE_STREAM_DEFAULT_FPS				30
7f40aea
-#define XN_IMAGE_STREAM_DEFAULT_RESOLUTION		XN_RESOLUTION_QVGA
7f40aea
-#define XN_IMAGE_STREAM_DEFAULT_INPUT_FORMAT	XN_IO_IMAGE_FORMAT_UNCOMPRESSED_YUV422
7f40aea
+#define XN_IMAGE_STREAM_DEFAULT_RESOLUTION		XN_RESOLUTION_VGA
7f40aea
+#define XN_IMAGE_STREAM_DEFAULT_INPUT_FORMAT	XN_IO_IMAGE_FORMAT_UNCOMPRESSED_BAYER
7f40aea
 #define XN_IMAGE_STREAM_DEFAULT_OUTPUT_FORMAT	XN_OUTPUT_FORMAT_RGB24
7f40aea
 #define XN_IMAGE_STREAM_DEFAULT_FLICKER			0
7f40aea
 #define XN_IMAGE_STREAM_DEFAULT_QUALITY			3
7f40aea
@@ -169,4 +169,4 @@ private:
7f40aea
 	XnActualIntProperty m_ActualRead;
7f40aea
 };
7f40aea
 
7f40aea
-#endif //__XN_SENSOR_IMAGE_STREAM_H__
7f40aea
\ No newline at end of file
7f40aea
+#endif //__XN_SENSOR_IMAGE_STREAM_H__
7f40aea
diff -up ./Source/XnDeviceSensorV2/XnSensorIRStream.cpp.willow ./Source/XnDeviceSensorV2/XnSensorIRStream.cpp