From e40bd4e6cccf26eb2681035c6e3c00fcfc3fd0d4 Mon Sep 17 00:00:00 2001 From: Mike <45664417+thewhobox@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:21:42 +0100 Subject: [PATCH] small codefactor --- Program.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Program.cs b/Program.cs index c6fad62..6395780 100644 --- a/Program.cs +++ b/Program.cs @@ -8,7 +8,6 @@ namespace KnxFileTransferClient; - class Program { static void PrintOpenKNXHeader(string addCustomText = null, ConsoleColor customTextColor = ConsoleColor.Green) @@ -38,7 +37,6 @@ static void PrintOpenKNXHeader(string addCustomText = null, ConsoleColor customT private static FileTransferClient client = null; private static Arguments arguments; - static async Task Main(string[] args) { //Console.ForegroundColor = ConsoleColor.Green; @@ -204,7 +202,6 @@ private static void Finish() conn.Disconnect().Wait(); } - static bool firstSpeed = true; static bool firstDraw = true; static bool canFancy = true; @@ -517,7 +514,6 @@ private static async Task update(Arguments args) break; } - if(extension == ".uf2") { if(!args.Get("force")) @@ -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) { @@ -559,7 +554,6 @@ private static async Task update(Arguments args) if(!CheckApplication(infoTag, deviceOpenKnxId, deviceAppNumber, deviceAppVersion, deviceAppRevision)) return; - } catch (Exception ex) { @@ -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..."); @@ -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) { @@ -668,6 +657,4 @@ private static bool Continue() } return false; } - - } \ No newline at end of file