Add reverse workspace filter option
This commit is contained in:
+12
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user