Skip to content

Commit

Permalink
release 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lei Zhang committed Apr 5, 2017
1 parent 389264c commit d8fc42b
Show file tree
Hide file tree
Showing 81 changed files with 3,300 additions and 124 deletions.
Binary file added AuroraPluginTemplate/Debug/libAuroraPlugin.so
Binary file not shown.
1 change: 1 addition & 0 deletions AuroraPluginTemplate/Debug/makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
default_target: all
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
Expand Down
20 changes: 20 additions & 0 deletions AuroraPluginTemplate/Debug/src/AuroraPlugin.d
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 added AuroraPluginTemplate/Debug/src/AuroraPlugin.o
Binary file not shown.
Binary file modified AuroraPluginTemplate/Utilities/libPluginUtilities.a
Binary file not shown.
2 changes: 1 addition & 1 deletion AuroraPluginTemplate/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define INC_VERSION_H_


#define SDK_VERSION "1.0"
#define SDK_VERSION "1.1"


#endif /* INC_VERSION_H_ */
Binary file added Examples/DiffuseColour/Debug/libDiffuseColour.so
Binary file not shown.
60 changes: 60 additions & 0 deletions Examples/DiffuseColour/Debug/makefile
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
8 changes: 8 additions & 0 deletions Examples/DiffuseColour/Debug/objects.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
################################################################################
# Automatically-generated file. Do not edit!
################################################################################

USER_OBJS :=

LIBS := -lPluginUtilities

27 changes: 27 additions & 0 deletions Examples/DiffuseColour/Debug/sources.mk
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 \

20 changes: 20 additions & 0 deletions Examples/DiffuseColour/Debug/src/AuroraPlugin.d
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 added Examples/DiffuseColour/Debug/src/AuroraPlugin.o
Binary file not shown.
24 changes: 24 additions & 0 deletions Examples/DiffuseColour/Debug/src/subdir.mk
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.
52 changes: 52 additions & 0 deletions Examples/DiffuseColour/inc/AuroraPlugin.h
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_ */
70 changes: 70 additions & 0 deletions Examples/DiffuseColour/inc/ColorUtils.h
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_ */
46 changes: 46 additions & 0 deletions Examples/DiffuseColour/inc/DataManager.h
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_ */
Loading

0 comments on commit d8fc42b

Please sign in to comment.