-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lei Zhang
committed
Apr 5, 2017
1 parent
389264c
commit d8fc42b
Showing
81 changed files
with
3,300 additions
and
124 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
src/AuroraPlugin.o: ../src/AuroraPlugin.cpp ../inc/AuroraPlugin.h \ | ||
../inc/LayoutProcessingUtils.h ../inc/Point.h ../inc/Shape.h \ | ||
../inc/ColorUtils.h ../inc/DataManager.h ../inc/ColorUtils.h \ | ||
../inc/LayoutProcessingUtils.h | ||
|
||
../inc/AuroraPlugin.h: | ||
|
||
../inc/LayoutProcessingUtils.h: | ||
|
||
../inc/Point.h: | ||
|
||
../inc/Shape.h: | ||
|
||
../inc/ColorUtils.h: | ||
|
||
../inc/DataManager.h: | ||
|
||
../inc/ColorUtils.h: | ||
|
||
../inc/LayoutProcessingUtils.h: |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
#define INC_VERSION_H_ | ||
|
||
|
||
#define SDK_VERSION "1.0" | ||
#define SDK_VERSION "1.1" | ||
|
||
|
||
#endif /* INC_VERSION_H_ */ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
default_target: all | ||
################################################################################ | ||
# Automatically-generated file. Do not edit! | ||
################################################################################ | ||
|
||
-include ../makefile.init | ||
|
||
RM := rm -rf | ||
|
||
# All of the sources participating in the build are defined here | ||
-include sources.mk | ||
-include src/subdir.mk | ||
-include subdir.mk | ||
-include objects.mk | ||
|
||
ifneq ($(MAKECMDGOALS),clean) | ||
ifneq ($(strip $(CC_DEPS)),) | ||
-include $(CC_DEPS) | ||
endif | ||
ifneq ($(strip $(C++_DEPS)),) | ||
-include $(C++_DEPS) | ||
endif | ||
ifneq ($(strip $(C_UPPER_DEPS)),) | ||
-include $(C_UPPER_DEPS) | ||
endif | ||
ifneq ($(strip $(CXX_DEPS)),) | ||
-include $(CXX_DEPS) | ||
endif | ||
ifneq ($(strip $(C_DEPS)),) | ||
-include $(C_DEPS) | ||
endif | ||
ifneq ($(strip $(CPP_DEPS)),) | ||
-include $(CPP_DEPS) | ||
endif | ||
endif | ||
|
||
-include ../makefile.defs | ||
|
||
# Add inputs and outputs from these tool invocations to the build variables | ||
|
||
# All Target | ||
all: libDiffuseColour.so | ||
|
||
# Tool invocations | ||
libDiffuseColour.so: $(OBJS) $(USER_OBJS) | ||
@echo 'Building target: $@' | ||
@echo 'Invoking: Cross G++ Linker' | ||
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -shared -o "libDiffuseColour.so" $(OBJS) $(USER_OBJS) $(LIBS) | ||
@echo 'Finished building target: $@' | ||
@echo ' ' | ||
|
||
# Other Targets | ||
clean: | ||
-$(RM) $(LIBRARIES)$(CC_DEPS)$(C++_DEPS)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(C_DEPS)$(CPP_DEPS) libDiffuseColour.so | ||
-@echo ' ' | ||
|
||
.PHONY: all clean dependents | ||
.SECONDARY: | ||
|
||
-include ../makefile.targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
################################################################################ | ||
# Automatically-generated file. Do not edit! | ||
################################################################################ | ||
|
||
USER_OBJS := | ||
|
||
LIBS := -lPluginUtilities | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
################################################################################ | ||
# Automatically-generated file. Do not edit! | ||
################################################################################ | ||
|
||
C_UPPER_SRCS := | ||
CXX_SRCS := | ||
C++_SRCS := | ||
OBJ_SRCS := | ||
CC_SRCS := | ||
ASM_SRCS := | ||
C_SRCS := | ||
CPP_SRCS := | ||
O_SRCS := | ||
S_UPPER_SRCS := | ||
LIBRARIES := | ||
CC_DEPS := | ||
C++_DEPS := | ||
OBJS := | ||
C_UPPER_DEPS := | ||
CXX_DEPS := | ||
C_DEPS := | ||
CPP_DEPS := | ||
|
||
# Every subdirectory with source files must be described here | ||
SUBDIRS := \ | ||
src \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
src/AuroraPlugin.o: ../src/AuroraPlugin.cpp ../inc/AuroraPlugin.h \ | ||
../inc/LayoutProcessingUtils.h ../inc/Point.h ../inc/Shape.h \ | ||
../inc/ColorUtils.h ../inc/DataManager.h ../inc/ColorUtils.h \ | ||
../inc/LayoutProcessingUtils.h | ||
|
||
../inc/AuroraPlugin.h: | ||
|
||
../inc/LayoutProcessingUtils.h: | ||
|
||
../inc/Point.h: | ||
|
||
../inc/Shape.h: | ||
|
||
../inc/ColorUtils.h: | ||
|
||
../inc/DataManager.h: | ||
|
||
../inc/ColorUtils.h: | ||
|
||
../inc/LayoutProcessingUtils.h: |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
################################################################################ | ||
# Automatically-generated file. Do not edit! | ||
################################################################################ | ||
|
||
# Add inputs and outputs from these tool invocations to the build variables | ||
CPP_SRCS += \ | ||
../src/AuroraPlugin.cpp | ||
|
||
OBJS += \ | ||
./src/AuroraPlugin.o | ||
|
||
CPP_DEPS += \ | ||
./src/AuroraPlugin.d | ||
|
||
|
||
# Each subdirectory must supply rules for building sources it contributes | ||
src/%.o: ../src/%.cpp | ||
@echo 'Building file: $<' | ||
@echo 'Invoking: Cross G++ Compiler' | ||
g++ -I../inc -O0 -g3 -Wall -c -fmessage-length=0 -std=gnu++11 -fPIC -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" | ||
@echo 'Finished building: $<' | ||
@echo ' ' | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Copyright 2017 Nanoleaf Ltd. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
/* | ||
* AuroraPlugin.h | ||
* | ||
* Created on: Feb 12, 2017 | ||
* Author: eski | ||
*/ | ||
|
||
#ifndef SRC_AURORAPLUGIN_H_ | ||
#define SRC_AURORAPLUGIN_H_ | ||
|
||
#include <stdint.h> | ||
|
||
struct SoundFeature_t { | ||
int nFFTBins; /*number of bins in this feature*/ | ||
uint8_t* fftBins; /*the buffer storing the fft*/ | ||
uint16_t energy; /*energy of the sound wave captured*/ | ||
}; | ||
|
||
struct SoundFeatureRequest_t { | ||
bool fft; /*set if fft is required*/ | ||
bool energy; /*set if energy is required*/ | ||
int nFftBins; /*number of fft bins required, max 32*/ | ||
SoundFeatureRequest_t(){ | ||
fft = false; | ||
energy = false; | ||
nFftBins = 0; | ||
} | ||
}; | ||
|
||
struct Frame_t { | ||
int panelId; /*the panelId that this frame element targets*/ | ||
int r, g, b; /*the rgb color that it must transition to*/ | ||
int transTime; /*time taken to transition to specified color - in multiples of 100ms*/ | ||
}; | ||
|
||
#endif /* SRC_AURORAPLUGIN_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
Copyright 2017 Nanoleaf Ltd. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
/* | ||
* RGBUtils.h | ||
* | ||
* Created on: Feb 12, 2017 | ||
* Author: eski | ||
*/ | ||
|
||
#ifndef UTILITIES_RGBUTILS_H_ | ||
#define UTILITIES_RGBUTILS_H_ | ||
|
||
struct RGB_t{ | ||
int R, G, B; | ||
}; | ||
|
||
struct HSV_t { | ||
int H, S, V; | ||
}; | ||
|
||
/** | ||
* @description: Helper Function | ||
*/ | ||
void parseColor(int* colorByteStream, int nColors, RGB_t** rgb); | ||
|
||
/** | ||
* @description: Convert Color from HSV colorspace to RGB colorspace | ||
* @params HSV: color to convert from ... | ||
* @params RGB: ... color to convert to | ||
*/ | ||
void HSVtoRGB(HSV_t hsv, RGB_t* rgb); | ||
|
||
/** | ||
* @description: Convert Color from RGB colorspace to HSV colorspace | ||
* @params RGB: color to convert from ... | ||
* @params HSV: ... color to convert to | ||
*/ | ||
void RGBtoHSV(RGB_t rgb, HSV_t* hsv); | ||
|
||
/** | ||
* helper function | ||
*/ | ||
void freeColor(RGB_t* rgb); | ||
|
||
/** | ||
* Operator overloads to help with RGB manipulation | ||
*/ | ||
RGB_t operator+ (const RGB_t& l, const RGB_t& r); | ||
RGB_t operator- (const RGB_t& l, const RGB_t& r); | ||
RGB_t operator* (const RGB_t& l, int m); | ||
RGB_t operator* (int m, const RGB_t& l); | ||
RGB_t operator/ (const RGB_t& l, float d); | ||
RGB_t limitRGB(const RGB_t& c, int max, int min); | ||
|
||
|
||
#endif /* UTILITIES_RGBUTILS_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright 2017 Nanoleaf Ltd. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
/* | ||
* DataManger.h | ||
* | ||
* Created on: Feb 13, 2017 | ||
* Author: eski | ||
*/ | ||
|
||
#ifndef INC_DATAMANAGER_H_ | ||
#define INC_DATAMANAGER_H_ | ||
|
||
#include "ColorUtils.h" | ||
#include "LayoutProcessingUtils.h" | ||
|
||
/* | ||
* @description: get the color palette | ||
* @params palette: a pointer that will point to a statically allocated buffer holding the colorPalette in it | ||
* Do NOT free this buffer. Data Manager will handle this for you | ||
* @params nColors: a pointer that will be filled with the number of colors in the palette | ||
*/ | ||
void getColorPalette(RGB_t** palette, int* nColors); | ||
|
||
/** | ||
* @description: get the layoutData | ||
* @return: a pointer to a statically allocated object of LayoutData | ||
* Do NOT free this object. Data Manager will handle this for you | ||
*/ | ||
LayoutData* getLayoutData(); | ||
|
||
|
||
#endif /* INC_DATAMANAGER_H_ */ |
Oops, something went wrong.