pikastech 3 anni fa
parent
commit
b26b4ddffa
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10 0
      package/PikaStdDevice/PikaStdDevice.pyi

+ 10 - 0
package/PikaStdDevice/PikaStdDevice.pyi

@@ -102,24 +102,31 @@ class Time(BaseDev):
     def sleep(self, s: float):
     def sleep(self, s: float):
         """Sleep for s seconds."""
         """Sleep for s seconds."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def time(self) -> float:
     def time(self) -> float:
         """Get the current time."""
         """Get the current time."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def time_ns(self) -> int:
     def time_ns(self) -> int:
         """Get the current time in nanoseconds."""
         """Get the current time in nanoseconds."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def gmtime(self, unix_time: float):
     def gmtime(self, unix_time: float):
         """Convert unix time to struct_time."""
         """Convert unix time to struct_time."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def localtime(self, unix_time: float):
     def localtime(self, unix_time: float):
         """Convert unix time to struct_time."""
         """Convert unix time to struct_time."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def mktime(self) -> int:
     def mktime(self) -> int:
         """Convert struct_time to unix time."""
         """Convert struct_time to unix time."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def asctime(self):
     def asctime(self):
         """Convert struct_time to string."""
         """Convert struct_time to string."""
 
 
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def ctime(self, unix_time: float):
     def ctime(self, unix_time: float):
         """Convert unix time to string."""
         """Convert unix time to string."""
 
 
@@ -130,6 +137,7 @@ class Time(BaseDev):
     def sleep_ms(self, ms: int): ...
     def sleep_ms(self, ms: int): ...
 
 
     @abstractmethod
     @abstractmethod
+    @PIKA_C_MACRO_IF("PIKA_STD_DEVICE_UNIX_TIME_ENABLE")
     def platformGetTick(): ...
     def platformGetTick(): ...
 
 
 
 
@@ -442,8 +450,10 @@ class CAN(BaseDev):
 
 
 
 
 class BaseDev:
 class BaseDev:
+    @PIKA_C_MACRO_IF("PIKA_EVENT_ENABLE")
     def addEventCallBack(self, eventCallback: any): 
     def addEventCallBack(self, eventCallback: any): 
         """ Add an event callback. """
         """ Add an event callback. """
 
 
     @abstractmethod
     @abstractmethod
+    @PIKA_C_MACRO_IF("PIKA_EVENT_ENABLE")
     def platformGetEventId(self): ...
     def platformGetEventId(self): ...