settings
This commit is contained in:
commit
9bbefec3db
|
@ -6,7 +6,7 @@ SET MyPath=%MyPath:~0,-1%
|
||||||
call %MyPath%\_prebuild_win32.bat app debug msvc
|
call %MyPath%\_prebuild_win32.bat app debug msvc
|
||||||
call %MyPath%\setup_cl.bat
|
call %MyPath%\setup_cl.bat
|
||||||
|
|
||||||
SET CommonCompilerFlags=-nologo -DDEBUG=0 -DPLATFORM_WINDOWS -FC -WX -W4 -Z7 -Oi -GR- -EHsc -EHa- -MTd -fp:fast -fp:except- -IC:\programs-dev\gs_libs\src
|
SET CommonCompilerFlags=-nologo -DDEBUG=1 -DPLATFORM_WINDOWS -FC -WX -W4 -Z7 -Oi -GR- -EHsc -EHa- -MTd -fp:fast -fp:except- -IC:\programs-dev\gs_libs\src
|
||||||
|
|
||||||
SET CommonCompilerFlags=-wd4127 -wd4702 -wd4101 -wd4505 -wd4100 -wd4189 -wd4244 -wd4201 -wd4996 -I%CommonLibs% -O2 %CommonCompilerFlags%
|
SET CommonCompilerFlags=-wd4127 -wd4702 -wd4101 -wd4505 -wd4100 -wd4189 -wd4244 -wd4201 -wd4996 -I%CommonLibs% -O2 %CommonCompilerFlags%
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,8 @@ AssemblyDebug_Render(panel* Panel, rect2 PanelBounds, render_command_buffer* Ren
|
||||||
{
|
{
|
||||||
InterfaceAssert(Interface->PerFrameMemory);
|
InterfaceAssert(Interface->PerFrameMemory);
|
||||||
|
|
||||||
|
State->AssemblyDebugState.AllAssemblies = ui_ToggleText(Interface, MakeString("All Assemblies"), State->AssemblyDebugState.AllAssemblies);
|
||||||
|
|
||||||
gs_string OverrideStr = MakeString(OverrideTypeStrings[State->AssemblyDebugState.Override]);
|
gs_string OverrideStr = MakeString(OverrideTypeStrings[State->AssemblyDebugState.Override]);
|
||||||
if (ui_BeginLabeledDropdown(Interface, MakeString("Override"), OverrideStr))
|
if (ui_BeginLabeledDropdown(Interface, MakeString("Override"), OverrideStr))
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct assembly_debug_state
|
||||||
{
|
{
|
||||||
override_type Override;
|
override_type Override;
|
||||||
|
|
||||||
|
bool AllAssemblies;
|
||||||
u32 TargetAssembly;
|
u32 TargetAssembly;
|
||||||
u32 TargetStrip;
|
u32 TargetStrip;
|
||||||
|
|
||||||
|
@ -101,12 +102,9 @@ AssemblyDebug_OverrideTagValueWithColor(assembly Assembly, led_buffer LedBuffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void
|
internal void
|
||||||
AssemblyDebug_OverrideOutput(assembly_debug_state State, assembly_array Assemblies, led_system LedSystem)
|
AssemblyDebug_OverrideOutputForAssembly(assembly_debug_state State, led_system LedSystem,
|
||||||
|
assembly Assembly)
|
||||||
{
|
{
|
||||||
if (State.Override == ADS_Override_None) return;
|
|
||||||
State.TargetColor = pixel{255,255,255};
|
|
||||||
|
|
||||||
assembly Assembly = Assemblies.Values[State.TargetAssembly];
|
|
||||||
led_buffer LedBuffer = LedSystem.Buffers[Assembly.LedBufferIndex];
|
led_buffer LedBuffer = LedSystem.Buffers[Assembly.LedBufferIndex];
|
||||||
|
|
||||||
u8 V = State.Brightness;
|
u8 V = State.Brightness;
|
||||||
|
@ -203,6 +201,27 @@ AssemblyDebug_OverrideOutput(assembly_debug_state State, assembly_array Assembli
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void
|
||||||
|
AssemblyDebug_OverrideOutput(assembly_debug_state State, assembly_array Assemblies, led_system LedSystem)
|
||||||
|
{
|
||||||
|
if (State.Override == ADS_Override_None) return;
|
||||||
|
State.TargetColor = pixel{255,255,255};
|
||||||
|
|
||||||
|
if (State.AllAssemblies)
|
||||||
|
{
|
||||||
|
for (u32 i = 0; i < Assemblies.Count; i++)
|
||||||
|
{
|
||||||
|
assembly Assembly = Assemblies.Values[i];
|
||||||
|
AssemblyDebug_OverrideOutputForAssembly(State, LedSystem, Assembly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assembly Assembly = Assemblies.Values[State.TargetAssembly];
|
||||||
|
AssemblyDebug_OverrideOutputForAssembly(State, LedSystem, Assembly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define FOLDHAUS_ASSEMBLY_DEBUG_H
|
#define FOLDHAUS_ASSEMBLY_DEBUG_H
|
||||||
#endif // FOLDHAUS_ASSEMBLY_DEBUG_H
|
#endif // FOLDHAUS_ASSEMBLY_DEBUG_H
|
|
@ -731,25 +731,25 @@ US_CUSTOM_DEBUG_UI(BlumenLumen_DebugUI)
|
||||||
{
|
{
|
||||||
ui_Label(I, Label);
|
ui_Label(I, Label);
|
||||||
|
|
||||||
bool IsClosed = PendingPacket.FlowerPositions[MotorIndex] == 1;
|
bool IsClosed = PendingPacket.FlowerPositions[MotorIndex] == MotorState_Closed;
|
||||||
if (ui_ToggleText(I, MakeString("Closed (1)"), IsClosed))
|
if (ui_ToggleText(I, MakeString("Closed (1)"), IsClosed))
|
||||||
{
|
{
|
||||||
PendingPacket.FlowerPositions[MotorIndex] = 1;
|
PendingPacket.FlowerPositions[MotorIndex] = MotorState_Closed;
|
||||||
}
|
}
|
||||||
bool IsHOpen = PendingPacket.FlowerPositions[MotorIndex] == 3;
|
bool IsHOpen = PendingPacket.FlowerPositions[MotorIndex] == MotorState_HalfOpen;
|
||||||
if (ui_ToggleText(I, MakeString("Half Open (3)"), IsHOpen))
|
if (ui_ToggleText(I, MakeString("Half Open (3)"), IsHOpen))
|
||||||
{
|
{
|
||||||
PendingPacket.FlowerPositions[MotorIndex] = 3;
|
PendingPacket.FlowerPositions[MotorIndex] = MotorState_HalfOpen;
|
||||||
}
|
}
|
||||||
bool IsMOpen = PendingPacket.FlowerPositions[MotorIndex] == 4;
|
bool IsMOpen = PendingPacket.FlowerPositions[MotorIndex] == MotorState_MostlyOpen;
|
||||||
if (ui_ToggleText(I, MakeString("Mostly Open (4)"), IsMOpen))
|
if (ui_ToggleText(I, MakeString("Mostly Open (4)"), IsMOpen))
|
||||||
{
|
{
|
||||||
PendingPacket.FlowerPositions[MotorIndex] = 4;
|
PendingPacket.FlowerPositions[MotorIndex] = MotorState_MostlyOpen;
|
||||||
}
|
}
|
||||||
bool IsOpen = PendingPacket.FlowerPositions[MotorIndex] == 2;
|
bool IsOpen = PendingPacket.FlowerPositions[MotorIndex] == MotorState_Open;
|
||||||
if (ui_ToggleText(I, MakeString("Open (2)"), IsOpen))
|
if (ui_ToggleText(I, MakeString("Open (2)"), IsOpen))
|
||||||
{
|
{
|
||||||
PendingPacket.FlowerPositions[MotorIndex] = 2;
|
PendingPacket.FlowerPositions[MotorIndex] = MotorState_Open;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui_EndRow(I);
|
ui_EndRow(I);
|
||||||
|
|
|
@ -43,11 +43,6 @@ typedef struct motor_packet
|
||||||
typedef struct motor_status_packet
|
typedef struct motor_status_packet
|
||||||
{
|
{
|
||||||
motor_packet Pos;
|
motor_packet Pos;
|
||||||
/*
|
|
||||||
u8 Motor1Pos;
|
|
||||||
u8 Motor2Pos;
|
|
||||||
u8 Motor3Pos;
|
|
||||||
*/
|
|
||||||
u8 MotorStatus[3];
|
u8 MotorStatus[3];
|
||||||
u16 Temperature;
|
u16 Temperature;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ r64 VoiceCommandSustainDuration = 30.0; // in seconds
|
||||||
// NOTE: This is not a symmetric operation. When we send a 'motor open'
|
// NOTE: This is not a symmetric operation. When we send a 'motor open'
|
||||||
// command, we want to immediately turn the upper leds on so they appear
|
// command, we want to immediately turn the upper leds on so they appear
|
||||||
// to have been on the whole time.
|
// to have been on the whole time.
|
||||||
r64 TurnUpperLedsOffAfterMotorCloseCommandDelay = 3000.0; // in seconds
|
r64 TurnUpperLedsOffAfterMotorCloseCommandDelay = 60.0; // in seconds
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Temperature & Time of Day Based Led Brightness Settings
|
// NOTE: Temperature & Time of Day Based Led Brightness Settings
|
||||||
|
|
Loading…
Reference in New Issue