【问题标题】:WatchOS gyro calibration interruptedWatchOS 陀螺仪校准中断
【发布时间】:2020-06-15 18:58:59
【问题描述】:

我在我的 WatchOS 应用程序中实现了一些摇动手势(此处的仓库:https://github.com/ezefranca/WatchShaker)并且它正在工作,但我现在在调试器中收到以下错误: [Gyro] Manually set gyro-interrupt-calibration to 800

这是什么意思,我该如何解决?

watchShaker(didShakeWith:) 函数应该在手表摇晃时运行,但它没有运行

    override func awake(withContext context: Any?) {
        super.awake(withContext: context)
    }
        var shaker:WatchShaker = WatchShaker(shakeSensibility: .shakeSensibilityNormal, delay: 0.2)

    override func willActivate() {
        super.willActivate()

        shaker.delegate = self
        shaker.start()

        getRandomNumbers()

    }

    override func didDeactivate() {
        super.didDeactivate()
        shaker.stop()
    }

extension OneDiceController: WatchShakerDelegate {
    func watchShaker(_ watchShaker: WatchShaker, didShakeWith sensibility: ShakeSensibility) {
        self.getRandomNumbers()
    }

    func watchShaker(_ watchShaker: WatchShaker, didFailWith error: Error) {
        print(error.localizedDescription)
    }


}

【问题讨论】:

    标签: swift apple-watch gyroscope watchos


    【解决方案1】:

    嗨@noahbino,我发现了问题,看起来这些情况发生在手表支持陀螺仪传感器时。在 1.0.1 版本中的 @grimxm tip here in this answer 之后,我修复了它。

    谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多