Skip to content

Commit

Permalink
Release 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lei Zhang committed Jan 16, 2018
1 parent b1cc455 commit 52e62f5
Show file tree
Hide file tree
Showing 98 changed files with 1,165 additions and 556 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.cproject
.project
.settings/
*.pyc
*.DS_STORE
Binary file added AnimationProcessor.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion AuroraPluginTemplate/Debug/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all: libAuroraPlugin.so
libAuroraPlugin.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -u _getEnabledFeatures -u _initRhythmFeatures -u _updateRhythmFeatures -u _deinitRhythmFeatures -u _initBeatFeatures -u _updateBeatFeatures -u _deinitBeatFeatures -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
g++ -Wl,--whole-archive -L../Utilities -lPluginUtilities -Wl,--no-whole-archive -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand Down
Binary file modified AuroraPluginTemplate/Utilities/libPluginUtilities.a
Binary file not shown.
4 changes: 3 additions & 1 deletion AuroraPluginTemplate/inc/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#ifndef INC_LOGGER_H_
#define INC_LOGGER_H_

#define LOGGING_ENABLED
#include <stdio.h>

//#define LOGGING_ENABLED

#ifdef LOGGING_ENABLED
#define PRINTLOG(format, ...) printf(format, ##__VA_ARGS__)
Expand Down
2 changes: 2 additions & 0 deletions AuroraPluginTemplate/inc/PluginFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ void enableEnergy(void);
void enableFft(uint16_t nFftBins);
void enableDistance(void);
void enableSpeed(void); // get motion speed in m/s
void enableMel(void);
uint16_t getEnergy(void);
uint8_t *getFftBins(void);
uint8_t getDistance(void);
uint8_t getSpeed(void);
uint8_t *getMelBins(void);

/* ----------------------------------
* BEAT FEATURE FUNCTIONS
Expand Down
18 changes: 18 additions & 0 deletions AuroraPluginTemplate/inc/PluginOptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef PLUGIN_OPTIONS_H
#define PLUGIN_OPTIONS_H

const char* pluginOptionsJsonString = "{\"options\": [{\"defaultValue\": 15, \"minValue\": 1, \"type\": \"int\", \"name\": \"transTime\", \"maxValue\": 600}]}";

#ifdef __cplusplus
extern "C" {
#endif

const char* getPluginOptionsJsonString(){
return pluginOptionsJsonString;
}

#ifdef __cplusplus
}
#endif

#endif
23 changes: 23 additions & 0 deletions AuroraPluginTemplate/inc/PluginOptionsManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* PluginOptionsManager.h
*
* Created on: Jul 25, 2017
* Author: eski
*/

#ifndef INC_PLUGINOPTIONSMANAGER_H_
#define INC_PLUGINOPTIONSMANAGER_H_

#define PLUGIN_OPTIONS_ERROR_OPTION_NO_EXIST -10
#define PLUGIN_OPTIONS_ERROR_WRONG_OPTION_TYPE -11

#include <string>


int getOptionValue(const char* name, int& value);
int getOptionValue(const char* name, bool& value);
int getOptionValue(const char* name, double& value);
int getOptionValue(const char* name, std::string & value);


#endif /* INC_PLUGINOPTIONSMANAGER_H_ */
2 changes: 1 addition & 1 deletion AuroraPluginTemplate/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define INC_VERSION_H_


#define SDK_VERSION "2.0"
#define SDK_VERSION "2.2"


#endif /* INC_VERSION_H_ */
5 changes: 4 additions & 1 deletion AuroraPluginTemplate/src/AuroraPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@


#include "AuroraPlugin.h"

#include "../inc/PluginFeatures.h"
#include "LayoutProcessingUtils.h"
#include "ColorUtils.h"
#include "DataManager.h"
#include "PluginFeatures.h"
#include "Logger.h"
#include "PluginOptionsManager.h"
// #include "PluginOptions.h" /**< uncomment for Plugin Options */

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 1 addition & 0 deletions Examples/Converge/Converge.opt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"palette": [{"hue": 227, "saturation": 100, "brightness": 99}, {"hue": 182, "saturation": 100, "brightness": 100}, {"hue": 125, "saturation": 100, "brightness": 93}, {"hue": 62, "saturation": 100, "brightness": 100}, {"hue": 31, "saturation": 100, "brightness": 100}, {"hue": 2, "saturation": 100, "brightness": 100}, {"hue": 307, "saturation": 100, "brightness": 100}], "pluginType": "color", "pluginUuid": "c6e98ebc-dfb3-4f5e-a6cb-f63907278379", "version": "1.0", "animType": "plugin", "animName": "Converge", "colorType": "HSB"}
Binary file added Examples/Converge/Debug/libAuroraPlugin.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all: libAuroraPlugin.so
libAuroraPlugin.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -u _getEnabledFeatures -u _initRhythmFeatures -u _updateRhythmFeatures -u _deinitRhythmFeatures -u _initBeatFeatures -u _updateBeatFeatures -u _deinitBeatFeatures -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
g++ -Wl,--whole-archive -L../Utilities -lPluginUtilities -Wl,--no-whole-archive -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
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/PluginFeatures.h ../inc/Logger.h
../inc/LayoutProcessingUtils.h ../inc/PluginFeatures.h ../inc/Logger.h \
../inc/PluginOptionsManager.h ../inc/PluginOptions.h

