From 8cc965ef51e75b0c05e0973c473958c2261dc815 Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Fri, 16 Dec 2022 16:03:34 +0100 Subject: [PATCH] implemented line sensor calibration in ESP and UI, implemented battery voltage display --- ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs | 2 +- .../RobotClientWpf/Views/ConfigView.xaml | 16 ++- .../RobotClientWpf/Views/ConfigView.xaml.cs | 8 ++ .../RobotClientWpf/Views/MainView.xaml | 18 +++- .../RobotClientWpf/Views/MainView.xaml.cs | 6 ++ .../{ => Battery}/BatteryEventArgs.cs | 2 +- ADIS_Csharp/RobotLib/Battery/DevBattery.cs | 66 +++++++++++++ ADIS_Csharp/RobotLib/DevBattery.cs | 59 ----------- .../RobotLib/Movement/DevLineSensor.cs | 27 +++++- .../LineSensorCalibrationDataEventArgs.cs | 14 +++ ADIS_Csharp/RobotLib/Robot.cs | 7 +- ADIS_ESP32_Eclipse/main/challenge_com.c | 56 +++++++++++ ADIS_ESP32_Eclipse/main/robo_wrapper.c | 97 +++++++++++++++++++ ADIS_ESP32_Eclipse/main/robo_wrapper.h | 14 +++ ADIS_ESP32_Eclipse/main/wifi.c | 4 + 15 files changed, 325 insertions(+), 71 deletions(-) rename ADIS_Csharp/RobotLib/{ => Battery}/BatteryEventArgs.cs (88%) create mode 100644 ADIS_Csharp/RobotLib/Battery/DevBattery.cs delete mode 100644 ADIS_Csharp/RobotLib/DevBattery.cs create mode 100644 ADIS_Csharp/RobotLib/Movement/LineSensorCalibrationDataEventArgs.cs diff --git a/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs index 0830e25..340fa81 100644 --- a/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs +++ b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs @@ -6,7 +6,7 @@ using System.Windows; using System.Windows.Media; using RobotClientWpf.Properties; using RobotClientWpf.Utilities; -using RobotLib; +using RobotLib.Battery; namespace RobotClientWpf { diff --git a/ADIS_Csharp/RobotClientWpf/Views/ConfigView.xaml b/ADIS_Csharp/RobotClientWpf/Views/ConfigView.xaml index 7bb255b..c218ce2 100644 --- a/ADIS_Csharp/RobotClientWpf/Views/ConfigView.xaml +++ b/ADIS_Csharp/RobotClientWpf/Views/ConfigView.xaml @@ -12,7 +12,7 @@ - + @@ -36,8 +36,18 @@