Skip to content

Commit

Permalink
Fix Date Skip reset not registering
Browse files Browse the repository at this point in the history
Make exclusively reset date button use NTP
  • Loading branch information
LegoFigure11 committed Jan 31, 2024
1 parent fa7902e commit e424ddb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions RaidCrawler.Core/Connection/ConnectionWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ private async Task SkipHour(int hours, int delay, CancellationToken token)
}

public async Task ResetTime(CancellationToken token)
{
var command = Encoding.ASCII.GetBytes($"resetTime{(CRLF ? "\r\n" : "")}");
await Connection.SendAsync(command, token).ConfigureAwait(false);
}

public async Task ResetTimeNTP(CancellationToken token)
{
var command = Encoding.ASCII.GetBytes($"resetTimeNTP{(CRLF ? "\r\n" : "")}");
await Connection.SendAsync(command, token).ConfigureAwait(false);
Expand Down
2 changes: 1 addition & 1 deletion RaidCrawler.WinForms/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ private void B_ResetTime_Click(object sender, EventArgs e)
try
{
UpdateStatus("Resetting date...");
await ConnectionWrapper.ResetTime(Source.Token).ConfigureAwait(false);
await ConnectionWrapper.ResetTimeNTP(Source.Token).ConfigureAwait(false);
UpdateStatus("Date reset!");
}
catch (Exception ex)
Expand Down

0 comments on commit e424ddb

Please sign in to comment.