Finished Udp Example Options
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
using System.Data;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using GoveeCSharpConnector.Objects;
|
||||
|
||||
namespace GoveeCSharpConnector.Interfaces;
|
||||
@ -36,7 +40,7 @@ public interface IGoveeUdpService
|
||||
/// <param name="brightness">In Percent 1-100</param>
|
||||
/// <param name="uniCastPort">Port of the Device. Standard 4003</param>
|
||||
/// <returns></returns>
|
||||
Task SetBrightness(string deviceAddress, short brightness, int uniCastPort = 4003);
|
||||
Task SetBrightness(string deviceAddress, int brightness, int uniCastPort = 4003);
|
||||
/// <summary>
|
||||
/// Sets the Color of the Device
|
||||
/// </summary>
|
||||
@ -60,4 +64,4 @@ public interface IGoveeUdpService
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
void StopUdpListener();
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public class GoveeUdpService : IGoveeUdpService
|
||||
};
|
||||
// Subscribe to ScanResultSubject
|
||||
var devicesTask = _scanResultSubject
|
||||
.TakeUntil(Observable.Timer(timeout ?? TimeSpan.FromMilliseconds(200)))
|
||||
.TakeUntil(Observable.Timer(timeout ?? TimeSpan.FromMilliseconds(300)))
|
||||
.ToList()
|
||||
.ToTask();
|
||||
|
||||
@ -126,7 +126,7 @@ public class GoveeUdpService : IGoveeUdpService
|
||||
}
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public async Task SetBrightness(string deviceAddress, short brightness, int uniCastPort = 4003)
|
||||
public async Task SetBrightness(string deviceAddress, int brightness, int uniCastPort = 4003)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user