Skip to content

Commit

Permalink
small codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhobox committed Jan 26, 2024
1 parent 9829833 commit e40bd4e
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace KnxFileTransferClient;


class Program
{
static void PrintOpenKNXHeader(string addCustomText = null, ConsoleColor customTextColor = ConsoleColor.Green)
Expand Down Expand Up @@ -38,7 +37,6 @@ static void PrintOpenKNXHeader(string addCustomText = null, ConsoleColor customT
private static FileTransferClient client = null;
private static Arguments arguments;


static async Task<int> Main(string[] args)
{
//Console.ForegroundColor = ConsoleColor.Green;
Expand Down Expand Up @@ -204,7 +202,6 @@ private static void Finish()
conn.Disconnect().Wait();
}


static bool firstSpeed = true;
static bool firstDraw = true;
static bool canFancy = true;
Expand Down Expand Up @@ -517,7 +514,6 @@ private static async Task update(Arguments args)
break;
}


if(extension == ".uf2")
{
if(!args.Get<bool>("force"))
Expand All @@ -541,7 +537,6 @@ private static async Task update(Arguments args)
deviceAppNumber = res[3];
deviceAppVersion = res[4];


res = await device.PropertyRead(0, 25);
if(res.Length == 2)
{
Expand All @@ -559,7 +554,6 @@ private static async Task update(Arguments args)

if(!CheckApplication(infoTag, deviceOpenKnxId, deviceAppNumber, deviceAppVersion, deviceAppRevision))
return;

}
catch (Exception ex)
{
Expand All @@ -582,9 +576,6 @@ private static async Task update(Arguments args)
}
}




using(MemoryStream stream = new MemoryStream())
{
Console.WriteLine($"File: Passe Firmware für Übertragung an...");
Expand All @@ -611,8 +602,6 @@ private static async Task update(Arguments args)
await device.InvokeFunctionProperty(159, 101, System.Text.UTF8Encoding.UTF8.GetBytes("/firmware.bin" + char.MinValue));
}
}



private static bool CheckApplication(Tag tag, uint deviceOpenKnxId, uint deviceAppNumber, uint deviceAppVersion, uint deviceAppRevision)
{
Expand Down Expand Up @@ -668,6 +657,4 @@ private static bool Continue()
}
return false;
}


}

0 comments on commit e40bd4e

Please sign in to comment.