File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
include/behaviortree_cpp_v3 Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 8
8
#ifdef Ivy
9
9
10
10
#include " common/Sys.h"
11
+ #include " tool/system.h"
11
12
#include " Body/Skin.h"
12
13
#include " Anim/IvyAnim.h"
13
14
#include " Engine/Behavior/EventDispatcher.h"
@@ -117,6 +118,18 @@ namespace BT {
117
118
case emotion_status:
118
119
value = IvyBehavior::instance ().get_current_emo_status ();
119
120
break ;
121
+ case timestamp:
122
+ if (Sys::check_condition (Sys::TIME_SYNCHRONIZED))
123
+ value = get_ymdh (Sys::get_geo_info ().timestamp );
124
+ else
125
+ value = 9999999999 ;
126
+ break ;
127
+ case date_time:
128
+ if (Sys::check_condition (Sys::TIME_SYNCHRONIZED))
129
+ value = get_mdh (Sys::get_geo_info ().timestamp );
130
+ else
131
+ value = 999999 ;
132
+ break ;
120
133
default :
121
134
return false ;
122
135
}
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ namespace BT {
29
29
water_change = 14 , /* 水位状态变更 */
30
30
temp_change = 15 , /* 温度状态变更 */
31
31
32
+ sun_up_fast = 16 , /* 光照突然变高 */
33
+ sun_down_fast = 17 , /* 光照突然变低 */
34
+
32
35
trans_manager = 101 ,
33
36
};
34
37
@@ -60,6 +63,9 @@ namespace BT {
60
63
batt_status = 13 , /* 当前电池状态 */
61
64
loneliness = 14 , /* 孤独值 */
62
65
emotion_status =15 , /* 情感状态 */
66
+ timestamp = 16 , /* 时间戳 */
67
+ date_time = 17 , /* 月日时 */
68
+
63
69
};
64
70
65
71
/* todo
You can’t perform that action at this time.
0 commit comments