From ab5edbc59eb35d03cf57f2268258fbbf0fa4523f Mon Sep 17 00:00:00 2001 From: Mes Date: Tue, 7 Nov 2023 01:41:20 +0800 Subject: [PATCH] make the HZ and tool_data_path can be used in both simulation and label window --- GUITool/include/WindowsHandler/Controller.cpp | 4 +--- GUITool/include/WindowsHandler/Controller.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/GUITool/include/WindowsHandler/Controller.cpp b/GUITool/include/WindowsHandler/Controller.cpp index d43e170..7814ab3 100644 --- a/GUITool/include/WindowsHandler/Controller.cpp +++ b/GUITool/include/WindowsHandler/Controller.cpp @@ -89,7 +89,7 @@ void AnimationController::transform_frame() is_xydata = !rtheta_data; max_frame /= HZ; - --max_frame; + --max_frame; // 0 ~ max_frame-1 _raw_bin_file.open(_raw_bin_path, std::ios::in | std::ios::binary); if (_raw_bin_file.fail()) { @@ -137,7 +137,6 @@ void AnimationController::check_auto_play() AnimationController::AnimationController() { fps = 60; - HZ = 360; frame = 0, max_frame = 0; window_size = 750; @@ -147,7 +146,6 @@ AnimationController::AnimationController() auto_play = false; replay = false; - xy_data = Eigen::MatrixXd::Zero(HZ, 2); _raw_bin_open = false; is_xydata = false; } \ No newline at end of file diff --git a/GUITool/include/WindowsHandler/Controller.h b/GUITool/include/WindowsHandler/Controller.h index e58e2d8..fddec36 100644 --- a/GUITool/include/WindowsHandler/Controller.h +++ b/GUITool/include/WindowsHandler/Controller.h @@ -50,6 +50,7 @@ class AnimationController { bool is_xydata; std::chrono::system_clock::time_point _current_time; + std::string _tool_data_path; std::string _raw_bin_path; std::ifstream _raw_bin_file; bool _raw_bin_open;