Added phrase priority to the settings

This commit is contained in:
PS 2021-04-08 06:19:07 -07:00
parent 5ba251012d
commit 2190051274
2 changed files with 4 additions and 3 deletions

View File

@ -392,7 +392,6 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
bool SendMotorCommand = false;
blumen_packet MotorCommand = {};
r64 PhraseGroupingTime = 1.0f;
while (MessageQueue_CanRead(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;
if (SecondsElapsed(BLState->TimePhraseReceptionBegan,
Context->SystemTime_Current) > PhraseGroupingTime)
Context->SystemTime_Current) > PhrasePriorityMessageGroupingTime)
{
BLState->TimePhraseReceptionBegan = Context->SystemTime_Current;
BLState->InPhraseReceptionMode = true;
@ -470,7 +469,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
if (BLState->InPhraseReceptionMode)
{
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
// otherwise, only shift the next flower in the sequence to the new color

View File

@ -141,6 +141,8 @@ r32 FullBrightnessPercent = 1.0f;
// 2 is 2x as fast.
r32 GlobalAnimSpeed = 1.0f;
r64 PhrasePriorityMessageGroupingTime = 1.0f;
// How often should Lumenarium send its status to the python server?
//
#define STATUS_PACKET_FREQ_SECONDS 10 // in seconds