10
6. Current (year)
(1) Description: Acquire current time information including the year, month, day, hour, minute, second, etc.
(2) Type: Information block (variable-type data)
(3) Example: Compare time values
If the number of the current month is larger than the number of the current day, the Robomaster EP CORE will move its
robotic arm up and down; if the number of the current month is less than or equal to the number of the current day, the EP
CORE will rotate its chassis from left to right.
Python API:
Function: tools.get_localtime(time_enum)
Parameters:
● time_enum (enum):
■rm_define.localtime_year
■rm_define.localtime_month
■rm_define.localtime_day
■rm_define.localtime_hour
■rm_define.localtime_minute
■rm_define.localtime_second
Return value
● time (int)