Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial Commit

Beta code, still needs cleanup.
  • Loading branch information...
commit 8eca75d685bf9ea220e85f9d3c8cf35236fc7464 1 parent 01b7559
Andy Rawson authored
Showing with 32,207 additions and 0 deletions.
  1. +7 −0 Firmware/attributes.txt
  2. +2 −0  Firmware/build.bat
  3. +104 −0 Firmware/gatt.xml
  4. +9 −0 Firmware/hardware.xml
  5. +138 −0 Firmware/ircam.bgs
  6. +8,195 −0 Firmware/out.hex
  7. +7 −0 Firmware/project.xml
  8. +1,266 −0 TIPIC-BLE.xcodeproj/project.pbxproj
  9. +16 −0 TIPIC-BLE/BLEThermalSensor.h
  10. +27 −0 TIPIC-BLE/BLEThermalSensor.m
  11. BIN  TIPIC-BLE/Default-568h@2x.png
  12. BIN  TIPIC-BLE/Default.png
  13. BIN  TIPIC-BLE/Default@2x.png
  14. +19 −0 TIPIC-BLE/MLX90620Math.h
  15. +220 −0 TIPIC-BLE/MLX90620Math.m
  16. +15 −0 TIPIC-BLE/RHAppDelegate.h
  17. +46 −0 TIPIC-BLE/RHAppDelegate.m
  18. +36 −0 TIPIC-BLE/RHViewController.h
  19. +1,072 −0 TIPIC-BLE/RHViewController.m
  20. +38 −0 TIPIC-BLE/TIPIC-BLE-Info.plist
  21. +14 −0 TIPIC-BLE/TIPIC-BLE-Prefix.pch
  22. +2 −0  TIPIC-BLE/en.lproj/InfoPlist.strings
  23. +261 −0 TIPIC-BLE/en.lproj/MainStoryboard.storyboard
  24. +1,648 −0 TIPIC-BLE/framework/GPUImage.xcodeproj/project.pbxproj
  25. BIN  TIPIC-BLE/framework/Resources/lookup.png
  26. BIN  TIPIC-BLE/framework/Resources/lookup_amatorka.png
  27. BIN  TIPIC-BLE/framework/Resources/lookup_miss_etikate.png
  28. BIN  TIPIC-BLE/framework/Resources/lookup_soft_elegance_1.png
  29. BIN  TIPIC-BLE/framework/Resources/lookup_soft_elegance_2.png
  30. +36 −0 TIPIC-BLE/framework/Source/GLProgram.h
  31. +262 −0 TIPIC-BLE/framework/Source/GLProgram.m
  32. +7 −0 TIPIC-BLE/framework/Source/GPUImage-Prefix.pch
  33. +132 −0 TIPIC-BLE/framework/Source/GPUImage.h
  34. +18 −0 TIPIC-BLE/framework/Source/GPUImage3x3ConvolutionFilter.h
  35. +78 −0 TIPIC-BLE/framework/Source/GPUImage3x3ConvolutionFilter.m
  36. +18 −0 TIPIC-BLE/framework/Source/GPUImage3x3TextureSamplingFilter.h
  37. +111 −0 TIPIC-BLE/framework/Source/GPUImage3x3TextureSamplingFilter.m
  38. +9 −0 TIPIC-BLE/framework/Source/GPUImageAdaptiveThresholdFilter.h
  39. +82 −0 TIPIC-BLE/framework/Source/GPUImageAdaptiveThresholdFilter.m
  40. +5 −0 TIPIC-BLE/framework/Source/GPUImageAddBlendFilter.h
  41. +58 −0 TIPIC-BLE/framework/Source/GPUImageAddBlendFilter.m
  42. +11 −0 TIPIC-BLE/framework/Source/GPUImageAlphaBlendFilter.h
  43. +52 −0 TIPIC-BLE/framework/Source/GPUImageAlphaBlendFilter.m
  44. +17 −0 TIPIC-BLE/framework/Source/GPUImageAmatorkaFilter.h
  45. +32 −0 TIPIC-BLE/framework/Source/GPUImageAmatorkaFilter.m
  46. +20 −0 TIPIC-BLE/framework/Source/GPUImageAverageColor.h
  47. +330 −0 TIPIC-BLE/framework/Source/GPUImageAverageColor.m
  48. +8 −0 TIPIC-BLE/framework/Source/GPUImageAverageLuminanceThresholdFilter.h
  49. +47 −0 TIPIC-BLE/framework/Source/GPUImageAverageLuminanceThresholdFilter.m
  50. +5 −0 TIPIC-BLE/framework/Source/GPUImageBilateralFilter.h
  51. +93 −0 TIPIC-BLE/framework/Source/GPUImageBilateralFilter.m
  52. +13 −0 TIPIC-BLE/framework/Source/GPUImageBoxBlurFilter.h
  53. +92 −0 TIPIC-BLE/framework/Source/GPUImageBoxBlurFilter.m
  54. +11 −0 TIPIC-BLE/framework/Source/GPUImageBrightnessFilter.h
  55. +49 −0 TIPIC-BLE/framework/Source/GPUImageBrightnessFilter.m
  56. +10 −0 TIPIC-BLE/framework/Source/GPUImageBuffer.h
  57. +173 −0 TIPIC-BLE/framework/Source/GPUImageBuffer.m
  58. +16 −0 TIPIC-BLE/framework/Source/GPUImageBulgeDistortionFilter.h
  59. +91 −0 TIPIC-BLE/framework/Source/GPUImageBulgeDistortionFilter.m
  60. +5 −0 TIPIC-BLE/framework/Source/GPUImageCGAColorspaceFilter.h
  61. +65 −0 TIPIC-BLE/framework/Source/GPUImageCGAColorspaceFilter.m
  62. +58 −0 TIPIC-BLE/framework/Source/GPUImageCannyEdgeDetectionFilter.h
  63. +113 −0 TIPIC-BLE/framework/Source/GPUImageCannyEdgeDetectionFilter.m
  64. +32 −0 TIPIC-BLE/framework/Source/GPUImageChromaKeyBlendFilter.h
  65. +85 −0 TIPIC-BLE/framework/Source/GPUImageChromaKeyBlendFilter.m
  66. +30 −0 TIPIC-BLE/framework/Source/GPUImageChromaKeyFilter.h
  67. +84 −0 TIPIC-BLE/framework/Source/GPUImageChromaKeyFilter.m
  68. +17 −0 TIPIC-BLE/framework/Source/GPUImageClosingFilter.h
  69. +40 −0 TIPIC-BLE/framework/Source/GPUImageClosingFilter.m
  70. +9 −0 TIPIC-BLE/framework/Source/GPUImageColorBurnBlendFilter.h
  71. +33 −0 TIPIC-BLE/framework/Source/GPUImageColorBurnBlendFilter.m
  72. +9 −0 TIPIC-BLE/framework/Source/GPUImageColorDodgeBlendFilter.h
  73. +46 −0 TIPIC-BLE/framework/Source/GPUImageColorDodgeBlendFilter.m
  74. +7 −0 TIPIC-BLE/framework/Source/GPUImageColorInvertFilter.h
  75. +30 −0 TIPIC-BLE/framework/Source/GPUImageColorInvertFilter.m
  76. +19 −0 TIPIC-BLE/framework/Source/GPUImageColorMatrixFilter.h
  77. +67 −0 TIPIC-BLE/framework/Source/GPUImageColorMatrixFilter.m
  78. +10 −0 TIPIC-BLE/framework/Source/GPUImageColorPackingFilter.h
  79. +113 −0 TIPIC-BLE/framework/Source/GPUImageColorPackingFilter.m
  80. +14 −0 TIPIC-BLE/framework/Source/GPUImageContrastFilter.h
  81. +49 −0 TIPIC-BLE/framework/Source/GPUImageContrastFilter.m
  82. +14 −0 TIPIC-BLE/framework/Source/GPUImageCropFilter.h
  83. +247 −0 TIPIC-BLE/framework/Source/GPUImageCropFilter.m
  84. +24 −0 TIPIC-BLE/framework/Source/GPUImageCrosshairGenerator.h
  85. +124 −0 TIPIC-BLE/framework/Source/GPUImageCrosshairGenerator.m
  86. +13 −0 TIPIC-BLE/framework/Source/GPUImageCrosshatchFilter.h
  87. +113 −0 TIPIC-BLE/framework/Source/GPUImageCrosshatchFilter.m
  88. +7 −0 TIPIC-BLE/framework/Source/GPUImageDarkenBlendFilter.h
  89. +33 −0 TIPIC-BLE/framework/Source/GPUImageDarkenBlendFilter.m
  90. +7 −0 TIPIC-BLE/framework/Source/GPUImageDifferenceBlendFilter.h
  91. +32 −0 TIPIC-BLE/framework/Source/GPUImageDifferenceBlendFilter.m
  92. +16 −0 TIPIC-BLE/framework/Source/GPUImageDilationFilter.h
  93. +313 −0 TIPIC-BLE/framework/Source/GPUImageDilationFilter.m
  94. +19 −0 TIPIC-BLE/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.h
  95. +112 −0 TIPIC-BLE/framework/Source/GPUImageDirectionalNonMaximumSuppressionFilter.m
  96. +11 −0 TIPIC-BLE/framework/Source/GPUImageDissolveBlendFilter.h
  97. +52 −0 TIPIC-BLE/framework/Source/GPUImageDissolveBlendFilter.m
  98. +5 −0 TIPIC-BLE/framework/Source/GPUImageDivideBlendFilter.h
  99. +55 −0 TIPIC-BLE/framework/Source/GPUImageDivideBlendFilter.m
  100. +8 −0 TIPIC-BLE/framework/Source/GPUImageEmbossFilter.h
  101. +49 −0 TIPIC-BLE/framework/Source/GPUImageEmbossFilter.m
  102. +11 −0 TIPIC-BLE/framework/Source/GPUImageErosionFilter.h
  103. +194 −0 TIPIC-BLE/framework/Source/GPUImageErosionFilter.m
  104. +7 −0 TIPIC-BLE/framework/Source/GPUImageExclusionBlendFilter.h
  105. +35 −0 TIPIC-BLE/framework/Source/GPUImageExclusionBlendFilter.m
  106. +11 −0 TIPIC-BLE/framework/Source/GPUImageExposureFilter.h
  107. +49 −0 TIPIC-BLE/framework/Source/GPUImageExposureFilter.m
  108. +15 −0 TIPIC-BLE/framework/Source/GPUImageFalseColorFilter.h
  109. +78 −0 TIPIC-BLE/framework/Source/GPUImageFalseColorFilter.m
  110. +18 −0 TIPIC-BLE/framework/Source/GPUImageFastBlurFilter.h
  111. +148 −0 TIPIC-BLE/framework/Source/GPUImageFastBlurFilter.m
  112. +137 −0 TIPIC-BLE/framework/Source/GPUImageFilter.h
  113. +902 −0 TIPIC-BLE/framework/Source/GPUImageFilter.m
  114. +18 −0 TIPIC-BLE/framework/Source/GPUImageFilterGroup.h
  115. +174 −0 TIPIC-BLE/framework/Source/GPUImageFilterGroup.m
  116. +25 −0 TIPIC-BLE/framework/Source/GPUImageFilterPipeline.h
  117. +165 −0 TIPIC-BLE/framework/Source/GPUImageFilterPipeline.m
  118. +11 −0 TIPIC-BLE/framework/Source/GPUImageGammaFilter.h
  119. +49 −0 TIPIC-BLE/framework/Source/GPUImageGammaFilter.m
  120. +14 −0 TIPIC-BLE/framework/Source/GPUImageGaussianBlurFilter.h
  121. +102 −0 TIPIC-BLE/framework/Source/GPUImageGaussianBlurFilter.m
  122. +30 −0 TIPIC-BLE/framework/Source/GPUImageGaussianSelectiveBlurFilter.h
  123. +120 −0 TIPIC-BLE/framework/Source/GPUImageGaussianSelectiveBlurFilter.m
  124. +5 −0 TIPIC-BLE/framework/Source/GPUImageGlassSphereFilter.h
  125. +61 −0 TIPIC-BLE/framework/Source/GPUImageGlassSphereFilter.m
  126. +9 −0 TIPIC-BLE/framework/Source/GPUImageGrayscaleFilter.h
  127. +38 −0 TIPIC-BLE/framework/Source/GPUImageGrayscaleFilter.m
  128. +5 −0 TIPIC-BLE/framework/Source/GPUImageHalftoneFilter.h
  129. +47 −0 TIPIC-BLE/framework/Source/GPUImageHalftoneFilter.m
  130. +7 −0 TIPIC-BLE/framework/Source/GPUImageHardLightBlendFilter.h
  131. +57 −0 TIPIC-BLE/framework/Source/GPUImageHardLightBlendFilter.m
  132. +55 −0 TIPIC-BLE/framework/Source/GPUImageHarrisCornerDetectionFilter.h
  133. +284 −0 TIPIC-BLE/framework/Source/GPUImageHarrisCornerDetectionFilter.m
  134. +29 −0 TIPIC-BLE/framework/Source/GPUImageHazeFilter.h
  135. +74 −0 TIPIC-BLE/framework/Source/GPUImageHazeFilter.m
  136. +14 −0 TIPIC-BLE/framework/Source/GPUImageHighPassFilter.h
  137. +46 −0 TIPIC-BLE/framework/Source/GPUImageHighPassFilter.m
  138. +20 −0 TIPIC-BLE/framework/Source/GPUImageHighlightShadowFilter.h
  139. +68 −0 TIPIC-BLE/framework/Source/GPUImageHighlightShadowFilter.m
  140. +25 −0 TIPIC-BLE/framework/Source/GPUImageHistogramFilter.h
  141. +301 −0 TIPIC-BLE/framework/Source/GPUImageHistogramFilter.m
  142. +8 −0 TIPIC-BLE/framework/Source/GPUImageHistogramGenerator.h
  143. +70 −0 TIPIC-BLE/framework/Source/GPUImageHistogramGenerator.m
  144. +11 −0 TIPIC-BLE/framework/Source/GPUImageHueFilter.h
  145. +76 −0 TIPIC-BLE/framework/Source/GPUImageHueFilter.m
  146. +15 −0 TIPIC-BLE/framework/Source/GPUImageJFAVoroniFilter.h
  147. +457 −0 TIPIC-BLE/framework/Source/GPUImageJFAVoroniFilter.m
  148. +13 −0 TIPIC-BLE/framework/Source/GPUImageKuwaharaFilter.h
  149. +110 −0 TIPIC-BLE/framework/Source/GPUImageKuwaharaFilter.m
  150. +7 −0 TIPIC-BLE/framework/Source/GPUImageLanczosResamplingFilter.h
  151. +126 −0 TIPIC-BLE/framework/Source/GPUImageLanczosResamplingFilter.m
  152. +8 −0 TIPIC-BLE/framework/Source/GPUImageLightenBlendFilter.h
  153. +33 −0 TIPIC-BLE/framework/Source/GPUImageLightenBlendFilter.m
  154. +5 −0 TIPIC-BLE/framework/Source/GPUImageLocalBinaryPatternFilter.h
  155. +77 −0 TIPIC-BLE/framework/Source/GPUImageLocalBinaryPatternFilter.m
  156. +28 −0 TIPIC-BLE/framework/Source/GPUImageLookupFilter.h
  157. +53 −0 TIPIC-BLE/framework/Source/GPUImageLookupFilter.m
  158. +14 −0 TIPIC-BLE/framework/Source/GPUImageLowPassFilter.h
  159. +52 −0 TIPIC-BLE/framework/Source/GPUImageLowPassFilter.m
  160. +14 −0 TIPIC-BLE/framework/Source/GPUImageLuminanceThresholdFilter.h
  161. +53 −0 TIPIC-BLE/framework/Source/GPUImageLuminanceThresholdFilter.m
  162. +17 −0 TIPIC-BLE/framework/Source/GPUImageLuminosity.h
  163. +261 −0 TIPIC-BLE/framework/Source/GPUImageLuminosity.m
  164. +5 −0 TIPIC-BLE/framework/Source/GPUImageMaskFilter.h
  165. +49 −0 TIPIC-BLE/framework/Source/GPUImageMaskFilter.m
  166. +5 −0 TIPIC-BLE/framework/Source/GPUImageMedianFilter.h
  167. +119 −0 TIPIC-BLE/framework/Source/GPUImageMedianFilter.m
  168. +17 −0 TIPIC-BLE/framework/Source/GPUImageMissEtikateFilter.h
  169. +32 −0 TIPIC-BLE/framework/Source/GPUImageMissEtikateFilter.m
  170. +13 −0 TIPIC-BLE/framework/Source/GPUImageMonochromeFilter.h
  171. +82 −0 TIPIC-BLE/framework/Source/GPUImageMonochromeFilter.m
  172. +27 −0 TIPIC-BLE/framework/Source/GPUImageMosaicFilter.h
  173. +140 −0 TIPIC-BLE/framework/Source/GPUImageMosaicFilter.m
  174. +18 −0 TIPIC-BLE/framework/Source/GPUImageMotionDetector.h
  175. +88 −0 TIPIC-BLE/framework/Source/GPUImageMotionDetector.m
  176. +34 −0 TIPIC-BLE/framework/Source/GPUImageMovie.h
  177. +355 −0 TIPIC-BLE/framework/Source/GPUImageMovie.m
  178. +59 −0 TIPIC-BLE/framework/Source/GPUImageMovieWriter.h
  179. +636 −0 TIPIC-BLE/framework/Source/GPUImageMovieWriter.m
  180. +7 −0 TIPIC-BLE/framework/Source/GPUImageMultiplyBlendFilter.h
  181. +33 −0 TIPIC-BLE/framework/Source/GPUImageMultiplyBlendFilter.m
  182. +12 −0 TIPIC-BLE/framework/Source/GPUImageNobleCornerDetectionFilter.h
  183. +46 −0 TIPIC-BLE/framework/Source/GPUImageNobleCornerDetectionFilter.m
  184. +5 −0 TIPIC-BLE/framework/Source/GPUImageNonMaximumSuppressionFilter.h
  185. +62 −0 TIPIC-BLE/framework/Source/GPUImageNonMaximumSuppressionFilter.m
  186. +8 −0 TIPIC-BLE/framework/Source/GPUImageNormalBlendFilter.h
  187. +57 −0 TIPIC-BLE/framework/Source/GPUImageNormalBlendFilter.m
  188. +11 −0 TIPIC-BLE/framework/Source/GPUImageOpacityFilter.h
  189. +48 −0 TIPIC-BLE/framework/Source/GPUImageOpacityFilter.m
  190. +45 −0 TIPIC-BLE/framework/Source/GPUImageOpenGLESContext.h
  191. +160 −0 TIPIC-BLE/framework/Source/GPUImageOpenGLESContext.m
  192. +17 −0 TIPIC-BLE/framework/Source/GPUImageOpeningFilter.h
  193. +40 −0 TIPIC-BLE/framework/Source/GPUImageOpeningFilter.m
  194. +110 −0 TIPIC-BLE/framework/Source/GPUImageOutput.h
  195. +367 −0 TIPIC-BLE/framework/Source/GPUImageOutput.m
  196. +5 −0 TIPIC-BLE/framework/Source/GPUImageOverlayBlendFilter.h
  197. +54 −0 TIPIC-BLE/framework/Source/GPUImageOverlayBlendFilter.m
  198. +13 −0 TIPIC-BLE/framework/Source/GPUImagePerlinNoiseFilter.h
  199. +147 −0 TIPIC-BLE/framework/Source/GPUImagePerlinNoiseFilter.m
  200. +21 −0 TIPIC-BLE/framework/Source/GPUImagePicture.h
  201. +171 −0 TIPIC-BLE/framework/Source/GPUImagePicture.m
  202. +20 −0 TIPIC-BLE/framework/Source/GPUImagePinchDistortionFilter.h
  203. +89 −0 TIPIC-BLE/framework/Source/GPUImagePinchDistortionFilter.m
  204. +11 −0 TIPIC-BLE/framework/Source/GPUImagePixellateFilter.h
  205. +112 −0 TIPIC-BLE/framework/Source/GPUImagePixellateFilter.m
  206. +13 −0 TIPIC-BLE/framework/Source/GPUImagePolarPixellateFilter.h
  207. +91 −0 TIPIC-BLE/framework/Source/GPUImagePolarPixellateFilter.m
  208. +10 −0 TIPIC-BLE/framework/Source/GPUImagePolkaDotFilter.h
  209. +55 −0 TIPIC-BLE/framework/Source/GPUImagePolkaDotFilter.m
  210. +14 −0 TIPIC-BLE/framework/Source/GPUImagePosterizeFilter.h
  211. +49 −0 TIPIC-BLE/framework/Source/GPUImagePosterizeFilter.m
  212. +5 −0 TIPIC-BLE/framework/Source/GPUImagePrewittEdgeDetectionFilter.h
  213. +56 −0 TIPIC-BLE/framework/Source/GPUImagePrewittEdgeDetectionFilter.m
  214. +18 −0 TIPIC-BLE/framework/Source/GPUImageRGBClosingFilter.h
  215. +41 −0 TIPIC-BLE/framework/Source/GPUImageRGBClosingFilter.m
  216. +11 −0 TIPIC-BLE/framework/Source/GPUImageRGBDilationFilter.h
  217. +192 −0 TIPIC-BLE/framework/Source/GPUImageRGBDilationFilter.m
  218. +11 −0 TIPIC-BLE/framework/Source/GPUImageRGBErosionFilter.h
  219. +190 −0 TIPIC-BLE/framework/Source/GPUImageRGBErosionFilter.m
  220. +15 −0 TIPIC-BLE/framework/Source/GPUImageRGBFilter.h
  221. +70 −0 TIPIC-BLE/framework/Source/GPUImageRGBFilter.m
  222. +17 −0 TIPIC-BLE/framework/Source/GPUImageRGBOpeningFilter.h
  223. +41 −0 TIPIC-BLE/framework/Source/GPUImageRGBOpeningFilter.m
  224. +20 −0 TIPIC-BLE/framework/Source/GPUImageRawDataInput.h
  225. +63 −0 TIPIC-BLE/framework/Source/GPUImageRawDataInput.m
  226. +34 −0 TIPIC-BLE/framework/Source/GPUImageRawDataOutput.h
  227. +401 −0 TIPIC-BLE/framework/Source/GPUImageRawDataOutput.m
  228. +14 −0 TIPIC-BLE/framework/Source/GPUImageSaturationFilter.h
  229. +55 −0 TIPIC-BLE/framework/Source/GPUImageSaturationFilter.m
  230. +7 −0 TIPIC-BLE/framework/Source/GPUImageScreenBlendFilter.h
  231. +33 −0 TIPIC-BLE/framework/Source/GPUImageScreenBlendFilter.m
  232. +6 −0 TIPIC-BLE/framework/Source/GPUImageSepiaFilter.h
  233. +24 −0 TIPIC-BLE/framework/Source/GPUImageSepiaFilter.m
  234. +12 −0 TIPIC-BLE/framework/Source/GPUImageSharpenFilter.h
  235. +118 −0 TIPIC-BLE/framework/Source/GPUImageSharpenFilter.m
  236. +13 −0 TIPIC-BLE/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.h
  237. +42 −0 TIPIC-BLE/framework/Source/GPUImageShiTomasiFeatureDetectionFilter.m
  238. +5 −0 TIPIC-BLE/framework/Source/GPUImageSingleComponentFastBlurFilter.h
  239. +44 −0 TIPIC-BLE/framework/Source/GPUImageSingleComponentFastBlurFilter.m
  240. +7 −0 TIPIC-BLE/framework/Source/GPUImageSingleComponentGaussianBlurFilter.h
  241. +46 −0 TIPIC-BLE/framework/Source/GPUImageSingleComponentGaussianBlurFilter.m
  242. +11 −0 TIPIC-BLE/framework/Source/GPUImageSketchFilter.h
  243. +57 −0 TIPIC-BLE/framework/Source/GPUImageSketchFilter.m
  244. +28 −0 TIPIC-BLE/framework/Source/GPUImageSmoothToonFilter.h
  245. +94 −0 TIPIC-BLE/framework/Source/GPUImageSmoothToonFilter.m
  246. +13 −0 TIPIC-BLE/framework/Source/GPUImageSobelEdgeDetectionFilter.h
  247. +114 −0 TIPIC-BLE/framework/Source/GPUImageSobelEdgeDetectionFilter.m
  248. +19 −0 TIPIC-BLE/framework/Source/GPUImageSoftEleganceFilter.h
  249. +56 −0 TIPIC-BLE/framework/Source/GPUImageSoftEleganceFilter.m
  250. +7 −0 TIPIC-BLE/framework/Source/GPUImageSoftLightBlendFilter.h
  251. +33 −0 TIPIC-BLE/framework/Source/GPUImageSoftLightBlendFilter.m
  252. +17 −0 TIPIC-BLE/framework/Source/GPUImageSolidColorGenerator.h
  253. +81 −0 TIPIC-BLE/framework/Source/GPUImageSolidColorGenerator.m
  254. +5 −0 TIPIC-BLE/framework/Source/GPUImageSourceOverBlendFilter.h
  255. +32 −0 TIPIC-BLE/framework/Source/GPUImageSourceOverBlendFilter.m
  256. +15 −0 TIPIC-BLE/framework/Source/GPUImageSphereRefractionFilter.h
  257. +135 −0 TIPIC-BLE/framework/Source/GPUImageSphereRefractionFilter.m
  258. +14 −0 TIPIC-BLE/framework/Source/GPUImageStillCamera.h
  259. +274 −0 TIPIC-BLE/framework/Source/GPUImageStillCamera.m
  260. +13 −0 TIPIC-BLE/framework/Source/GPUImageStretchDistortionFilter.h
  261. +71 −0 TIPIC-BLE/framework/Source/GPUImageStretchDistortionFilter.m
  262. +5 −0 TIPIC-BLE/framework/Source/GPUImageSubtractBlendFilter.h
  263. +33 −0 TIPIC-BLE/framework/Source/GPUImageSubtractBlendFilter.m
  264. +17 −0 TIPIC-BLE/framework/Source/GPUImageSwirlFilter.h
  265. +93 −0 TIPIC-BLE/framework/Source/GPUImageSwirlFilter.m
  266. +14 −0 TIPIC-BLE/framework/Source/GPUImageTextureInput.h
  267. +45 −0 TIPIC-BLE/framework/Source/GPUImageTextureInput.m
  268. +16 −0 TIPIC-BLE/framework/Source/GPUImageTextureOutput.h
  269. +64 −0 TIPIC-BLE/framework/Source/GPUImageTextureOutput.m
  270. +12 −0 TIPIC-BLE/framework/Source/GPUImageThresholdEdgeDetection.h
  271. +76 −0 TIPIC-BLE/framework/Source/GPUImageThresholdEdgeDetection.m
  272. +24 −0 TIPIC-BLE/framework/Source/GPUImageTiltShiftFilter.h
  273. +100 −0 TIPIC-BLE/framework/Source/GPUImageTiltShiftFilter.m
  274. +28 −0 TIPIC-BLE/framework/Source/GPUImageToneCurveFilter.h
  275. +533 −0 TIPIC-BLE/framework/Source/GPUImageToneCurveFilter.m
  276. +19 −0 TIPIC-BLE/framework/Source/GPUImageToonFilter.h
  277. +100 −0 TIPIC-BLE/framework/Source/GPUImageToonFilter.m
  278. +16 −0 TIPIC-BLE/framework/Source/GPUImageTransformFilter.h
  279. +217 −0 TIPIC-BLE/framework/Source/GPUImageTransformFilter.m
  280. +20 −0 TIPIC-BLE/framework/Source/GPUImageTwoInputFilter.h
  281. +248 −0 TIPIC-BLE/framework/Source/GPUImageTwoInputFilter.m
  282. +19 −0 TIPIC-BLE/framework/Source/GPUImageTwoPassFilter.h
  283. +276 −0 TIPIC-BLE/framework/Source/GPUImageTwoPassFilter.m
  284. +8 −0 TIPIC-BLE/framework/Source/GPUImageTwoPassTextureSamplingFilter.h
  285. +58 −0 TIPIC-BLE/framework/Source/GPUImageTwoPassTextureSamplingFilter.m
  286. +13 −0 TIPIC-BLE/framework/Source/GPUImageUIElement.h
  287. +98 −0 TIPIC-BLE/framework/Source/GPUImageUIElement.m
  288. +16 −0 TIPIC-BLE/framework/Source/GPUImageUnsharpMaskFilter.h
  289. +78 −0 TIPIC-BLE/framework/Source/GPUImageUnsharpMaskFilter.m
  290. +127 −0 TIPIC-BLE/framework/Source/GPUImageVideoCamera.h
  291. +644 −0 TIPIC-BLE/framework/Source/GPUImageVideoCamera.m
  292. +37 −0 TIPIC-BLE/framework/Source/GPUImageView.h
  293. +455 −0 TIPIC-BLE/framework/Source/GPUImageView.m
  294. +16 −0 TIPIC-BLE/framework/Source/GPUImageVignetteFilter.h
  295. +62 −0 TIPIC-BLE/framework/Source/GPUImageVignetteFilter.m
  296. +10 −0 TIPIC-BLE/framework/Source/GPUImageVoroniConsumerFilter.h
  297. +67 −0 TIPIC-BLE/framework/Source/GPUImageVoroniConsumerFilter.m
  298. +5 −0 TIPIC-BLE/framework/Source/GPUImageWeakPixelInclusionFilter.h
  299. +56 −0 TIPIC-BLE/framework/Source/GPUImageWeakPixelInclusionFilter.m
  300. +17 −0 TIPIC-BLE/framework/Source/GPUImageWhiteBalanceFilter.h
