DEKI/ENGINE 文档
手册 API 参考
deki-rtc 0.40.1
Deki 包参考
deki-rtc

实时时钟外设。通过场景组件读写实际时间,后端为 DS3231(I²C)。

仓库:github.com/dekiengine/deki-rtc · 最新版本:0.40.0 · 需要引擎 0.40.0 或更高版本 · 依赖:deki-i2c

使用 DekiEditor --packages-add deki-rtc <project> 或通过包管理器安装。引擎自身的组件和 C++ API 见 Deki 文档。

在编辑器中显示为 **RTC (Real-Time Clock)**。

组件

组件 类别 说明
DS3231RTCComponent 传感器 通过 I2C 读取和设置 DS3231 实时时钟。
SystemClockRTCComponent 系统 使用计算机自身的时钟作为实时时钟,用于在编辑器和桌面上运行时。

功能开关

可以从构建中去掉的部分。带有 define 的功能通过该 define 开关,其余的随其组件一起被剥离。

功能 define 默认值
DS3231 (I²C) DEKI_FEATURE_RTC_DS3231 开

组件参考

DS3231RTCComponent

通过 I2C 读取和设置 DS3231 实时时钟。

检视器中的名称:DS3231 RTC · 类别:传感器 · 类型:DekiRtc::DS3231RTCComponent

属性 类型 默认值 约束 说明
i2cPort int32 0 0 到 3 时钟芯片所在的 I2C 总线。必须与设置该端口的 I2C 总线组件一致。

SystemClockRTCComponent

使用计算机自身的时钟作为实时时钟,用于在编辑器和桌面上运行时。

检视器中的名称:系统时钟 RTC · 类别:系统 · 类型:DekiRtc::SystemClockRTCComponent

没有反射的属性。

更新日志

更新日志为英文。

0.40.0

Changed

  • minEngine 0.40.0: built against engine 0.40.0. A build of this package from before does not load and is rebuilt.

0.22.0

Changed

  • Translations are keyed by the editor's names with their acronyms ("I2C Port", "SPI Host" rather than "I 2c Port", "Spi Host"), which the 0.22 editor shows.
  • minEngine 0.22.0: built against engine 0.22.0. A build of this package from before does not load and is rebuilt.

更早的版本:CHANGELOG.md


由包的反射数据生成(引擎 0.40.1)。属性名就是场景文件中使用的键。重命名后会保留别名(兼容性)。