Add reverse workspace filter option

This commit is contained in:
gqc
2026-07-08 19:16:02 +08:00
parent 041c830bfb
commit cb078492bc
6 changed files with 215 additions and 44 deletions
+12
View File
@@ -5,6 +5,7 @@
#include "pose_body.h"
Polygon workspace;
bool ReverseWorkspace = false;
time_gap_t global_time_gap = {
.in = 0,
.size = 0,
@@ -143,6 +144,17 @@ bool is_point_in_workspace(int left, int top, int right, int bottom)
return inside;
}
bool is_box_allowed_by_workspace(int left, int top, int right, int bottom)
{
bool inside = is_point_in_workspace(left, top, right, bottom);
return ReverseWorkspace ? !inside : inside;
}
const char *workspace_filter_mode()
{
return ReverseWorkspace ? "reverse" : "normal";
}
// 获取今天的秒数
int get_today_seconds() {
time_t current_time;