Fix for exiting voice mode and resuming other animations
This commit is contained in:
parent
f809d670fb
commit
9ebadc543b
|
@ -290,6 +290,10 @@ BlumenLumen_UpdateLog(app_state* State, blumen_lumen_state* BLState, context Con
|
||||||
animation* CurrAnim = AnimationSystem_GetActiveAnimation(&State->AnimationSystem);
|
animation* CurrAnim = AnimationSystem_GetActiveAnimation(&State->AnimationSystem);
|
||||||
AppendPrintF(&FileStr, "Curr Animation: %S\n", CurrAnim->Name);
|
AppendPrintF(&FileStr, "Curr Animation: %S\n", CurrAnim->Name);
|
||||||
|
|
||||||
|
bool IsPlaying = State->AnimationSystem.TimelineShouldAdvance;
|
||||||
|
AppendPrintF(&FileStr, "\tIs Playing: %s\n",
|
||||||
|
IsPlaying ? "True" : "False");
|
||||||
|
|
||||||
char* Connected = BLState->MicListenJobData.IsConnected ? "Connected" : "Disconnected";
|
char* Connected = BLState->MicListenJobData.IsConnected ? "Connected" : "Disconnected";
|
||||||
AppendPrintF(&FileStr, "Connected to Python: %s\n", Connected);
|
AppendPrintF(&FileStr, "Connected to Python: %s\n", Connected);
|
||||||
|
|
||||||
|
@ -623,11 +627,7 @@ BlumenLumen_CustomUpdate(gs_data UserData, app_state* State, context* Context)
|
||||||
|
|
||||||
if (SecondsSinceChange > VoiceCommandSustainDuration)
|
if (SecondsSinceChange > VoiceCommandSustainDuration)
|
||||||
{
|
{
|
||||||
BLState->PatternMode = BlumenPattern_Standard;
|
BlumenLumen_SetPatternMode(BlumenPattern_Standard, GlobalAnimTransitionSpeed, &State->AnimationSystem, BLState);
|
||||||
animation_handle NewAnim = BLState->ModeAnimations[BlumenPattern_Standard].Handles[0];
|
|
||||||
AnimationFadeGroup_FadeTo(&State->AnimationSystem.ActiveFadeGroup,
|
|
||||||
NewAnim,
|
|
||||||
VoiceCommandFadeDuration);
|
|
||||||
BLState->ShouldUpdateLog = true;
|
BLState->ShouldUpdateLog = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,9 @@ gs_const_string VoicePatternFolder = ConstString("data/blumen_animations/audio_r
|
||||||
// NOTE: There is no need to modify the MotorOpenTimesCount variable -
|
// NOTE: There is no need to modify the MotorOpenTimesCount variable -
|
||||||
// it is a compile time constant that gets calculated automatically
|
// it is a compile time constant that gets calculated automatically
|
||||||
global time_range MotorOpenTimes[] = {
|
global time_range MotorOpenTimes[] = {
|
||||||
{ 8, 00, 12, 00 },
|
{ 8, 00, 12, 00 }, // 8:00am to 12:00pm
|
||||||
{ 12, 30, 13, 00 },
|
{ 12, 30, 13, 00 }, // 12:30pm to 01:00pm
|
||||||
{ 18, 00, 22, 00 }, // 6:00pm to 10:00pm
|
{ 18, 00, 22, 00 }, // 6:00pm to 10:00pm
|
||||||
{ 23, 05, 23, 53 },
|
|
||||||
};
|
};
|
||||||
global u32 MotorOpenTimesCount = CArrayLength(MotorOpenTimes); // do not edit
|
global u32 MotorOpenTimesCount = CArrayLength(MotorOpenTimes); // do not edit
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue