mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
ecs-397, default volume on power up
This commit is contained in:
@@ -218,6 +218,10 @@ namespace PepperDash.Essentials
|
|||||||
CurrentSourceInfo = null;
|
CurrentSourceInfo = null;
|
||||||
OnFeedback.FireUpdate();
|
OnFeedback.FireUpdate();
|
||||||
}
|
}
|
||||||
|
if (disp.PowerIsOnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
SetDefaultLevels();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
disp.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
disp.IsWarmingUpFeedback.OutputChange += (o, a) =>
|
||||||
@@ -291,9 +295,9 @@ namespace PepperDash.Essentials
|
|||||||
/// route or commands
|
/// route or commands
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
public void RunRouteAction(string routeKey, Action successCallback)
|
public void RunRouteAction(string routeKey, Action successCallback)
|
||||||
{
|
{
|
||||||
// Run this on a separate thread
|
// Run this on a separate thread
|
||||||
new CTimer(o =>
|
new CTimer(o =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -336,7 +340,10 @@ namespace PepperDash.Essentials
|
|||||||
// Let's run it
|
// Let's run it
|
||||||
var item = dict[routeKey];
|
var item = dict[routeKey];
|
||||||
if (routeKey.ToLower() != "roomoff")
|
if (routeKey.ToLower() != "roomoff")
|
||||||
|
{
|
||||||
|
|
||||||
LastSourceKey = routeKey;
|
LastSourceKey = routeKey;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
CurrentSourceInfoKey = null;
|
CurrentSourceInfoKey = null;
|
||||||
|
|
||||||
@@ -375,17 +382,6 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
|
|
||||||
}, 0); // end of CTimer
|
}, 0); // end of CTimer
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Does what it says
|
|
||||||
/// </summary>
|
|
||||||
public override void SetDefaultLevels()
|
|
||||||
{
|
|
||||||
Debug.Console(1, this, "Restoring default levels");
|
|
||||||
var vc = CurrentVolumeControls as IBasicVolumeWithFeedback;
|
|
||||||
if (vc != null)
|
|
||||||
vc.SetVolume(DefaultVolume);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -450,7 +446,17 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Does what it says
|
||||||
|
/// </summary>
|
||||||
|
public override void SetDefaultLevels()
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Restoring default levels");
|
||||||
|
var vc = CurrentVolumeControls as IBasicVolumeWithFeedback;
|
||||||
|
if (vc != null)
|
||||||
|
vc.SetVolume(DefaultVolume);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Will power the room on with the last-used source
|
/// Will power the room on with the last-used source
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user