Tweak logging and change settings string
Deploy to Gitea Releases / deploy-to-gitea-releases (push) Successful in 33s

This commit is contained in:
2026-08-18 14:43:22 -04:00
parent 6ba4854bd8
commit 8c63b93d09
4 changed files with 9 additions and 5 deletions
+6 -1
View File
@@ -1,10 +1,13 @@
using System;
using System.Diagnostics;
using Serilog;
namespace WorkIndicator.Delcom
{
public class StoplightIndicator : IDisposable
{
private readonly ILogger _logger;
public enum Light
{
Green,
@@ -25,6 +28,8 @@ namespace WorkIndicator.Delcom
public StoplightIndicator()
{
_logger = Log.ForContext<StoplightIndicator>();
Device = new Delcom();
Device.Open();
@@ -74,7 +79,7 @@ namespace WorkIndicator.Delcom
_yellow = yellow;
_green = green;
Debug.WriteLine($"Red: {_red}, Yellow: {_yellow}, Green: {_green}");
_logger.Information("Red: {red}, Yellow: {yellow}, Green: {green}", _red, _yellow, _green);
port1 = port1.SetBitValue((int) Light.Green, green == LightState.Off);
port1 = port1.SetBitValue((int) Light.Yellow, yellow == LightState.Off);