Sorry, we could not display the entire diff because too many files (587) changed.
View
7 Firmware/attributes.txt
@@ -0,0 +1,7 @@
+xgatt_read_temp1 21
+xgatt_read_temp2 25
+xgatt_read_temp3 29
+xgatt_read_temp4 33
+xgatt_read_temp 37
+xgatt_sensor_type 41
+xgatt_read_eeprom 44
View
2  Firmware/build.bat
@@ -0,0 +1,2 @@
+..\..\bin\bgbuild.exe project.xml
+pause
View
104 Firmware/gatt.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
+
+ <service uuid="1800">
+ <description>Generic Access Profile</description>
+
+ <!-- Device Name -->
+ <!-- org.bluetooth.characteristic.gap.device_name -->
+ <characteristic uuid="2a00">
+ <properties read="true" const="true" />
+ <value>IR Camera Accessory</value>
+ </characteristic>
+
+ <!-- Appearance -->
+ <!-- org.bluetooth.characteristic.gap.appearance -->
+ <characteristic uuid="2a01">
+ <properties read="true" const="true" />
+ <value>0000</value>
+ </characteristic>
+ </service>
+
+ <service uuid="180A">
+ <description>Device Information</description>
+
+ <!-- Manufacturer Name String -->
+ <!-- org.bluetooth.characteristic.manufacturer_name_string -->
+ <characteristic uuid="2a29">
+ <properties read="true" const="true" />
+ <value>RH Workshop</value>
+ <description>Manufacturer Name String</description>
+ </characteristic>
+
+ <!-- Model Number String -->
+ <!-- org.bluetooth.characteristic.model_number_string -->
+ <characteristic uuid="2a24">
+ <properties read="true" const="true" />
+ <value>IRCam 0.9.1</value>
+ <description>Model Number String</description>
+ </characteristic>
+
+ <!-- Firmware Revision String -->
+ <!-- org.bluetooth.characteristic.firmware_revision_string -->
+ <characteristic uuid="2a26">
+ <properties read="true" const="true" />
+ <value>0.9.1</value>
+ <description>Firmware Revision String</description>
+ </characteristic>
+
+ <!-- Hardware Revision String -->
+ <!-- org.bluetooth.characteristic.hardware_revision_string -->
+ <characteristic uuid="2a27">
+ <properties read="true" const="true" />
+ <value>REV-A</value>
+ <description>Hardware Revision String</description>
+ </characteristic>
+ </service>
+
+ <service uuid="928f41ba-6e8b-4b17-90ba-3e81fcefb6d0" advertise="true">
+ <description>IR Camera Service</description>
+
+ <characteristic uuid="b9f76bcf-56f3-4c4e-8cf1-b774945f53fa" id="xgatt_read_temp1">
+ <properties read="true" notify="true"/>
+ <value length="16" value="hex" variable_length="false"></value>
+ <description>Read Temp 1</description>
+ </characteristic>
+
+ <characteristic uuid="6de465d5-7c07-4e26-a9d0-c3f444277aca" id="xgatt_read_temp2">
+ <properties read="true" notify="true"/>
+ <value length="16" value="hex" variable_length="false"></value>
+ <description>Read Temp 2</description>
+ </characteristic>
+
+ <characteristic uuid="4491508d-9295-4c90-a6fe-92b222717611" id="xgatt_read_temp3">
+ <properties read="true" notify="true"/>
+ <value length="16" value="hex" variable_length="false"></value>
+ <description>Read Temp 3</description>
+ </characteristic>
+
+ <characteristic uuid="6ba26639-73c4-4426-86c1-b6eded9c64fa" id="xgatt_read_temp4">
+ <properties read="true" notify="true"/>
+ <value length="18" value="hex" variable_length="false"></value>
+ <description>Read Temp 4</description>
+ </characteristic>
+
+ <characteristic uuid="05144cc7-e844-4516-a7c2-dc0afb613b7e" id="xgatt_read_temp">
+ <properties read="true" notify="true"/>
+ <value length="132" value="hex" variable_length="false"></value>
+ <description>Read Temp</description>
+ </characteristic>
+
+ <characteristic uuid="15a539e4-db0f-4870-90f0-42b29ca75b3d" id="xgatt_sensor_type">
+ <properties read="true" />
+ <value length="1" value="hex" variable_length="false"></value>
+ <description>Read Sensor Type</description>
+ </characteristic>
+
+ <characteristic uuid="35a8129a-a34a-421c-82bb-9a5723164b3e" id="xgatt_read_eeprom">
+ <properties read="true" />
+ <value length="255" value="hex" variable_length="false"></value>
+ <description>Read EEPROM</description>
+ </characteristic>
+ </service>
+
+</configuration>
View
9 Firmware/hardware.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<hardware>
+ <sleeposc enable="true" ppm="30" />
+ <usb enable="false" endpoint="none" />
+ <txpower power="10" bias="5" />
+ <script enable="true" />
+
+</hardware>
View
138 Firmware/ircam.bgs
@@ -0,0 +1,138 @@
+#
+# (c) Andy Rawson 2012
+#
+# http://rhworkshop.com
+#
+
+
+dim offset
+dim i
+dim r
+dim r2
+dim r3
+dim t(32)
+dim ptat(2)
+dim vcp(2)
+dim eepromData(32)
+dim configData(5)
+dim oscTrim
+
+const eAddress=$a0
+const rAddress=$c0
+
+#init gap mod, bonding and start freerunning times on system boot
+event system_boot(major ,minor ,patch ,build ,ll_version ,protocol_version ,hw )
+ call gap_set_mode(2,2)
+ call sm_set_bondable_mode(1)
+ call hardware_set_soft_timer(8000,0,0)
+
+ # Set sensor type: 1 = MLX90620 0 = Grid-Eye
+ call attributes_write(xgatt_sensor_type,0,1,1)
+
+ call hardware_i2c_write(eAddress, 1, 1, $F7)(r)
+ call hardware_i2c_read(eAddress,1,1)(r2,r3,oscTrim)
+
+ # Set the Sensor RAM Config
+ configData(0:1)=$03
+ configData(1:1)=$b7
+ configData(2:1)=$0c
+ configData(3:1)=$1f
+ configData(4:1)=$74
+
+ # Set the Sensor RAM OSC Trim
+ call hardware_i2c_write(rAddress, 1, 5, configData(0:5))(r)
+ configData(0:1)=$04
+ configData(1:1)=oscTrim - $AA
+ configData(2:1)=oscTrim
+ configData(3:1)=$56
+ configData(4:1)=$00
+ call hardware_i2c_write(rAddress, 1, 5, configData(0:5))(r)
+
+ # Read the EEPROM Data
+ call hardware_i2c_write(eAddress, 1, 1, $00)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,0,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $20)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,32,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $40)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,64,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $60)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,96,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $80)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,128,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $A0)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,160,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $C0)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,192,32,eepromData(0:32))
+ call hardware_i2c_write(eAddress, 1, 1, $E0)(r)
+ call hardware_i2c_read(eAddress,1,32)(r2,r3,eepromData(0:32))
+ call attributes_write(xgatt_read_eeprom,224,31,eepromData(0:31))
+
+
+end
+
+#timer expired
+event hardware_soft_timer(handle)
+
+ configData(0:1)=$02
+ configData(1:1)=$00
+ configData(2:1)=$01
+ configData(3:1)=$10
+
+ # get the IR Data 1
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,32)(r2,r3,t(0:32))
+
+ call attributes_write(xgatt_read_temp,0,32,t(0:32))
+
+ # get the IR Data 2
+ configData(1:1)=$10
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,32)(r2,r3,t(0:32))
+
+ call attributes_write(xgatt_read_temp,32,32,t(0:32))
+
+ # get the IR Data 3
+ configData(1:1)=$20
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,32)(r2,r3,t(0:32))
+
+ call attributes_write(xgatt_read_temp,64,32,t(0:32))
+
+ # get the IR Data 4
+ configData(1:1)=$30
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,32)(r2,r3,t(0:32))
+
+ call attributes_write(xgatt_read_temp,96,32,t(0:32))
+
+ # Get PTAT data
+ configData(0:1)=$02
+ configData(1:1)=$90
+ configData(2:1)=$00
+ configData(3:1)=$01
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,2)(r2,r3,ptat(0:2))
+ configData(1:1)=$91
+ call hardware_i2c_write(rAddress, 0, 4, configData(0:4))(r)
+ call hardware_i2c_read(rAddress,1,2)(r2,r3,vcp(0:2))
+
+ #call attributes_write(xgatt_ptat,0,1,ptat(0:1))
+ call attributes_write(xgatt_read_temp,128,2,ptat(0:2))
+ call attributes_write(xgatt_read_temp,130,2,vcp(0:2))
+
+end
+
+event connection_disconnected(handle,result)
+ call gap_set_mode(gap_general_discoverable,gap_undirected_connectable)
+end
+
+
+
+
View
8,195 Firmware/out.hex
8,195 additions, 0 deletions not shown
View
7 Firmware/project.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<project>
+ <gatt in="gatt.xml" />
+ <hardware in="hardware.xml" />
+ <script in="ircam.bgs" />
+ <image out="out.hex" />
+</project>
View
1,266 TIPIC-BLE.xcodeproj/project.pbxproj
1,266 additions, 0 deletions not shown
View
16 TIPIC-BLE/BLEThermalSensor.h
@@ -0,0 +1,16 @@
+//
+// BLEThermalSensor.h
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/8/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreBluetooth/CoreBluetooth.h>
+
+@interface BLEThermalSensor : NSObject <CBCentralManagerDelegate> {
+
+}
+
+@end
View
27 TIPIC-BLE/BLEThermalSensor.m
@@ -0,0 +1,27 @@
+//
+// BLEThermalSensor.m
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/8/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import "BLEThermalSensor.h"
+
+@interface BLEThermalSensor()
+{
+ CBCentralManager *centralManager;
+ NSMutableString *mString;
+}
+@end
+
+@implementation BLEThermalSensor
+
+#pragma mark - BLE Central Manager Delegate
+-(void)centralManagerDidUpdateState:(CBCentralManager *)central {
+ [mString appendString:@"centralManagerDidUpdateState\n"];
+}
+
+
+
+@end
View
BIN  TIPIC-BLE/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  TIPIC-BLE/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  TIPIC-BLE/Default@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
19 TIPIC-BLE/MLX90620Math.h
@@ -0,0 +1,19 @@
+//
+// MLX90620Math.h
+// IRPhoneCamera
+//
+// Created by Andy Rawson on 8/25/12.
+// Copyright (c) 2012 RH Workshop.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface MLX90620Math : NSObject
+
+
+-(double)GetTo:(int)sensorReading:(int)sensorID;
+-(double)GetTa:(double)PTAT_data:(int)Vcp_data;
+-(void)setup:(NSArray*)eepromDataArray;
+
+
+@end
View
220 TIPIC-BLE/MLX90620Math.m
@@ -0,0 +1,220 @@
+//
+// MLX90620Math.m
+// IRPhoneCamera
+//
+// Created by Andy Rawson on 8/25/12.
+// Copyright (c) 2012 RH Workshop.
+//
+
+
+#import "MLX90620Math.h"
+
+#define Ta_0 25
+
+@interface MLX90620Math () {
+
+ double Vth, Kt1, Kt2, Ta, Vcp, a0, E, acp, Vcp_Off_Comp, Vir_TGC_Comp;
+
+ int TGC, Acp, Bcp, acp_L, acp_H, Bi_Scale, a0_L, a0_H, a0_Scale, DaScale, E_L, E_H, Vth_L, Vth_H, Kt1_L, Kt1_H, Kt2_L, Kt2_H;
+
+ NSMutableArray *AiData;
+ NSMutableArray *BiData;
+ NSMutableArray *DaData;
+ NSMutableArray *eepromData;
+ NSMutableArray *aData;
+
+}
+@end
+
+@implementation MLX90620Math
+
+#pragma mark - Setup
+
+-(void)setup:(NSArray*)eepromDataArray {
+
+ // Set all the EEPROM settings needed to calculate temperature from the data
+ AiData = [[NSMutableArray alloc] init];
+ BiData = [[NSMutableArray alloc] init];
+ DaData = [[NSMutableArray alloc] init];
+ aData = [[NSMutableArray alloc] init];
+ eepromData = [[NSMutableArray alloc] init];
+ [eepromData addObjectsFromArray:eepromDataArray];
+
+ [AiData addObjectsFromArray:[eepromData subarrayWithRange:NSMakeRange(0, 64)]];
+ [BiData addObjectsFromArray:[eepromData subarrayWithRange:NSMakeRange(64, 64)]];
+ [DaData addObjectsFromArray:[eepromData subarrayWithRange:NSMakeRange(128, 64)]];
+ Acp = [[eepromData objectAtIndex:212] intValue];
+ Bcp = [[eepromData objectAtIndex:213] intValue];
+ acp_L = [[eepromData objectAtIndex:214] intValue];
+ acp_H = [[eepromData objectAtIndex:215] intValue];
+ Bi_Scale = [[eepromData objectAtIndex:217] intValue];
+ a0_L = [[eepromData objectAtIndex:224] intValue];
+ a0_H = [[eepromData objectAtIndex:225] intValue];
+ a0_Scale = [[eepromData objectAtIndex:226] intValue];
+ DaScale = [[eepromData objectAtIndex:227] intValue];
+ E_L = [[eepromData objectAtIndex:228] intValue];
+ E_H = [[eepromData objectAtIndex:229] intValue];
+ Vth_L = [[eepromData objectAtIndex:218] intValue];
+ Vth_H = [[eepromData objectAtIndex:219] intValue];
+ Kt1_L = [[eepromData objectAtIndex:220] intValue];
+ Kt1_H = [[eepromData objectAtIndex:221] intValue];
+ Kt2_L = [[eepromData objectAtIndex:222] intValue];
+ Kt2_H = [[eepromData objectAtIndex:223] intValue];
+ Vth = [self GetVth];
+ Kt1 = [self GetKt1];
+ Kt2 = [self GetKt2];
+ //acp = [self Getacp];
+ a0 = [self Geta0];
+ E = [self GetE];
+ TGC = [[eepromData objectAtIndex:216] intValue];
+
+ [self setupaData];
+
+}
+
+-(void)setupaData {
+
+ for (int i = 0; i < 64; i++) {
+ NSString *sDai = [DaData objectAtIndex:i];
+ double Dai = sDai.intValue;
+ double ra;
+
+ ra = a0/pow(2, a0_Scale) + Dai/pow(2, DaScale);
+
+ [aData addObject:[NSNumber numberWithDouble:ra]];
+ }
+}
+
+#pragma mark - Build Values
+
+-(double)Geta0 {
+ double ra0;
+ double rawa0;
+ rawa0 = (256 * a0_H) + a0_L;
+
+ ra0 = rawa0;
+
+ return ra0;
+}
+
+-(double)GetE {
+ double rE;
+ double rawE;
+ rawE = (256 * E_H) + E_L;
+
+ rE = rawE/32768;
+
+ return rE;
+}
+
+-(double)GetVth {
+ double rVth;
+ double rawVth;
+ rawVth = (256 * Vth_H) + Vth_L;
+
+ if (rawVth > 32767) {
+ rVth = rawVth - 65536;
+ }
+ else {
+ rVth = rawVth;
+ }
+ return rVth;
+}
+
+
+-(double)GetKt1 {
+ double rKt1;
+ double rawKt1;
+ rawKt1 = (256 * Kt1_H) + Kt1_L;
+ if (rawKt1 > 32767) {
+ rKt1 = rawKt1 - 65536;
+ rKt1 = -rKt1/1024;
+ }
+ else {
+ rKt1 = rawKt1/1024;
+ }
+ return rKt1;
+}
+
+-(double)GetKt2 {
+ double rKt2;
+ double rawKt2;
+ rawKt2 = (256 * Kt2_H) + Kt2_L;
+ if (rawKt2 > 32767) {
+ rKt2 = rawKt2 - 65536;
+ rKt2 = rKt2/1048576;
+ }
+ else {
+ rKt2 = rawKt2/1048576;
+ }
+ return rKt2;
+}
+
+#pragma mark - Main Functions
+
+// Tambient calculation - Ta
+-(double)GetTa:(double)PTAT_data:(int)Vcp_data
+ {
+ double rTa = 0;
+ Vcp = Vcp_data;
+ Vcp_Off_Comp = [self GetVcp_Off_Comp];
+
+ rTa = (-Kt1 + pow((((Kt1*Kt1)-4*(Kt2*(Vth - PTAT_data)))),0.5)) / (2*Kt2) + 25;
+ Ta = rTa;
+ return rTa;
+}
+
+// Vcp_Off_Comp
+-(double)GetVcp_Off_Comp{
+ double rVcp_Off_Comp;
+
+ rVcp_Off_Comp = Vcp - (Acp + (Bcp/pow(2, Bi_Scale) * (Ta - Ta_0)));
+
+ return rVcp_Off_Comp;
+}
+
+// Vir_Off_Comp
+-(double)GetVir_Off_Comp:(int)sensorReading:(int)sensorID {
+ double rVir_Off_Comp;
+ int Aii = [[AiData objectAtIndex:sensorID] intValue];
+ int Bii = [[BiData objectAtIndex:sensorID] intValue];
+ if (Bii > 127) Bii = Bii - 256;
+ if (Aii > 127) Aii = Aii - 256;
+
+ rVir_Off_Comp = sensorReading - (Aii + (Bii/pow(2, Bi_Scale) * (Ta - Ta_0)));
+
+ return rVir_Off_Comp;
+}
+
+// Vir_TGC_Comp
+-(double)GetVir_TGC_Comp:(int)sensorReading:(int)sensorID {
+ double rVir_TGC_Comp;
+ double iVir_Off_Comp = [self GetVir_Off_Comp:sensorReading :sensorID];
+
+ rVir_TGC_Comp = iVir_Off_Comp - (TGC / 32)*Vcp_Off_Comp;
+
+ return rVir_TGC_Comp;
+}
+
+// Vir_Compensated
+-(double)GetVir_Compensated:(int)sensorReading:(int)sensorID {
+ double rVir_Compensated;
+ double iVir_TGC_Comp = [self GetVir_TGC_Comp:sensorReading:sensorID];
+
+ rVir_Compensated = iVir_TGC_Comp/E;
+
+ return rVir_Compensated;
+}
+
+// Object Temperature Calculation - To
+-(double)GetTo:(int)sensorReading:(int)sensorID {
+ double rTo = 0;
+ double iVir = [self GetVir_Compensated:(int)sensorReading:(int)sensorID];
+ double ia = [[aData objectAtIndex:sensorID] doubleValue];
+
+ rTo = (pow(iVir/ia + pow((Ta + 273.15),4),0.25))-273.15;
+
+ return rTo;
+}
+
+@end
View
15 TIPIC-BLE/RHAppDelegate.h
@@ -0,0 +1,15 @@
+//
+// RHAppDelegate.h
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/4/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface RHAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
View
46 TIPIC-BLE/RHAppDelegate.m
@@ -0,0 +1,46 @@
+//
+// RHAppDelegate.m
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/4/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import "RHAppDelegate.h"
+
+@implementation RHAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
View
36 TIPIC-BLE/RHViewController.h
@@ -0,0 +1,36 @@
+//
+// RHViewController.h
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/4/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "GPUImage.h"
+#import "MLX90620Math.h"
+#import <CoreBluetooth/CoreBluetooth.h>
+
+@interface RHViewController : UIViewController <CBCentralManagerDelegate, CBPeripheralDelegate, GPUImageVideoCameraDelegate> {
+GPUImageStillCamera *stillCamera;
+GPUImageOutput<GPUImageInput> *filter;
+ GPUImageAlphaBlendFilter *blendFilter;
+}
+- (IBAction)saveButtonAction:(id)sender;
+- (IBAction)blurButton:(UIButton *)sender;
+- (IBAction)autoButton:(UIButton *)sender;
+- (IBAction)rangeMinus:(UIButton *)sender;
+- (IBAction)rangePlus:(UIButton *)sender;
+- (IBAction)midPlusButton:(UIButton *)sender;
+- (IBAction)midMinusButton:(UIButton *)sender;
+- (IBAction)colorButton:(UIButton *)sender;
+- (IBAction)showTempButton:(UIButton *)sender;
+@property (weak, nonatomic) IBOutlet UIButton *autoButtonProperty;
+@property (weak, nonatomic) IBOutlet UILabel *centerTempLabel;
+@property (weak, nonatomic) IBOutlet UILabel *highTempLabel;
+@property (weak, nonatomic) IBOutlet UILabel *lowTempLabel;
+@property (weak, nonatomic) IBOutlet UILabel *connectingLabel;
+
+
+
+@end
View
1,072 TIPIC-BLE/RHViewController.m
@@ -0,0 +1,1072 @@
+//
+// RHViewController.m
+// TIPIC-BLE
+//
+// Created by Andy Rawson on 10/4/12.
+// Copyright (c) 2012 RH Workshop. All rights reserved.
+//
+
+#import "RHViewController.h"
+
+
+@interface RHViewController ()
+
+// Check iPhone device types
+#define IS_IPHONE ( [[[UIDevice currentDevice] model] isEqualToString:@"iPhone"] )
+#define IS_IPOD ( [[[UIDevice currentDevice ] model] isEqualToString:@"iPod touch"] )
+#define IS_HEIGHT_GTE_568 [[UIScreen mainScreen ] bounds].size.height >= 568.0f
+#define IS_IPHONE_5 ( IS_IPHONE && IS_HEIGHT_GTE_568 )
+
+// Temperature color mapping defaults
+#define DEFAULT_HIGH_TEMP 90
+#define DEFAULT_LOW_TEMP 65
+#define DEFAULT_OPACITY 1 // not really used right now
+#define DEFAULT_BLENDMIX 0.8 //opacity of the color overlay
+#define DEFAULT_COLOR_TYPE 1 //1 color, 2 saturation, 3 grey
+
+// List of sensors, bluetooth characteristic xgatt_sensor_type tells the application which one to use
+#define SENSOR_TYPE_MLX90620 1
+#define SENSOR_TYPE_GRID_EYE 0
+
+// average the 4 center readings or just use the upper right center reading
+#define CENTER_TEMP 0
+
+// The UUID of the Thermal Imaging Service and Characteristics
+#define BLE_SERVICE_ID @"928f41ba-6e8b-4b17-90ba-3e81fcefb6d0" // Thermal Imaging Sensor Service
+#define BLE_IR_TEMP_ID @"05144cc7-e844-4516-a7c2-dc0afb613b7e" // xgatt_read_temp
+#define BLE_EEPROM_ID @"35a8129a-a34a-421c-82bb-9a5723164b3e" // xgatt_read_eeprom
+#define BLE_TEMP1_ID @"b9f76bcf-56f3-4c4e-8cf1-b774945f53fa" // xgatt_read_temp1
+#define BLE_TEMP2_ID @"6de465d5-7c07-4e26-a9d0-c3f444277aca" // xgatt_read_temp2
+#define BLE_TEMP3_ID @"4491508d-9295-4c90-a6fe-92b222717611" // xgatt_read_temp3
+#define BLE_TEMP4_ID @"6ba26639-73c4-4426-86c1-b6eded9c64fa" // xgatt_read_temp4
+#define BLE_SENSOR_TYPE @"15a539e4-db0f-4870-90f0-42b29ca75b3d" // xgatt_sensor_type
+
+
+// offset for problem sensor
+#define OFFSET_0 0 //30
+#define OFFSET_1 0 //27
+#define OFFSET_2 0 //28
+#define OFFSET_3 0 //32
+#define OFFSET_4 0 //26
+#define OFFSET_5 0 //22
+#define OFFSET_6 0 //20
+#define OFFSET_7 0 //24
+
+
+{
+ NSTimer *updateTimer;
+ int tempPointHeight;
+ int tempPointWidth;
+ int tempPositionXOffset;
+ int tempPositionYOffset;
+ int sensorFOV;
+ NSString *tempData;
+ NSMutableArray *eepromData;
+ NSMutableArray *sensorData;
+ NSMutableArray *pastSensorData;
+ NSMutableArray *workingSensorData;
+ NSMutableArray *irOffset;
+ NSMutableArray *iSensorData;
+ NSMutableArray *bleServices;
+
+ int autoRanging;
+ int blurOverlay;
+ int showTemp;
+ double centerTemp;
+ double centerTemp1;
+ double centerTemp2;
+ double centerTemp3;
+ double centerTemp4;
+ int autoHighTemp;
+ int autoLowTemp;
+ int colorType;
+ double highTemp;
+ double lowTemp;
+ double opacity;
+ double blendFilterMix;
+ double Ta;
+ double Vth;
+ double Kt1;
+ double Kt2;
+ BOOL waiting;
+ NSString *useHost;
+ int readingCount;
+ int readingType;
+ int newData;
+ GPUImageView *filterView;
+ int sublayerCount;
+
+ MLX90620Math *math;
+
+ CBCentralManager *centralManager;
+ CBPeripheral *blePeripheral;
+ CBService *bleThermalImagingService;
+ CBCharacteristic *bleIRData;
+ CBCharacteristic *bleEEPROMData;
+ CBCharacteristic *bleTemp;
+ CBCharacteristic *bleTemp1;
+ CBCharacteristic *bleTemp2;
+ CBCharacteristic *bleTemp3;
+ CBCharacteristic *bleTemp4;
+ CBCharacteristic *bleSensorType;
+ UIColor *colorArrayTemp[64];
+ int currentSensor;
+}
+@end
+
+@implementation RHViewController
+// GPUImageStillCamera *stillCamera;
+// GPUImageOutput<GPUImageInput> *filter;
+// GPUImageHarrisCornerDetectionFilter *hFilter;
+
+#pragma mark - Initialization
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+ [[self connectingLabel] setHidden:0];
+ [self initializeThings];
+ [self startCamera];
+
+ // Temp fake data init
+ //[self getEEPROMData];
+ //updateTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerMethod) userInfo:nil repeats:YES];
+
+ // BLE Setup
+ centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
+ //peripheral = [[CBPeripheral alloc] init];
+ //bleThermalImagingService = [[CBService alloc] init];
+ [self doScan];
+}
+
+- (void)initializeThings
+{
+
+ tempPointWidth = 40; // Individual sensor point width
+ tempPointHeight = 40; // Individual sensor point height
+ tempPositionXOffset = 100; // Where to start drawing
+ tempPositionYOffset = 280; // Where to start drawing
+ readingCount = 0;
+ readingType = 1; // Read EEPROM data first
+ newData = 0; // Is new IR data available
+
+ waiting = NO;
+ //PTAT = 6848; // Default; Set from Sensor RAM
+ sensorData = [[NSMutableArray alloc] init];
+ eepromData = [[NSMutableArray alloc] init];
+ bleServices = [[NSMutableArray alloc] init];
+ pastSensorData = [[NSMutableArray alloc] init];
+ workingSensorData = [[NSMutableArray alloc] init];
+
+ lowTemp = DEFAULT_LOW_TEMP;
+ highTemp = DEFAULT_HIGH_TEMP;
+ autoHighTemp = DEFAULT_HIGH_TEMP;
+ autoLowTemp = DEFAULT_LOW_TEMP;
+ autoRanging = 1;
+ blurOverlay = 1;
+ showTemp = 1;
+ opacity = DEFAULT_OPACITY;
+ blendFilterMix = DEFAULT_BLENDMIX;
+ colorType = DEFAULT_COLOR_TYPE;
+
+}
+
+- (NSArray*)getColorArrayTemp {
+ if (colorArrayTemp[1] != nil) {
+ NSArray* a = [NSArray arrayWithObjects:colorArrayTemp count:64];
+ return a;
+ }
+ else return nil;
+}
+
+- (void)startCamera
+{
+
+ stillCamera = [[GPUImageStillCamera alloc] init];
+
+ stillCamera.outputImageOrientation = UIInterfaceOrientationLandscapeLeft;
+ [stillCamera forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+ filter = [[GPUImageHarrisCornerDetectionFilter alloc] init];
+ [filter forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+ filterView = (GPUImageView *)self.view;
+
+
+ filterView.fillMode = kGPUImageFillModePreserveAspectRatio;
+
+
+ [stillCamera addTarget:filter];
+
+ GPUImageCrosshairGenerator *crosshairGenerator = [[GPUImageCrosshairGenerator alloc] init];
+ CGFloat sensorSize = 42;
+ crosshairGenerator.crosshairWidth = sensorSize;
+ [crosshairGenerator setBackgroundColorRed:0.5 green:0.5 blue:0.5 alpha:0.5];
+ [crosshairGenerator forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+
+ __weak RHViewController *blockSelf = self;
+ [(GPUImageHarrisCornerDetectionFilter *)filter setCornersDetectedBlock:^(GLfloat* cornerArray, NSUInteger cornersDetected, CMTime frameTime) {
+
+ RHViewController *strongSelf = blockSelf;
+ NSArray* a = [NSArray arrayWithArray:[strongSelf getColorArrayTemp]];
+ UIColor* colorArrayLocal[64];
+ if (a.count > 0) {
+ for (int i = 0; i < 64; i++) {
+ colorArrayLocal[i] = [a objectAtIndex:i];
+ }
+ }
+
+ GLfloat* myArray = calloc(128 * 4, sizeof(GLfloat));
+ CGFloat scaledSensorHeight = (sensorSize/240);
+ CGFloat scaledSensorWidth = (sensorSize/360);
+ CGFloat startC = 0.5 - (scaledSensorWidth * 12);
+ CGFloat startR = 0.5 - (scaledSensorHeight * 2);
+ int rowCount = 0;
+ int colCount = 0;
+ for (int i = 0; i < 64; i++) {
+ myArray[i*2] = (CGFloat)(startC + (colCount * scaledSensorWidth));
+ myArray[i*2+1] = (CGFloat)(startR - (rowCount * scaledSensorHeight));
+ //NSLog(@"array: %f, %f",(startC + (rowCount * scaledSensorWidth)),(startR + (colCount * scaledSensorWidth)));
+
+ if (rowCount <3) {
+ rowCount++;
+ }
+ else {
+ rowCount = 0;
+ colCount++;
+ }
+ }
+ //set the colors
+ GLfloat *colorArray;
+ colorArray = calloc(256 * 4, sizeof(GLfloat));
+ if (colorArrayLocal[1] != nil) {
+
+
+ for (int i = 0; i < 64; i++) {
+
+ CGFloat red;
+ CGFloat green;
+ CGFloat blue;
+ CGFloat alpha;
+ [colorArrayLocal[i] getRed:&red green:&green blue:&blue alpha:&alpha];
+
+ colorArray[i*4] = red;
+ colorArray[i*4+1] = green;
+ colorArray[i*4+2] = blue;
+ colorArray[i*4+3] = alpha;
+ //NSLog(@"%i, %f, %f, %f, %f",i,red, green,blue,alpha);
+ }
+ }
+
+ // fake color data for testing without the sensor
+ //GLfloat *colorArray;
+ //colorArray = calloc(256 * 4, sizeof(GLfloat));
+
+// for (uint32_t i = 0; i < 256; i = i +4) {
+// colorArray[i] = 0;
+// colorArray[i+1] = (i*.01)+.3;
+// colorArray[i+2] = 0;
+// colorArray[i+3] = 1;
+// }
+// colorArray[4] = 0;
+// colorArray[5] = 1;
+// colorArray[8] = 0;
+// colorArray[9] = .5;
+// colorArray[24] = 0;
+// colorArray[25] = .8;
+// colorArray[26] = .6;
+// colorArray[40] = 0;
+// colorArray[41] = 1;
+// colorArray[42] = 1;
+
+
+ [crosshairGenerator renderCrosshairsFromArray:myArray count:64 colors:colorArray frameTime:frameTime];
+
+ }];
+
+
+ GPUImageGaussianBlurFilter *gFilter = [[GPUImageGaussianBlurFilter alloc] init];
+ gFilter.blurSize = 4;
+ [gFilter forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+ blendFilter = [[GPUImageAlphaBlendFilter alloc] init];
+ blendFilter.mix = blendFilterMix;
+ [blendFilter forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+
+ GPUImageGammaFilter *gammaFilter = [[GPUImageGammaFilter alloc] init];
+ [gammaFilter forceProcessingAtSize:CGSizeMake(720.0, 480.0)];
+
+
+ // Add the camera to the blend filter
+ [stillCamera addTarget:gammaFilter];
+ [gammaFilter addTarget:blendFilter];
+
+ // Add the temperature overlay and blur it if needed
+ if (blurOverlay) {
+ [crosshairGenerator addTarget:gFilter];
+ [gFilter addTarget:blendFilter];
+ }
+ else {
+ [crosshairGenerator addTarget:blendFilter];
+ }
+
+ [blendFilter prepareForImageCapture];
+
+ [blendFilter addTarget:filterView];
+
+ [stillCamera startCameraCapture];
+
+
+}
+
+-(void) stopCamera {
+ [stillCamera stopCameraCapture];
+}
+
+#pragma mark - Temperature and Data Handeling
+
+-(void)updateColors {
+ NSString *sVcp = [sensorData objectAtIndex:65];
+ sVcp = [sVcp stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/r/n/r/n"]];
+ int PTAT = [[sensorData objectAtIndex:64] intValue];
+ int Vcp = sVcp.intValue;
+ //NSLog(@"PTAT: %i VCP: %i", PTAT, Vcp);
+ Ta = [math GetTa:PTAT:Vcp];
+ int currentHighTemp = 0;
+ int currentLowTemp = 120;
+
+ [workingSensorData removeAllObjects];
+ [workingSensorData addObjectsFromArray:pastSensorData];
+ [pastSensorData removeAllObjects];
+
+
+ for (int i = 0; i < 64; i++) {
+
+ double temp = [[sensorData objectAtIndex:i] intValue];
+ double ttemp = 0;
+ temp = [math GetTo:temp:i];
+ temp = (temp * 9 / 5) + 32; //convert C to F
+
+ // smooth out small fluctuations in temp
+ [pastSensorData addObject:[NSString stringWithFormat:@"%f", temp]];
+ if (workingSensorData.count > 5) {
+ ttemp = [[workingSensorData objectAtIndex:i] intValue];
+ }
+ if ((temp == ttemp + 1) || (temp == ttemp - 1)) {
+ temp = ttemp;
+ }
+
+
+ // fix for sensor problem
+ switch (i) {
+ case 0:
+ temp = temp + OFFSET_0;
+ break;
+ case 1:
+ temp = temp + OFFSET_1;
+ break;
+ case 2:
+ temp = temp + OFFSET_2;
+ break;
+ case 3:
+ temp = temp + OFFSET_3;
+ break;
+ case 4:
+ temp = temp + OFFSET_4;
+ break;
+ case 5:
+ temp = temp + OFFSET_5;
+ break;
+ case 6:
+ temp = temp + OFFSET_6;
+ break;
+ case 7:
+ temp = temp + OFFSET_7;
+ break;
+ case 29:
+ centerTemp1 = temp;
+ break;
+ case 30:
+ centerTemp2 = temp;
+ break;
+ case 33:
+ centerTemp3 = temp;
+ break;
+ case 34:
+ centerTemp4 = temp;
+ break;
+ default:
+
+ break;
+ }
+ switch (colorType) {
+ case 1:
+ colorArrayTemp[i] = [self mapTempToColor:temp];
+ break;
+ case 2:
+ colorArrayTemp[i] = [self mapTempToSaturation:temp];
+ break;
+ case 3:
+ colorArrayTemp[i] = [self mapTempToGreyscale:temp];
+ break;
+
+ default:
+ break;
+ }
+ //NSLog(@"%i, %i, %@", i, temp, colorArrayTemp[i]);
+
+ if (temp > currentHighTemp){
+ currentHighTemp = temp;
+ }
+ if (temp < currentLowTemp) {
+ currentLowTemp = temp;
+ }
+
+ }
+ if ((currentHighTemp - currentLowTemp) < 25) {
+ autoHighTemp = currentHighTemp + ((25 - (currentHighTemp - currentLowTemp))/2);
+ autoLowTemp = currentLowTemp - ((25 - (currentHighTemp - currentLowTemp))/2);
+ }
+ else {
+ autoHighTemp = currentHighTemp;
+ autoLowTemp = currentLowTemp;
+ }
+
+ self.highTempLabel.text = [NSString stringWithFormat:@"High %d", currentHighTemp];
+ self.lowTempLabel.text = [NSString stringWithFormat:@"Low %d", currentLowTemp];
+
+ if (CENTER_TEMP) {
+ centerTemp = (centerTemp1 + centerTemp2 + centerTemp3 + centerTemp4)/4;
+ }
+ else {
+ centerTemp = centerTemp3;
+ }
+ self.centerTempLabel.text = [NSString stringWithFormat:@"%f", centerTemp];
+}
+
+
+// Map the temperature to color value
+-(float) map:(float)inMin:(float)inMax:(float)outMin:(float)outMax:(float)inValue {
+ float result = 0;
+ result = outMin + (outMax - outMin) * (inValue - inMin) / (inMax - inMin);
+ return result;
+}
+
+- (UIColor *)mapTempToColor:(int)tempValue {
+ // Adjust the ratio to scale the colors that represent temp data
+ CGFloat hue;
+ if (autoRanging) {
+ hue = [self map:autoLowTemp :autoHighTemp :0.75 :0.0 :tempValue]; // 0.0 to 1.0
+ }
+ else {
+ hue = [self map:lowTemp :highTemp :0.75 :0.0 :tempValue]; // 0.0 to 1.0
+ }
+ if (hue >0.75) hue = 0.75;
+ else if (hue < 0.0) hue = 0.0;
+ CGFloat saturation = 1;
+ CGFloat brightness = 1;
+
+ return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:opacity];
+}
+
+- (UIColor *)mapTempToSaturation:(int)tempValue {
+ // Adjust the ratio to scale the colors that represent temp data
+ CGFloat saturation;
+ if (autoRanging) {
+ saturation = [self map:autoLowTemp :autoHighTemp :1.0 :0.0 :tempValue]; // 0.0 to 1.0
+ }
+ else {
+ saturation = [self map:lowTemp :highTemp :1.0 :0.0 :tempValue]; // 0.0 to 1.0
+ }
+ if (saturation > 1.0) saturation = 1.0;
+ else if (saturation < 0.0) saturation = 0.0;
+ CGFloat hue = 1;
+ CGFloat brightness = 0.5;
+
+ return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:opacity];
+}
+
+- (UIColor *)mapTempToGreyscale:(int)tempValue {
+ // Adjust the ratio to scale the colors that represent temp data
+ CGFloat brightness;
+ if (autoRanging) {
+ brightness = [self map:autoLowTemp :autoHighTemp :0.0 :1.0 :tempValue]; // 0.0 to 1.0
+ }
+ else {
+ brightness = [self map:lowTemp :highTemp :0.0 :1.0 :tempValue]; // 0.0 to 1.0
+ }
+ if (brightness >1) brightness = 1;
+ else if (brightness < 0.0) brightness = 0.0;
+ CGFloat hue = 0.17;
+ CGFloat saturation = 0.1;
+
+ return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:opacity];
+}
+
+- (void) processEEPROMData {
+ if (eepromData.count == 255) {
+
+ math = [[MLX90620Math alloc] init];
+
+ //setup the math from the EEPROM
+ [math setup:eepromData];
+ }
+ else {
+ NSLog(@"No EEPROM data received");
+ }
+}
+
+#pragma mark - MLX90620 CALayer stuff
+
+- (void) update:(NSMutableArray*)sensorDataArray {
+ //check if we are saving a snapshot
+ //if (!processingTouchEvent) {
+ //check if a full sensorData frame is available
+ //NSLog(@"ir data count %i",sensorData.count);
+ if (sensorData.count == 66) {
+
+ // Choose the Layer to place the tempdata
+ CALayer *myLayer = filterView.layer;
+
+ NSString *sVcp = [sensorDataArray objectAtIndex:65];
+ sVcp = [sVcp stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/r/n/r/n"]];
+ int PTAT = [[sensorDataArray objectAtIndex:64] intValue];
+ int Vcp = sVcp.intValue;
+ //NSLog(@"PTAT: %i VCP: %i", PTAT, Vcp);
+ Ta = [math GetTa:PTAT:Vcp];
+ int rowCount = 0;
+ int columnCount = 0;
+ int row = tempPositionXOffset + (tempPointHeight * 2);
+ int column = tempPositionYOffset - (tempPointWidth * 7.5);
+ int irDataLoops = 64;
+ //NSLog(@"Ta = %f", Ta);
+
+ if (myLayer.sublayers.count < 5) {
+ sublayerCount = myLayer.sublayers.count;
+ // Loop through the 64 temp readings and add layers to the View
+
+ for (int i = 0; i < irDataLoops; i = i+1) {
+ int temp = [[sensorDataArray objectAtIndex:i] intValue];
+ temp = [math GetTo:temp:i];
+ temp = (temp * 9 / 5) + 32; //convert C to F
+
+ if (i == 34) {
+ // add the single displayed numeric temp reading
+ CATextLayer *sublayer = [CATextLayer layer];
+ sublayer.fontSize = 20;
+ sublayer.string = [NSString stringWithFormat:@"%d", temp] ;
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor ;
+ sublayer.opacity = 1;
+ //sublayer.drawsAsynchronously = YES;
+ [sublayer removeAllAnimations];
+ sublayer.frame = CGRectMake(column, row, tempPointWidth, tempPointHeight );
+
+ [myLayer addSublayer:sublayer];
+ }
+ else {
+ //make new layers then add
+ CATextLayer *sublayer = [CATextLayer layer];
+ //CALayer *sublayer = [CALayer layer];
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor ;
+ sublayer.opacity = 1;
+ sublayer.string = [NSString stringWithFormat:@"%d", temp] ;
+ //sublayer.drawsAsynchronously = YES;
+ [sublayer removeAllAnimations];
+ sublayer.frame = CGRectMake(column, row, tempPointWidth, tempPointHeight);
+ [myLayer addSublayer:sublayer];
+ }// end checking for text point
+
+ // Manage the row and column counts
+ if (rowCount < 3) {
+ rowCount++;
+ row = row - tempPointHeight;
+ }
+ else {
+ rowCount = 0;
+ column = column + tempPointWidth;
+ columnCount++;
+ row = tempPositionXOffset + (tempPointHeight * 2);
+ }
+ } //end for loop
+
+
+ } //end if checking for existing layers
+
+ else {
+ // Loop through the 64 temp readings and update the layers
+ for (int i = 0; i < irDataLoops; i = i+1) {
+
+ int temp = [[sensorDataArray objectAtIndex:i] intValue];
+ //NSLog(@"Reading: %d Raw Data: %f",i,temp);
+ temp = [math GetTo:temp:i];
+ temp = (temp * 9 / 5) + 32; // convert C to F
+ //NSLog(@"Reading: %d Temp: %f",i,temp);
+ if (i == 34) {
+ // change the single displayed numeric temp reading
+ CATextLayer *sublayer = [myLayer.sublayers objectAtIndex:i+sublayerCount];
+ sublayer.fontSize = 20;
+ sublayer.string = [NSString stringWithFormat:@"%d", temp] ;
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor;
+ }
+ else {
+ CATextLayer *sublayer = [myLayer.sublayers objectAtIndex:i+sublayerCount];
+ sublayer.fontSize = 20;
+ sublayer.string = [NSString stringWithFormat:@"%d", temp] ;
+ //CALayer *sublayer = [myLayer.sublayers objectAtIndex:i];
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor;
+ }
+
+
+ // Manage the row and column counts
+ if (rowCount < 3) {
+ rowCount++;
+ row = row - tempPointHeight;
+ }
+ else {
+ rowCount = 0;
+ column = column + tempPointWidth;
+ columnCount++;
+ row = tempPositionXOffset - (tempPointHeight * 1);
+ }
+
+ } //end for loop
+ } //end else
+
+ }// end if sensordata count
+ // } // end if touch event check
+}
+
+// check for or collect new IR Data here - not used
+-(void)timerMethod {
+
+ [blePeripheral readValueForCharacteristic:bleIRData];
+
+}
+
+
+-(void)getEEPROMData {
+ // Parse the EEPROM data and run initial calculations
+ [self processEEPROMData];
+
+}
+
+#pragma mark - Other Stuff
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ //Dispose of any resources that can be recreated.
+}
+
+#pragma mark - BLE Central Manager Delegate
+
+-(void)centralManagerDidUpdateState:(CBCentralManager *)central {
+
+ [self displayState];
+}
+
+-(void)displayState {
+ NSString * str;
+ switch (centralManager.state) {
+ case CBCentralManagerStateUnknown:
+ str = @"Unknown\n";
+ break;
+ case CBCentralManagerStateUnsupported:
+ str = @"Unsupported\n";
+ break;
+ case CBCentralManagerStateUnauthorized:
+ str = @"Unauthorized\n";
+ break;
+ case CBCentralManagerStateResetting:
+ str = @"Resetting\n";
+ break;
+ case CBCentralManagerStatePoweredOn:
+ str = @"PoweredOn\n";
+ break;
+ case CBCentralManagerStatePoweredOff:
+ str = @"PoweredOff\n";
+ break;
+ }
+ NSLog(@"CentralManager State is %@",str);
+}
+
+// Start scanning for the Device
+- (void)doScan {
+
+ CBUUID * ThermalImagingUUID = [CBUUID UUIDWithString:BLE_SERVICE_ID];
+ [centralManager scanForPeripheralsWithServices:[NSArray arrayWithObject:ThermalImagingUUID] options:nil];
+ NSLog(@"Started Scanning");
+}
+
+// Found a Device, connect to it
+-(void) centralManager:(CBCentralManager *)central
+ didDiscoverPeripheral:(CBPeripheral *)peripheral
+ advertisementData:(NSDictionary *)advertisementData
+ RSSI:(NSNumber *)RSSI{
+ NSMutableString * mStr = [[NSMutableString alloc] initWithString:@"Discovered\n"];
+ [mStr appendFormat:@"name: %@\n", peripheral.name];
+ [mStr appendFormat:@"%@\n", CFUUIDCreateString(NULL, peripheral.UUID)];
+ [mStr appendFormat:@"RSSI: %@\n", RSSI];
+ [centralManager stopScan];
+ [mStr appendString:@"Scan Stopped\n"];
+
+ NSLog(@"Peripheral %@",mStr);
+
+
+ blePeripheral = peripheral;
+ [self connectperipheral];
+}
+
+// Connect to the Device
+- (void)connectperipheral {
+ if (blePeripheral == nil) {
+ NSString *message = @"Unable to find Device, please make sure it is turned on";
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Device" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
+ [alert show];
+ return;
+ }
+ else {
+ [blePeripheral setDelegate:self];
+
+ NSLog(@"Connecting to:\n%@\n", CFUUIDCreateString(NULL, blePeripheral.UUID));
+ [centralManager connectPeripheral:blePeripheral options:nil];
+ }
+}
+
+// Connected to the Device, now discover the services
+- (void) centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)peripheral {
+ //peripheral = peripheral;
+
+ CBUUID * ThermalImagingUUID = [CBUUID UUIDWithString:BLE_SERVICE_ID];
+ [blePeripheral discoverServices:[NSArray arrayWithObject:ThermalImagingUUID]];
+ NSLog(@"isConnected: %i\n", peripheral.isConnected);
+
+ [[self connectingLabel] setHidden:1];
+ }
+
+// Found the Service we are looking for, get the Characteristics from it
+-(void) peripheral:(CBPeripheral *)peripheral didDiscoverServices:(NSError *)error {
+ bleThermalImagingService = peripheral.services.lastObject;
+ NSLog(@"Services found: %u\n", peripheral.services.count);
+ [self getAllCharacteristicsFromThermalImagingService:blePeripheral];
+
+}
+
+// Get the Characteristics
+-(void) getAllCharacteristicsFromThermalImagingService:(CBPeripheral *)peripheral {
+ CBUUID * eeUUID = [CBUUID UUIDWithString:BLE_EEPROM_ID];
+ CBUUID * irUUID = [CBUUID UUIDWithString:BLE_IR_TEMP_ID];
+ CBUUID * ttUUID = [CBUUID UUIDWithString:BLE_SENSOR_TYPE];
+
+ [peripheral discoverCharacteristics:[NSArray arrayWithObjects:eeUUID,irUUID,ttUUID, nil] forService:bleThermalImagingService];
+
+}
+
+// Got the Characteristics, assign them and either read the EEPROM from the ML90620 or start reading the data from the Grid-Eye
+-(void) peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(NSError *)error {
+ for (CBCharacteristic *bleCharacteristic in service.characteristics) {
+ if([bleCharacteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_EEPROM_ID]])
+ {
+ bleEEPROMData = bleCharacteristic;
+ NSLog(@"Found EEPROM Characteristic");
+ }
+ else if([bleCharacteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_IR_TEMP_ID]])
+ {
+ bleIRData = bleCharacteristic;
+ NSLog(@"Found IR Temp Array Characteristic");
+ }
+ else if([bleCharacteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_SENSOR_TYPE]])
+ {
+ bleSensorType = bleCharacteristic;
+ NSLog(@"Found Sensor Type Characteristic");
+ }
+ }
+
+ [blePeripheral readValueForCharacteristic:bleSensorType];
+
+
+}
+
+// Fail!
+-(void) centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error {
+
+ NSLog(@"Connection failed:\n%@\n", [error localizedDescription]);
+ [[self connectingLabel] setHidden:0];
+ [self doScan];
+}
+
+// Disconnected
+-(void) centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error {
+ NSLog(@"Disconnected\n");
+ [[self connectingLabel] setHidden:0];
+ [self doScan];
+}
+
+// Got a new value, finish setup or read sensor data
+-(void) peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {
+
+ if([characteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_IR_TEMP_ID]]) {
+ // figure out which sensor is used and process the data
+ if (currentSensor == SENSOR_TYPE_MLX90620) {
+
+ //NSLog(@"Got Temp Data %@", characteristic.value);
+
+ [sensorData removeAllObjects];
+
+ //NSData *da = [NSData dataWithBytes:bytes length:length];
+
+ for (int i = 0; i < 66; i++) {
+
+ // convert to signed integer
+ int *intBytes = (NSInteger*)[[characteristic.value subdataWithRange:NSMakeRange(i*2, 2)] bytes];
+ int raw = CFSwapInt16LittleToHost(*intBytes);
+ if (raw > 32767) {
+ raw = raw - 65536;
+ }
+ //NSLog(@"Raw %i: %i",i, raw);
+
+ [sensorData addObject:[NSString stringWithFormat:@"%d", raw]];
+ }
+ // update the display overlay
+ //[self update:sensorData];
+ [self updateColors];
+ //take another reading
+ [blePeripheral readValueForCharacteristic:bleIRData];
+ }
+
+ else if (currentSensor == SENSOR_TYPE_GRID_EYE) {
+ // update the display overlay
+ [self UpdateGridEye:characteristic.value];
+ }
+
+ }
+ else if([characteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_EEPROM_ID]])
+ {
+ NSLog(@"Got EEPROM Data %@", characteristic.value);
+
+ for (int i = 0; i < 255; i++) {
+ // convert hex to integer
+ int intPtr = *(int *)[[characteristic.value subdataWithRange:NSMakeRange(i, 1)] bytes];
+
+ [eepromData addObject:[NSString stringWithFormat:@"%d", intPtr]];
+
+ }
+
+ [self processEEPROMData];
+ //[blePeripheral readValueForCharacteristic:bleEEPROMData];
+ //[blePeripheral setNotifyValue:YES forCharacteristic:bleTemp1];
+ //[blePeripheral setNotifyValue:YES forCharacteristic:bleTemp2];
+ //[blePeripheral setNotifyValue:YES forCharacteristic:bleTemp3];
+ //[blePeripheral setNotifyValue:YES forCharacteristic:bleTemp4];
+ [blePeripheral readValueForCharacteristic:bleIRData];
+ }
+ else if([characteristic.UUID isEqual:[CBUUID UUIDWithString:BLE_SENSOR_TYPE]]) {
+ int *type = (NSInteger*)[characteristic.value bytes];
+ currentSensor = *type;
+ if (currentSensor == SENSOR_TYPE_MLX90620) {
+ [blePeripheral readValueForCharacteristic:bleEEPROMData];
+ }
+ else if (currentSensor == SENSOR_TYPE_GRID_EYE) {
+ [blePeripheral readValueForCharacteristic:bleTemp];
+ }
+ }
+}
+
+#pragma mark - Grid-Eye Section
+
+-(void)UpdateGridEye:(NSData*)gridEyeData {
+ // Choose the Layer to place the tempdata
+ CALayer *myLayer = filterView.layer;
+
+ int rowCount = 0;
+ int columnCount = 0;
+ int row = tempPositionXOffset + (tempPointHeight * 2);
+ int column = tempPositionYOffset - (tempPointWidth * 7.5);
+ int irDataLoops = 64;
+ //NSLog(@"Ta = %f", Ta);
+
+ if (myLayer.sublayers.count < 5) {
+ // Loop through the 64 temp readings and add layers to the View
+
+ for (int i = 0; i < irDataLoops; i = i+1) {
+ int temp = *(int *)[[gridEyeData subdataWithRange:NSMakeRange(i, 1)] bytes];
+
+ temp = (temp * 9 / 5) + 32; //convert C to F
+
+ if (i == 34) {
+ // add the single displayed numeric temp reading
+ CATextLayer *sublayer = [CATextLayer layer];
+ sublayer.fontSize = 20;
+ sublayer.string = [NSString stringWithFormat:@"%d", temp] ;
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor ;
+ sublayer.opacity = 1;
+ //sublayer.drawsAsynchronously = YES;
+ [sublayer removeAllAnimations];
+ sublayer.frame = CGRectMake(column, row, tempPointWidth, tempPointHeight );
+
+ [myLayer addSublayer:sublayer];
+ }
+ else {
+ //make new layers then add
+ //CATextLayer *sublayer = [CATextLayer layer];
+ CALayer *sublayer = [CALayer layer];
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor ;
+ sublayer.opacity = 1;
+ //sublayer.drawsAsynchronously = YES;
+ [sublayer removeAllAnimations];
+ sublayer.frame = CGRectMake(column, row, tempPointWidth, tempPointHeight);
+
+ [myLayer addSublayer:sublayer];
+ }// end checking for text point
+
+ // Manage the row and column counts
+ if (rowCount < 3) {
+ rowCount++;
+ row = row - tempPointHeight;
+ }
+ else {
+ rowCount = 0;
+ column = column + tempPointWidth;
+ columnCount++;
+ row = tempPositionXOffset + (tempPointHeight * 2);
+ }
+ } //end for loop
+
+
+ } //end if checking for existing layers
+
+ else {
+ // Loop through the 64 temp readings and update the layers
+ for (int i = 0; i < irDataLoops; i = i+1) {
+ int temp = *(int *)[[gridEyeData subdataWithRange:NSMakeRange(i, 1)] bytes];
+
+ NSLog(@"Reading: %d Raw Data: %d",i,temp);
+ temp = [math GetTo:temp:i];
+ temp = (temp * 9 / 5) + 32; // convert C to F
+ NSLog(@"Reading: %d Temp: %d",i,temp);
+ if (i == 34) {
+ // change the single displayed numeric temp reading
+ CATextLayer *sublayer = [myLayer.sublayers objectAtIndex:i];
+ //sublayer.fontSize = 20;
+ //sublayer.string = [NSString stringWithFormat:@"%f", temp] ;
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor;
+ }
+ else {
+ CALayer *sublayer = [myLayer.sublayers objectAtIndex:i];
+ sublayer.backgroundColor = [self mapTempToColor:temp].CGColor;
+ }
+
+
+ // Manage the row and column counts
+ if (rowCount < 3) {
+ rowCount++;
+ row = row - tempPointHeight;
+ }
+ else {
+ rowCount = 0;
+ column = column + tempPointWidth;
+ columnCount++;
+ row = tempPositionXOffset - (tempPointHeight * 1);
+ }
+
+ } //end for loop
+ } //end else
+
+// end if sensordata count
+// } // end if touch event check
+
+
+
+ [blePeripheral readValueForCharacteristic:bleTemp];
+}
+
+#pragma mark - IBActions
+
+- (IBAction)saveButtonAction:(id)sender {
+
+
+ [stillCamera capturePhotoAsImageProcessedUpToFilter:blendFilter withCompletionHandler:^(UIImage *processedImage, NSError *error){
+
+UIImageWriteToSavedPhotosAlbum(processedImage, self, nil, nil);
+
+ {
+ return;
+ }
+ }];
+}
+
+- (IBAction)blurButton:(UIButton *)sender {
+ if (blurOverlay) {
+ blurOverlay = 0;
+ }
+ else {
+ blurOverlay = 1;
+ }
+ [self stopCamera];
+ [self startCamera];
+ NSLog(@"Blur Overlay %i",blurOverlay);
+}
+
+- (IBAction)autoButton:(UIButton *)sender {
+
+ if (autoRanging) {
+ autoRanging = 0;
+ [[self autoButtonProperty] setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+
+ }
+ else {
+ autoHighTemp = DEFAULT_HIGH_TEMP;
+ autoLowTemp = DEFAULT_LOW_TEMP;
+ autoRanging = 1;
+ [[self autoButtonProperty] setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
+
+ }
+ NSLog(@"Auto Ranging %i",autoRanging);
+}
+
+- (IBAction)rangeMinus:(UIButton *)sender {
+ lowTemp = lowTemp + 1;
+ highTemp = highTemp -1;
+ NSLog(@"Low: %f, High: %f",lowTemp,highTemp);
+}
+
+- (IBAction)rangePlus:(UIButton *)sender {
+ lowTemp = lowTemp - 1;
+ highTemp = highTemp + 1;
+ NSLog(@"Low: %f, High: %f",lowTemp,highTemp);
+}
+
+- (IBAction)midPlusButton:(UIButton *)sender {
+ lowTemp = lowTemp + 1;
+ highTemp = highTemp + 1;
+ NSLog(@"Low: %f, High: %f",lowTemp,highTemp);
+}
+
+- (IBAction)midMinusButton:(UIButton *)sender {
+ lowTemp = lowTemp - 1;
+ highTemp = highTemp - 1;
+ NSLog(@"Low: %f, High: %f",lowTemp,highTemp);
+}
+
+- (IBAction)colorButton:(UIButton *)sender {
+ if (colorType == 3) {
+ colorType = 1;
+ }
+ else {
+ colorType++;
+ }
+ NSLog(@"Overlay Color %i",colorType);
+}
+
+- (IBAction)showTempButton:(UIButton *)sender {
+ if (showTemp) {
+ showTemp = 0;
+ [[self centerTempLabel] setHidden:1];
+ }
+ else {
+ showTemp = 1;
+ [[self centerTempLabel] setHidden:0];
+ }
+ NSLog(@"Show Center Temp %i",showTemp);
+}
+
+
+@end
View
38 TIPIC-BLE/TIPIC-BLE-Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.rhworkshop.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 TIPIC-BLE/TIPIC-BLE-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'TIPIC-BLE' target in the 'TIPIC-BLE' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
2  TIPIC-BLE/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
261 TIPIC-BLE/en.lproj/MainStoryboard.storyboard
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2843" systemVersion="11E53" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1929"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="5">
+ <objects>
+ <viewController id="2" customClass="RHViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="3" customClass="GPUImageView">
+ <rect key="frame" x="0.0" y="20" width="568" height="300"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WEK-dY-XIE">
+ <constraints>
+ <constraint firstAttribute="height" constant="36" id="t1q-Vz-iGe"/>
+ </constraints>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Save">
+ <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+ <color key="titleShadowColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color