Adds debug statments with logging for Samsung MDC power on/off events

This commit is contained in:
Neil Dorin
2020-01-13 21:54:49 -07:00
parent d63787bc78
commit 45788a4d6b

View File

@@ -256,6 +256,7 @@ namespace PepperDash.Essentials.Devices.Displays
if (newVal != _PowerIsOn) if (newVal != _PowerIsOn)
{ {
_PowerIsOn = newVal; _PowerIsOn = newVal;
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Feedback Power State: {0}", _PowerIsOn);
PowerIsOnFeedback.FireUpdate(); PowerIsOnFeedback.FireUpdate();
} }
} }
@@ -364,6 +365,8 @@ namespace PepperDash.Essentials.Devices.Displays
/// </summary> /// </summary>
public override void PowerOn() public override void PowerOn()
{ {
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering On Display");
IsPoweringOnIgnorePowerFb = true; IsPoweringOnIgnorePowerFb = true;
//Send(PowerOnCmd); //Send(PowerOnCmd);
SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x01, 0x00 }); SendBytes(new byte[] { 0xAA, 0x11, 0x00, 0x01, 0x01, 0x00 });
@@ -387,6 +390,8 @@ namespace PepperDash.Essentials.Devices.Displays
/// </summary> /// </summary>
public override void PowerOff() public override void PowerOff()
{ {
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Powering Off Display");
IsPoweringOnIgnorePowerFb = false; IsPoweringOnIgnorePowerFb = false;
// If a display has unreliable-power off feedback, just override this and // If a display has unreliable-power off feedback, just override this and
// remove this check. // remove this check.