../inc/AuroraPlugin.h:

Expand All @@ -22,3 +23,7 @@ src/AuroraPlugin.o: ../src/AuroraPlugin.cpp ../inc/AuroraPlugin.h \
../inc/PluginFeatures.h:

../inc/Logger.h:

../inc/PluginOptionsManager.h:

../inc/PluginOptions.h:
Binary file added Examples/Converge/Debug/src/AuroraPlugin.o
Binary file not shown.
File renamed without changes.
Binary file added Examples/Converge/Utilities/libPluginUtilities.a
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions Examples/Converge/inc/PluginOptions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef PLUGIN_OPTIONS_H
#define PLUGIN_OPTIONS_H

const char* pluginOptionsJsonString = "{\"options\": [{\"defaultValue\": 15, \"minValue\": 1, \"type\": \"int\", \"name\": \"transTime\", \"maxValue\": 600}]}";

#ifdef __cplusplus
extern "C" {
#endif

const char* getPluginOptionsJsonString(){
return pluginOptionsJsonString;
}

#ifdef __cplusplus
}
#endif

#endif
23 changes: 23 additions & 0 deletions Examples/Converge/inc/PluginOptionsManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* PluginOptionsManager.h
*
* Created on: Jul 25, 2017
* Author: eski
*/

#ifndef INC_PLUGINOPTIONSMANAGER_H_
#define INC_PLUGINOPTIONSMANAGER_H_

#define PLUGIN_OPTIONS_ERROR_OPTION_NO_EXIST -10
#define PLUGIN_OPTIONS_ERROR_WRONG_OPTION_TYPE -11

#include <string>


int getOptionValue(const char* name, int& value);
int getOptionValue(const char* name, bool& value);
int getOptionValue(const char* name, double& value);
int getOptionValue(const char* name, std::string & value);


#endif /* INC_PLUGINOPTIONSMANAGER_H_ */
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define INC_VERSION_H_


#define SDK_VERSION "2.0"
#define SDK_VERSION "2.2"


#endif /* INC_VERSION_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "DataManager.h"
#include "PluginFeatures.h"
#include "Logger.h"
#include "PluginOptionsManager.h"
#include "PluginOptions.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -55,6 +57,8 @@ void initPlugin(){
//grab the layout data, this function returns a pointer to a statically allocated buffer. Safe to call as many time as required.
//Dont delete this pointer. The memory is managed automatically.
LayoutData* layoutData = getLayoutData();

getOptionValue("transTime", transTime);

rotateAuroraPanels(layoutData, &layoutData->globalOrientation);

Expand Down
Binary file added Examples/FrequencyStars/Debug/libAuroraPlugin.so
Binary file not shown.
2 changes: 1 addition & 1 deletion Examples/FrequencyStars/Debug/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ all: libFrequencyStars.so
libFrequencyStars.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -u _getEnabledFeatures -u _initRhythmFeatures -u _updateRhythmFeatures -u _deinitRhythmFeatures -u _initBeatFeatures -u _updateBeatFeatures -u _deinitBeatFeatures -shared -o "libFrequencyStars.so" $(OBJS) $(USER_OBJS) $(LIBS)
g++ -Wl,--whole-archive -L../Utilities -lPluginUtilities -Wl,--no-whole-archive -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand Down
Binary file modified Examples/FrequencyStars/Debug/src/AuroraPlugin.o
Binary file not shown.
Binary file modified Examples/FrequencyStars/Utilities/libPluginUtilities.a
Binary file not shown.
Binary file modified Examples/RhythmicNorthernLights/Debug/libAuroraPlugin.so
Binary file not shown.
2 changes: 1 addition & 1 deletion Examples/RhythmicNorthernLights/Debug/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all: libAuroraPlugin.so
libAuroraPlugin.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -u _getEnabledFeatures -u _initRhythmFeatures -u _updateRhythmFeatures -u _deinitRhythmFeatures -u _initBeatFeatures -u _updateBeatFeatures -u _deinitBeatFeatures -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
g++ -Wl,--whole-archive -L../Utilities -lPluginUtilities -Wl,--no-whole-archive -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand Down
Binary file modified Examples/RhythmicNorthernLights/Debug/src/AuroraPlugin.o
Binary file not shown.
Binary file modified Examples/RhythmicNorthernLights/Utilities/libPluginUtilities.a
Binary file not shown.
Binary file modified Examples/Soda/Debug/libAuroraPlugin.so
Binary file not shown.
2 changes: 1 addition & 1 deletion Examples/Soda/Debug/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ all: libAuroraPlugin.so
libAuroraPlugin.so: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cross G++ Linker'
g++ -L../Utilities -u _passLayoutData -u _passColorPalette -u _dataManagerCleanup -u _getEnabledFeatures -u _initRhythmFeatures -u _updateRhythmFeatures -u _deinitRhythmFeatures -u _initBeatFeatures -u _updateBeatFeatures -u _deinitBeatFeatures -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
g++ -Wl,--whole-archive -L../Utilities -lPluginUtilities -Wl,--no-whole-archive -shared -o "libAuroraPlugin.so" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '

Expand Down
Binary file modified Examples/Soda/Debug/src/AuroraPlugin.o
Binary file not shown.
Binary file modified Examples/Soda/Utilities/libPluginUtilities.a
Binary file not shown.
Loading

0 comments on commit 52e62f5

Please sign in to comment.