on site edits
This commit is contained in:
parent
b32ca1d092
commit
d6eabfe3ac
|
@ -4,7 +4,7 @@ layers_count: 3;
|
|||
blocks_count: 4;
|
||||
playable_range:{
|
||||
min: 0;
|
||||
max: 2000;
|
||||
max: 10000;
|
||||
};
|
||||
layers:{
|
||||
layer:{
|
||||
|
@ -24,7 +24,7 @@ blocks:{
|
|||
block:{
|
||||
frame_range:{
|
||||
min: 0;
|
||||
max: 2000;
|
||||
max: 19;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_BulbMask";
|
||||
|
@ -32,7 +32,7 @@ blocks:{
|
|||
block:{
|
||||
frame_range:{
|
||||
min: 0;
|
||||
max: 2000;
|
||||
max: 10000;
|
||||
};
|
||||
layer_index: 1;
|
||||
animation_name: "Pattern_Leafy";
|
||||
|
@ -40,15 +40,15 @@ blocks:{
|
|||
block:{
|
||||
frame_range:{
|
||||
min: 0;
|
||||
max: 1032;
|
||||
max: 5156;
|
||||
};
|
||||
layer_index: 2;
|
||||
animation_name: "Pattern_Rainbow";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 959;
|
||||
max: 2000;
|
||||
min: 5040;
|
||||
max: 10000;
|
||||
};
|
||||
layer_index: 2;
|
||||
animation_name: "Pattern_Wavy";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
lumenarium_animation_file;
|
||||
animation_name: "wavy_0";
|
||||
layers_count: 2;
|
||||
blocks_count: 1;
|
||||
blocks_count: 2;
|
||||
playable_range:{
|
||||
min: 0;
|
||||
max: 7200;
|
||||
|
@ -9,11 +9,11 @@ playable_range:{
|
|||
layers:{
|
||||
layer:{
|
||||
name: "[New Layer]";
|
||||
blend: "Add";
|
||||
blend: "Overwrite";
|
||||
};
|
||||
layer:{
|
||||
name: "Color";
|
||||
blend: "Add";
|
||||
blend: "Multiply";
|
||||
};
|
||||
};
|
||||
blocks:{
|
||||
|
@ -25,4 +25,12 @@ blocks:{
|
|||
layer_index: 1;
|
||||
animation_name: "Pattern_Wavy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 78;
|
||||
max: 3571;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Leafy";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
lumenarium_animation_file;
|
||||
animation_name: "demo_anim";
|
||||
layers_count: 2;
|
||||
blocks_count: 14;
|
||||
playable_range:{
|
||||
min: 0;
|
||||
max: 10000;
|
||||
};
|
||||
layers:{
|
||||
layer:{
|
||||
name: "main";
|
||||
blend: "Add";
|
||||
};
|
||||
layer:{
|
||||
name: "color";
|
||||
blend: "Multiply";
|
||||
};
|
||||
};
|
||||
blocks:{
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 2428;
|
||||
max: 3017;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_HueShift";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 1711;
|
||||
max: 2487;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Rainbow";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 0;
|
||||
max: 603;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_VerticalLines";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 2945;
|
||||
max: 3656;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Wavy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 3592;
|
||||
max: 4296;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Patchy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 520;
|
||||
max: 1225;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Rotary";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 4218;
|
||||
max: 4939;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_LeafyPatchy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 4849;
|
||||
max: 5431;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_HueShift";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 1149;
|
||||
max: 1819;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Leafy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 5529;
|
||||
max: 7782;
|
||||
};
|
||||
layer_index: 1;
|
||||
animation_name: "Pattern_Wavy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 5529;
|
||||
max: 5979;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Leafy";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 5912;
|
||||
max: 6328;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_VerticalLines";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 6281;
|
||||
max: 6581;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_Rotary";
|
||||
};
|
||||
block:{
|
||||
frame_range:{
|
||||
min: 6524;
|
||||
max: 7025;
|
||||
};
|
||||
layer_index: 0;
|
||||
animation_name: "Pattern_HueShift";
|
||||
};
|
||||
};
|
|
@ -328,7 +328,7 @@ Pattern_Leafy(led_buffer* Leds, led_buffer_range Range, assembly Assembly, r32 T
|
|||
{
|
||||
DEBUG_TRACK_FUNCTION;
|
||||
blumen_lumen_state* BLState = (blumen_lumen_state*)UserData;
|
||||
Time = Time * BLState->PatternSpeed;
|
||||
Time = Time * BLState->PatternSpeed * .3f;
|
||||
|
||||
phrase_hue Hue = BlumenLumen_GetCurrentHue(BLState, Assembly);
|
||||
v4 C0 = RGBFromPhraseHue(Hue.Hue0);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -574,6 +574,8 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (BLState->InPhraseReceptionMode)
|
||||
{
|
||||
r32 SecondsSincePhraseBegan = SecondsElapsed(BLState->TimePhraseReceptionBegan, Context->SystemTime_Current);
|
||||
|
@ -759,7 +761,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
|||
}
|
||||
|
||||
// Dim the leds based on temp data
|
||||
if (!BLState->DEBUG_IgnoreWeatherDimmingLeds)
|
||||
if (false && !BLState->DEBUG_IgnoreWeatherDimmingLeds)
|
||||
{
|
||||
for (u32 i = 0; i < State->LedSystem.BuffersCount; i++)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ global time_range LedOnTimes[] = {
|
|||
{ 00, 00, 06, 30 },
|
||||
};
|
||||
global u32 LedOnTimesCount = CArrayLength(LedOnTimes); // do not edit
|
||||
global b8 DEBUGIgnoreLedOnTimeRange = true;
|
||||
global b8 DEBUGIgnoreLedOnTimeRange = false;
|
||||
|
||||
// How long it takes to fade from the default pattern to the
|
||||
// voice activated pattern
|
||||
|
|
|
@ -22,163 +22,163 @@ global log_buffer* GlobalLogBuffer;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
v3 CenterStart;
|
||||
v3 CenterEnd;
|
||||
r32 Radius;
|
||||
u32 SegmentsCount;
|
||||
u32 SubsegmentsCount;
|
||||
u32 SubsegmentLeds;
|
||||
|
||||
// SACN
|
||||
u32 SACNUniverseStart;
|
||||
u32 SACNChannelStart;
|
||||
|
||||
// UART
|
||||
// Only one of these two values is needed.
|
||||
// If ChannelsArray != 0, then it will be used, and assumed to
|
||||
// have SegmentsCount values
|
||||
// Otherwise, each segment will increment from ChannelStart
|
||||
u32 ChannelStart;
|
||||
u32* ChannelsArray;
|
||||
|
||||
char* ComPort;
|
||||
char* SectionTagValue;
|
||||
char* FlowerTagValue;
|
||||
v3 CenterStart;
|
||||
v3 CenterEnd;
|
||||
r32 Radius;
|
||||
u32 SegmentsCount;
|
||||
u32 SubsegmentsCount;
|
||||
u32 SubsegmentLeds;
|
||||
|
||||
// SACN
|
||||
u32 SACNUniverseStart;
|
||||
u32 SACNChannelStart;
|
||||
|
||||
// UART
|
||||
// Only one of these two values is needed.
|
||||
// If ChannelsArray != 0, then it will be used, and assumed to
|
||||
// have SegmentsCount values
|
||||
// Otherwise, each segment will increment from ChannelStart
|
||||
u32 ChannelStart;
|
||||
u32* ChannelsArray;
|
||||
|
||||
char* ComPort;
|
||||
char* SectionTagValue;
|
||||
char* FlowerTagValue;
|
||||
} loop_desc;
|
||||
|
||||
internal void
|
||||
BuildLoop(gs_string* OutputBuffer, loop_desc Desc)
|
||||
{
|
||||
r32 SegmentsArc = TauR32 / Desc.SegmentsCount;
|
||||
r32 SubsegmentsArc = SegmentsArc / Desc.SubsegmentsCount;
|
||||
|
||||
for (u32 i = 0; i < Desc.SegmentsCount; i++)
|
||||
{
|
||||
r32 ArcBase = SegmentsArc * i;
|
||||
r32 SegmentsArc = TauR32 / Desc.SegmentsCount;
|
||||
r32 SubsegmentsArc = SegmentsArc / Desc.SubsegmentsCount;
|
||||
|
||||
u32 Channel = 0;
|
||||
if (Desc.ChannelsArray != 0)
|
||||
for (u32 i = 0; i < Desc.SegmentsCount; i++)
|
||||
{
|
||||
Channel = Desc.ChannelsArray[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
Channel = Desc.ChannelStart + i;
|
||||
r32 ArcBase = SegmentsArc * i;
|
||||
|
||||
u32 Channel = 0;
|
||||
if (Desc.ChannelsArray != 0)
|
||||
{
|
||||
Channel = Desc.ChannelsArray[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
Channel = Desc.ChannelStart + i;
|
||||
}
|
||||
|
||||
WriteLedStripOpen(OutputBuffer, Channel, Desc.ComPort,
|
||||
Desc.SACNUniverseStart, Desc.SACNChannelStart);
|
||||
WriteSegmentSequenceOpen(OutputBuffer, Desc.SubsegmentsCount);
|
||||
|
||||
for (u32 j = 0; j < Desc.SubsegmentsCount; j++)
|
||||
{
|
||||
r32 Arc = ArcBase + (SubsegmentsArc * j);
|
||||
v3 Offset = v3{ SinR32(Arc), 0, CosR32(Arc) } * Desc.Radius;
|
||||
v3 P0 = Desc.CenterStart + Offset;
|
||||
v3 P1 = Desc.CenterEnd + Offset;
|
||||
|
||||
// Swap directions on the middle strip
|
||||
if (j%2 != 0)
|
||||
{
|
||||
v3 Temp = P0;
|
||||
P0 = P1;
|
||||
P1 = Temp;
|
||||
}
|
||||
|
||||
WriteSegmentSequenceSegment(OutputBuffer, P0, P1, Desc.SubsegmentLeds);
|
||||
}
|
||||
|
||||
WriteSegmentSequenceClose(OutputBuffer);
|
||||
WriteSegmentTagsOpen(OutputBuffer, 2);
|
||||
WriteSegmentTag(OutputBuffer, "section", Desc.SectionTagValue);
|
||||
WriteSegmentTag(OutputBuffer, "flower", Desc.FlowerTagValue);
|
||||
WriteSegmentTagsClose(OutputBuffer);
|
||||
WriteLedStripClose(OutputBuffer);
|
||||
}
|
||||
|
||||
WriteLedStripOpen(OutputBuffer, Channel, Desc.ComPort,
|
||||
Desc.SACNUniverseStart, Desc.SACNChannelStart);
|
||||
WriteSegmentSequenceOpen(OutputBuffer, Desc.SubsegmentsCount);
|
||||
|
||||
for (u32 j = 0; j < Desc.SubsegmentsCount; j++)
|
||||
{
|
||||
r32 Arc = ArcBase + (SubsegmentsArc * j);
|
||||
v3 Offset = v3{ SinR32(Arc), 0, CosR32(Arc) } * Desc.Radius;
|
||||
v3 P0 = Desc.CenterStart + Offset;
|
||||
v3 P1 = Desc.CenterEnd + Offset;
|
||||
|
||||
// Swap directions on the middle strip
|
||||
if (j%2 != 0)
|
||||
{
|
||||
v3 Temp = P0;
|
||||
P0 = P1;
|
||||
P1 = Temp;
|
||||
}
|
||||
|
||||
WriteSegmentSequenceSegment(OutputBuffer, P0, P1, Desc.SubsegmentLeds);
|
||||
}
|
||||
|
||||
WriteSegmentSequenceClose(OutputBuffer);
|
||||
WriteSegmentTagsOpen(OutputBuffer, 2);
|
||||
WriteSegmentTag(OutputBuffer, "section", Desc.SectionTagValue);
|
||||
WriteSegmentTag(OutputBuffer, "flower", Desc.FlowerTagValue);
|
||||
WriteSegmentTagsClose(OutputBuffer);
|
||||
WriteLedStripClose(OutputBuffer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
v3 Pos;
|
||||
char* ComPort;
|
||||
char* FlowerTagValue;
|
||||
|
||||
// SACN
|
||||
u32 SACNStemInnerStartUniverse;
|
||||
u32 SACNStemOuterStartUniverse;
|
||||
u32 SACNFlowerStemStartUniverse;
|
||||
|
||||
// UART
|
||||
u32* StemChannels;
|
||||
u32* BloomOuterChannels;
|
||||
u32* BloomInnerChannels;
|
||||
v3 Pos;
|
||||
char* ComPort;
|
||||
char* FlowerTagValue;
|
||||
|
||||
// SACN
|
||||
u32 SACNStemInnerStartUniverse;
|
||||
u32 SACNStemOuterStartUniverse;
|
||||
u32 SACNFlowerStemStartUniverse;
|
||||
|
||||
// UART
|
||||
u32* StemChannels;
|
||||
u32* BloomOuterChannels;
|
||||
u32* BloomInnerChannels;
|
||||
} flower_desc;
|
||||
|
||||
internal u32
|
||||
BuildFlower(gs_string* OutputBuffer, flower_desc Desc)
|
||||
{
|
||||
|
||||
|
||||
#if 1
|
||||
// the bloom stem inner
|
||||
loop_desc BloomStemInner = {};
|
||||
BloomStemInner.CenterStart = v3{0, 1.4f, 0};
|
||||
BloomStemInner.CenterEnd = v3{0, .9f, 0};
|
||||
BloomStemInner.Radius = .05f;
|
||||
//BloomStemInner.SegmentsCount = 6;
|
||||
BloomStemInner.SegmentsCount = 1;
|
||||
BloomStemInner.SubsegmentsCount = 3;
|
||||
BloomStemInner.SubsegmentLeds = 35;
|
||||
BloomStemInner.SACNUniverseStart = Desc.SACNStemInnerStartUniverse;
|
||||
BloomStemInner.SACNChannelStart = 1;
|
||||
BloomStemInner.ChannelsArray = Desc.BloomInnerChannels;
|
||||
BloomStemInner.ComPort = Desc.ComPort;
|
||||
BloomStemInner.SectionTagValue = "inner_bloom";
|
||||
BloomStemInner.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, BloomStemInner);
|
||||
|
||||
// the bloom stem outer
|
||||
loop_desc BloomStemOuter = {};
|
||||
BloomStemOuter.CenterStart = v3{0, .5f, 0};
|
||||
BloomStemOuter.CenterEnd = v3{0, .9f, 0};
|
||||
BloomStemOuter.Radius = .07f;
|
||||
//BloomStemOuter.SegmentsCount = 9;
|
||||
BloomStemOuter.SegmentsCount = 1;
|
||||
BloomStemOuter.SubsegmentsCount = 3;
|
||||
BloomStemOuter.SubsegmentLeds = 41;
|
||||
BloomStemOuter.SACNUniverseStart = Desc.SACNStemOuterStartUniverse;
|
||||
BloomStemOuter.SACNChannelStart = 1;
|
||||
BloomStemOuter.ChannelsArray = Desc.BloomOuterChannels;
|
||||
BloomStemOuter.ComPort = Desc.ComPort;
|
||||
BloomStemOuter.SectionTagValue = "outer_bloom";
|
||||
BloomStemOuter.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, BloomStemOuter);
|
||||
// the bloom stem inner
|
||||
loop_desc BloomStemInner = {};
|
||||
BloomStemInner.CenterStart = v3{0, 1.4f, 0};
|
||||
BloomStemInner.CenterEnd = v3{0, .9f, 0};
|
||||
BloomStemInner.Radius = .05f;
|
||||
//BloomStemInner.SegmentsCount = 6;
|
||||
BloomStemInner.SegmentsCount = 1;
|
||||
BloomStemInner.SubsegmentsCount = 3;
|
||||
BloomStemInner.SubsegmentLeds = 35;
|
||||
BloomStemInner.SACNUniverseStart = Desc.SACNStemInnerStartUniverse;
|
||||
BloomStemInner.SACNChannelStart = 1;
|
||||
BloomStemInner.ChannelsArray = Desc.BloomInnerChannels;
|
||||
BloomStemInner.ComPort = Desc.ComPort;
|
||||
BloomStemInner.SectionTagValue = "inner_bloom";
|
||||
BloomStemInner.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, BloomStemInner);
|
||||
|
||||
// the bloom stem outer
|
||||
loop_desc BloomStemOuter = {};
|
||||
BloomStemOuter.CenterStart = v3{0, .5f, 0};
|
||||
BloomStemOuter.CenterEnd = v3{0, .9f, 0};
|
||||
BloomStemOuter.Radius = .07f;
|
||||
//BloomStemOuter.SegmentsCount = 9;
|
||||
BloomStemOuter.SegmentsCount = 1;
|
||||
BloomStemOuter.SubsegmentsCount = 3;
|
||||
BloomStemOuter.SubsegmentLeds = 41;
|
||||
BloomStemOuter.SACNUniverseStart = Desc.SACNStemOuterStartUniverse;
|
||||
BloomStemOuter.SACNChannelStart = 1;
|
||||
BloomStemOuter.ChannelsArray = Desc.BloomOuterChannels;
|
||||
BloomStemOuter.ComPort = Desc.ComPort;
|
||||
BloomStemOuter.SectionTagValue = "outer_bloom";
|
||||
BloomStemOuter.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, BloomStemOuter);
|
||||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
// the flower stem
|
||||
loop_desc FlowerStem = {};
|
||||
FlowerStem.CenterStart = v3{0, -1.5f, 0};
|
||||
FlowerStem.CenterEnd = v3{0, .5f, 0};
|
||||
FlowerStem.Radius = .05f;
|
||||
//FlowerStem.SegmentsCount = 6;
|
||||
FlowerStem.SegmentsCount = 1;
|
||||
FlowerStem.SubsegmentsCount = 1;
|
||||
FlowerStem.SubsegmentLeds = 300;
|
||||
FlowerStem.SACNUniverseStart = Desc.SACNFlowerStemStartUniverse;
|
||||
FlowerStem.SACNChannelStart = 1;
|
||||
FlowerStem.ChannelsArray = Desc.StemChannels;
|
||||
FlowerStem.ComPort = Desc.ComPort;
|
||||
FlowerStem.SectionTagValue = "stem";
|
||||
FlowerStem.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, FlowerStem);
|
||||
// the flower stem
|
||||
loop_desc FlowerStem = {};
|
||||
FlowerStem.CenterStart = v3{0, .5f, 0};
|
||||
FlowerStem.CenterEnd = v3{0, -1.5f, 0};
|
||||
FlowerStem.Radius = .05f;
|
||||
//FlowerStem.SegmentsCount = 6;
|
||||
FlowerStem.SegmentsCount = 1;
|
||||
FlowerStem.SubsegmentsCount = 1;
|
||||
FlowerStem.SubsegmentLeds = 300;
|
||||
FlowerStem.SACNUniverseStart = Desc.SACNFlowerStemStartUniverse;
|
||||
FlowerStem.SACNChannelStart = 1;
|
||||
FlowerStem.ChannelsArray = Desc.StemChannels;
|
||||
FlowerStem.ComPort = Desc.ComPort;
|
||||
FlowerStem.SectionTagValue = "stem";
|
||||
FlowerStem.FlowerTagValue = Desc.FlowerTagValue;
|
||||
BuildLoop(OutputBuffer, FlowerStem);
|
||||
#endif
|
||||
|
||||
u32 StripsCount = BloomStemInner.SegmentsCount;
|
||||
StripsCount += BloomStemOuter.SegmentsCount;
|
||||
StripsCount += FlowerStem.SegmentsCount;
|
||||
|
||||
return StripsCount;
|
||||
|
||||
u32 StripsCount = BloomStemInner.SegmentsCount;
|
||||
StripsCount += BloomStemOuter.SegmentsCount;
|
||||
StripsCount += FlowerStem.SegmentsCount;
|
||||
|
||||
return StripsCount;
|
||||
}
|
||||
|
||||
// Just for brevity, no real function provided
|
||||
|
@ -186,116 +186,116 @@ BuildFlower(gs_string* OutputBuffer, flower_desc Desc)
|
|||
internal u8
|
||||
FlowerStripToChannel(u8 Flower, u8 Channel)
|
||||
{
|
||||
Assert(Flower < 3);
|
||||
Assert(Channel < 8);
|
||||
|
||||
u8 Result = 0;
|
||||
Result |= (Flower & 0x03) << 3;
|
||||
Result |= (Channel & 0x07);
|
||||
|
||||
return Result;
|
||||
Assert(Flower < 3);
|
||||
Assert(Channel < 8);
|
||||
|
||||
u8 Result = 0;
|
||||
Result |= (Flower & 0x03) << 3;
|
||||
Result |= (Channel & 0x07);
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
int main(int ArgCount, char** Args)
|
||||
{
|
||||
gs_thread_context Ctx = Win32CreateThreadContext();
|
||||
GlobalLogBuffer = PushStruct(Ctx.Transient, log_buffer);
|
||||
*GlobalLogBuffer = Log_Init(Ctx.Transient, 32);
|
||||
|
||||
gs_string OutputBuffer0 = PushString(Ctx.Transient, MB(4));
|
||||
gs_string OutputBuffer1 = PushString(Ctx.Transient, MB(4));
|
||||
gs_string OutputBuffer2 = PushString(Ctx.Transient, MB(4));
|
||||
|
||||
u32 StripCount = 3; // used to be 21
|
||||
gs_thread_context Ctx = Win32CreateThreadContext();
|
||||
GlobalLogBuffer = PushStruct(Ctx.Transient, log_buffer);
|
||||
*GlobalLogBuffer = Log_Init(Ctx.Transient, 32);
|
||||
|
||||
gs_string OutputBuffer0 = PushString(Ctx.Transient, MB(4));
|
||||
gs_string OutputBuffer1 = PushString(Ctx.Transient, MB(4));
|
||||
gs_string OutputBuffer2 = PushString(Ctx.Transient, MB(4));
|
||||
|
||||
u32 StripCount = 3; // used to be 21
|
||||
#if 0
|
||||
WriteAssemblyUARTOpen(&OutputBuffer0,
|
||||
"Blumen Lumen - Silver Spring - 00",
|
||||
100,
|
||||
v3{-1, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
WriteAssemblyUARTOpen(&OutputBuffer1,
|
||||
"Blumen Lumen - Silver Spring - 01",
|
||||
100,
|
||||
v3{0, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
WriteAssemblyUARTOpen(&OutputBuffer2,
|
||||
"Blumen Lumen - Silver Spring - 02",
|
||||
100,
|
||||
v3{1, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
WriteAssemblyUARTOpen(&OutputBuffer0,
|
||||
"Blumen Lumen - Silver Spring - 00",
|
||||
100,
|
||||
v3{-1, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
WriteAssemblyUARTOpen(&OutputBuffer1,
|
||||
"Blumen Lumen - Silver Spring - 01",
|
||||
100,
|
||||
v3{0, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
WriteAssemblyUARTOpen(&OutputBuffer2,
|
||||
"Blumen Lumen - Silver Spring - 02",
|
||||
100,
|
||||
v3{1, 0, 0},
|
||||
StripCount,
|
||||
"");
|
||||
#else
|
||||
WriteAssemblySACNOpen(&OutputBuffer0,
|
||||
"Blumen Lumen - Silver Spring - 00",
|
||||
100,
|
||||
v3{-1, 0, 0},
|
||||
StripCount);
|
||||
WriteAssemblySACNOpen(&OutputBuffer1,
|
||||
"Blumen Lumen - Silver Spring - 01",
|
||||
100,
|
||||
v3{0, 0, 0},
|
||||
StripCount);
|
||||
WriteAssemblySACNOpen(&OutputBuffer2,
|
||||
"Blumen Lumen - Silver Spring - 02",
|
||||
100,
|
||||
v3{1, 0, 0},
|
||||
StripCount);
|
||||
WriteAssemblySACNOpen(&OutputBuffer0,
|
||||
"Blumen Lumen - Silver Spring - 00",
|
||||
100,
|
||||
v3{-1, 0, 0},
|
||||
StripCount);
|
||||
WriteAssemblySACNOpen(&OutputBuffer1,
|
||||
"Blumen Lumen - Silver Spring - 01",
|
||||
100,
|
||||
v3{0, 0, 0},
|
||||
StripCount);
|
||||
WriteAssemblySACNOpen(&OutputBuffer2,
|
||||
"Blumen Lumen - Silver Spring - 02",
|
||||
100,
|
||||
v3{1, 0, 0},
|
||||
StripCount);
|
||||
#endif
|
||||
|
||||
u32 StripCountOut = 0;
|
||||
|
||||
u32 StemChannels[] = { FSC(2, 1), FSC(2, 2), FSC(2, 3), FSC(2, 4), FSC(2, 5), FSC(2, 6) };
|
||||
u32 BloomOuterChannels[] = { FSC(1, 0), FSC(1, 1), FSC(1, 2), FSC(1, 3), FSC(1, 4), FSC(1, 5), FSC(1, 6), FSC(1, 7), FSC(2, 0) };
|
||||
u32 BloomInnerChannels[] = { FSC(0, 0), FSC(0, 1), FSC(0, 2), FSC(0, 3), FSC(0, 4), FSC(0, 5) };
|
||||
flower_desc F0 = {};
|
||||
F0.Pos = v3{0, 0, 0};
|
||||
F0.ComPort = "\\\\.\\COM11";
|
||||
F0.FlowerTagValue = "left";
|
||||
F0.SACNStemInnerStartUniverse = 4;
|
||||
F0.SACNStemOuterStartUniverse = 3;
|
||||
F0.SACNFlowerStemStartUniverse = 1;
|
||||
F0.StemChannels = StemChannels;
|
||||
F0.BloomOuterChannels = BloomOuterChannels;
|
||||
F0.BloomInnerChannels = BloomInnerChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer0, F0);
|
||||
|
||||
flower_desc F1 = {};
|
||||
F1.Pos = v3{0, 0, 0};
|
||||
F1.ComPort = "\\\\.\\COM12";
|
||||
F1.FlowerTagValue = "center";
|
||||
F1.SACNStemInnerStartUniverse = 9;
|
||||
F1.SACNStemOuterStartUniverse = 8;
|
||||
F1.SACNFlowerStemStartUniverse = 6;
|
||||
F1.StemChannels = StemChannels;
|
||||
F1.BloomInnerChannels = BloomInnerChannels;
|
||||
F1.BloomOuterChannels = BloomOuterChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer1, F1);
|
||||
|
||||
flower_desc F2 = {};
|
||||
F2.Pos = v3{0, 0, 0};
|
||||
F2.ComPort = "\\\\.\\COM6";
|
||||
F2.FlowerTagValue = "right";
|
||||
F2.SACNStemInnerStartUniverse = 14;
|
||||
F2.SACNStemOuterStartUniverse = 13;
|
||||
F2.SACNFlowerStemStartUniverse = 11;
|
||||
F2.StemChannels = StemChannels;
|
||||
F2.BloomInnerChannels = BloomInnerChannels;
|
||||
F2.BloomOuterChannels = BloomOuterChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer2, F2);
|
||||
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_one.fold"), StringToData(OutputBuffer0));
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_two.fold"), StringToData(OutputBuffer1));
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_three.fold"), StringToData(OutputBuffer2));
|
||||
|
||||
//printf("%.*s\n", (u32)OutputBuffer.Length, OutputBuffer.Str);
|
||||
//printf("%d\n", StripCount);
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
u32 StripCountOut = 0;
|
||||
|
||||
u32 StemChannels[] = { FSC(2, 1), FSC(2, 2), FSC(2, 3), FSC(2, 4), FSC(2, 5), FSC(2, 6) };
|
||||
u32 BloomOuterChannels[] = { FSC(1, 0), FSC(1, 1), FSC(1, 2), FSC(1, 3), FSC(1, 4), FSC(1, 5), FSC(1, 6), FSC(1, 7), FSC(2, 0) };
|
||||
u32 BloomInnerChannels[] = { FSC(0, 0), FSC(0, 1), FSC(0, 2), FSC(0, 3), FSC(0, 4), FSC(0, 5) };
|
||||
flower_desc F0 = {};
|
||||
F0.Pos = v3{0, 0, 0};
|
||||
F0.ComPort = "\\\\.\\COM11";
|
||||
F0.FlowerTagValue = "left";
|
||||
F0.SACNStemInnerStartUniverse = 4;
|
||||
F0.SACNStemOuterStartUniverse = 3;
|
||||
F0.SACNFlowerStemStartUniverse = 1;
|
||||
F0.StemChannels = StemChannels;
|
||||
F0.BloomOuterChannels = BloomOuterChannels;
|
||||
F0.BloomInnerChannels = BloomInnerChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer0, F0);
|
||||
|
||||
flower_desc F1 = {};
|
||||
F1.Pos = v3{0, 0, 0};
|
||||
F1.ComPort = "\\\\.\\COM12";
|
||||
F1.FlowerTagValue = "center";
|
||||
F1.SACNStemInnerStartUniverse = 9;
|
||||
F1.SACNStemOuterStartUniverse = 8;
|
||||
F1.SACNFlowerStemStartUniverse = 6;
|
||||
F1.StemChannels = StemChannels;
|
||||
F1.BloomInnerChannels = BloomInnerChannels;
|
||||
F1.BloomOuterChannels = BloomOuterChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer1, F1);
|
||||
|
||||
flower_desc F2 = {};
|
||||
F2.Pos = v3{0, 0, 0};
|
||||
F2.ComPort = "\\\\.\\COM6";
|
||||
F2.FlowerTagValue = "right";
|
||||
F2.SACNStemInnerStartUniverse = 14;
|
||||
F2.SACNStemOuterStartUniverse = 13;
|
||||
F2.SACNFlowerStemStartUniverse = 11;
|
||||
F2.StemChannels = StemChannels;
|
||||
F2.BloomInnerChannels = BloomInnerChannels;
|
||||
F2.BloomOuterChannels = BloomOuterChannels;
|
||||
StripCountOut += BuildFlower(&OutputBuffer2, F2);
|
||||
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_one.fold"), StringToData(OutputBuffer0));
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_two.fold"), StringToData(OutputBuffer1));
|
||||
WriteEntireFile(Ctx.FileHandler, ConstString("data/ss_blumen_three.fold"), StringToData(OutputBuffer2));
|
||||
|
||||
//printf("%.*s\n", (u32)OutputBuffer.Length, OutputBuffer.Str);
|
||||
//printf("%d\n", StripCount);
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue