From 84c3d7985994d67ced57f97ea6ebf39a5585e8ea Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Mon, 12 Dec 2022 17:22:34 +0100 Subject: [PATCH] renamed RobotControl to Movement --- ADIS_Csharp/RobotConsoleClient/Program.cs | 10 +++++----- .../DevRobot.cs => Movement/DevMovement.cs} | 8 ++++---- ADIS_Csharp/RobotLib/Robot.cs | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) rename ADIS_Csharp/RobotLib/{RobotControl/DevRobot.cs => Movement/DevMovement.cs} (83%) diff --git a/ADIS_Csharp/RobotConsoleClient/Program.cs b/ADIS_Csharp/RobotConsoleClient/Program.cs index 6ee2b57..d2d83d8 100644 --- a/ADIS_Csharp/RobotConsoleClient/Program.cs +++ b/ADIS_Csharp/RobotConsoleClient/Program.cs @@ -19,11 +19,11 @@ namespace RobotConsoleClient robotStationary.SplitFlap.InitializeAllSplitflaps(); Thread.Sleep(1000); - robotMobile.RobotControl.SetSpeed(1000); - robotMobile.RobotControl.Turn(-10); - robotMobile.RobotControl.SetSpeed(-500); - robotMobile.RobotControl.StopMovement(); - robotMobile.RobotControl.SetMobilityMode(automatic: true); + robotMobile.Movement.SetSpeed(1000); + robotMobile.Movement.Turn(-10); + robotMobile.Movement.SetSpeed(-500); + robotMobile.Movement.Stop(); + robotMobile.Movement.SetMobilityMode(automatic: true); } diff --git a/ADIS_Csharp/RobotLib/RobotControl/DevRobot.cs b/ADIS_Csharp/RobotLib/Movement/DevMovement.cs similarity index 83% rename from ADIS_Csharp/RobotLib/RobotControl/DevRobot.cs rename to ADIS_Csharp/RobotLib/Movement/DevMovement.cs index dfa8b8e..f58638a 100644 --- a/ADIS_Csharp/RobotLib/RobotControl/DevRobot.cs +++ b/ADIS_Csharp/RobotLib/Movement/DevMovement.cs @@ -2,16 +2,16 @@ using System.Collections.Generic; using System.Text.Json; -namespace RobotLib.RobotControl +namespace RobotLib.Movement { - public class DevRobot : DevBase + public class DevMovement : DevBase { private const string TOPIC_MOBILE_MODE = "/mobile/cmd/mode/"; private const string TOPIC_MOBILE_NAV_TURN = "/mobile/cmd/nav/turn/"; private const string TOPIC_MOBILE_NAV_MOVE = "/mobile/cmd/nav/move/"; private const string TOPIC_MOBILE_NAV_STOP = "/mobile/cmd/nav/stop/"; - public DevRobot(IPublisherSubscriber com) : base(com, new List() { }) { } + public DevMovement(IPublisherSubscriber com) : base(com, new List() { }) { } public void SetMobilityMode(bool automatic) { @@ -29,7 +29,7 @@ namespace RobotLib.RobotControl base.SendMessage(TOPIC_MOBILE_NAV_MOVE, speed.ToString()); } - public void StopMovement() + public void Stop() { base.SendMessage(TOPIC_MOBILE_NAV_STOP, true.ToString()); } diff --git a/ADIS_Csharp/RobotLib/Robot.cs b/ADIS_Csharp/RobotLib/Robot.cs index 61b5d36..33c0431 100644 --- a/ADIS_Csharp/RobotLib/Robot.cs +++ b/ADIS_Csharp/RobotLib/Robot.cs @@ -1,6 +1,6 @@ using RobotLib.Communication; -using RobotLib.RobotControl; using RobotLib.SplitFlap; +using RobotLib.Movement; using System.Threading; namespace RobotLib @@ -13,7 +13,7 @@ namespace RobotLib //Buzzer = new DevBuzzer(Com); //Battery = new DevBattery(Com); SplitFlap = new DevSplitFlap(com); - RobotControl = new DevRobot(com); + Movement = new DevMovement(com); Timer timer = new Timer(TimerCallback); timer.Change(2000, 10000); @@ -24,7 +24,7 @@ namespace RobotLib //public DevBuzzer Buzzer { get; } //public DevBattery Battery { get; } public DevSplitFlap SplitFlap { get; } - public DevRobot RobotControl { get; } + public DevMovement Movement { get; } public void Connect(string host, int port) {