Weighing: Add SetDateAndTime()
All checks were successful
Test / Run tests (push) Successful in 2m22s

This commit is contained in:
2024-08-24 13:54:59 +02:00
parent bec1b165bf
commit cd2b482b5a
5 changed files with 33 additions and 0 deletions

View File

@ -118,5 +118,9 @@ namespace Elwig.Helpers.Weighing {
public async Task RevokeFillingClearance() {
await SetFillingClearance(false);
}
public Task SetDateAndTime(DateTime dateTime) {
throw new NotImplementedException("Für Waagen vom Typ 'Gassner' ist diese Funktion noch nicht implementiert");
}
}
}

View File

@ -1,3 +1,4 @@
using System;
using System.Threading.Tasks;
namespace Elwig.Helpers.Weighing {
@ -31,5 +32,10 @@ namespace Elwig.Helpers.Weighing {
/// Revoke clearance to fill the scale container
/// </summary>
Task RevokeFillingClearance();
/// <summary>
/// Try to set date and time on the scale
/// </summary>
Task SetDateAndTime(DateTime dateTime);
}
}

View File

@ -161,5 +161,10 @@ namespace Elwig.Helpers.Weighing {
public async Task RevokeFillingClearance() {
await SetFillingClearance(false);
}
public async Task SetDateAndTime(DateTime dateTime) {
await SendCommand($"ST{dateTime:dd.MM.yyHH:mm:ss}");
await ReceiveResponse();
}
}
}