Added phrase priority to the settings
This commit is contained in:
parent
5ba251012d
commit
2190051274
|
@ -392,7 +392,6 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
bool SendMotorCommand = false;
|
bool SendMotorCommand = false;
|
||||||
blumen_packet MotorCommand = {};
|
blumen_packet MotorCommand = {};
|
||||||
|
|
||||||
r64 PhraseGroupingTime = 1.0f;
|
|
||||||
while (MessageQueue_CanRead(BLState->IncomingMsgQueue))
|
while (MessageQueue_CanRead(BLState->IncomingMsgQueue))
|
||||||
{
|
{
|
||||||
gs_data PacketData = MessageQueue_Read(&BLState->IncomingMsgQueue);
|
gs_data PacketData = MessageQueue_Read(&BLState->IncomingMsgQueue);
|
||||||
|
@ -410,7 +409,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
{
|
{
|
||||||
BLState->NextHotHue = NewHue;
|
BLState->NextHotHue = NewHue;
|
||||||
if (SecondsElapsed(BLState->TimePhraseReceptionBegan,
|
if (SecondsElapsed(BLState->TimePhraseReceptionBegan,
|
||||||
Context->SystemTime_Current) > PhraseGroupingTime)
|
Context->SystemTime_Current) > PhrasePriorityMessageGroupingTime)
|
||||||
{
|
{
|
||||||
BLState->TimePhraseReceptionBegan = Context->SystemTime_Current;
|
BLState->TimePhraseReceptionBegan = Context->SystemTime_Current;
|
||||||
BLState->InPhraseReceptionMode = true;
|
BLState->InPhraseReceptionMode = true;
|
||||||
|
@ -470,7 +469,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
if (BLState->InPhraseReceptionMode)
|
if (BLState->InPhraseReceptionMode)
|
||||||
{
|
{
|
||||||
r32 SecondsSincePhraseBegan = SecondsElapsed(BLState->TimePhraseReceptionBegan, Context->SystemTime_Current);
|
r32 SecondsSincePhraseBegan = SecondsElapsed(BLState->TimePhraseReceptionBegan, Context->SystemTime_Current);
|
||||||
if (SecondsSincePhraseBegan > PhraseGroupingTime)
|
if (SecondsSincePhraseBegan > PhrasePriorityMessageGroupingTime)
|
||||||
{
|
{
|
||||||
// if we are in standard color mode, shift all flowers to the new color
|
// if we are in standard color mode, shift all flowers to the new color
|
||||||
// otherwise, only shift the next flower in the sequence to the new color
|
// otherwise, only shift the next flower in the sequence to the new color
|
||||||
|
|
|
@ -141,6 +141,8 @@ r32 FullBrightnessPercent = 1.0f;
|
||||||
// 2 is 2x as fast.
|
// 2 is 2x as fast.
|
||||||
r32 GlobalAnimSpeed = 1.0f;
|
r32 GlobalAnimSpeed = 1.0f;
|
||||||
|
|
||||||
|
r64 PhrasePriorityMessageGroupingTime = 1.0f;
|
||||||
|
|
||||||
// How often should Lumenarium send its status to the python server?
|
// How often should Lumenarium send its status to the python server?
|
||||||
//
|
//
|
||||||
#define STATUS_PACKET_FREQ_SECONDS 10 // in seconds
|
#define STATUS_PACKET_FREQ_SECONDS 10 // in seconds
|
||||||
|
|
Loading…
Reference in New Issue