在谷歌玻璃检测过热programmaticaly [英] Detect overheating in Google Glass programmaticaly

查看:177
本文介绍了在谷歌玻璃检测过热programmaticaly的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如许多其他的我对着谷歌玻璃过热问题。我的问题是如何检测到它的应用程序吗?

As many of other I am facing the google glass overheating issue. My question is how to detect it in the application?

我一直在寻找通过日志,但没有表示它预期的消息在屏幕上。

I was looking through the log but nothing that indicates it expect a message on the screen.

推荐答案

谷歌玻璃有(至少)两个温度探头。
一为的电池的,和其他的的 CPU板的。照片 你可以阅读他们作为一个普通的文件。

Google Glass have (at least) two temperature probes.
One for the battery, and the other for the CPU board.
You can read them as a regular file.

电池
/sys/devices/platform/omap_i2c.1/i2c-1/1-0055/power_supply/bq27520-0/temp

CPU板
/sys/devices/platform/notle_pcb_sensor.0/temperature

但请记住,这些文件可能会改变位置,如谷歌玻璃的新版本出货。

But keep in mind that these files may change location as new versions of Google Glass are shipped.

的code (简体版)

private String readTemperature(String path) throws IOException {
    return new BufferedReader(new InputStreamReader(new FileInputStream(new File(path)))).readLine();
}

国米pretation

你会得到这些文件的值是不同的单位。
CPU板温度必须由1000分取得℃的温度。
电池温度必须由10分取得℃的温度。

The values you'll get from these files are in different units.
The CPU Board temperature must be divided by 1000 to get the temperature in °C.
The battery temperature must be divided by 10 to get the temperature in °C.

的logcat

在logcat中还为您提供了温度每分钟左右的一行日志。
你甚至可以解析:

The logcat also gives you the temperatures every minutes or so in a one line log.
You could even parse it:

I / UserEventService(568):[GlassUserEventPerformanceStats ... battery_temperature_milli_centigrade:34000 board_temperature_milli_centigrade:44000]

从我的经验,CPU板的值可以从25℃到70℃。
如果你去超过70°C,您的应用程序或任何活动的应用程序很可能会被系统杀死,你会看到玻璃必须降温平稳运行。

From what I've experience, values of the CPU board can go from 25°C to 70°C.
If you go above 70°C, you app or any active app is likely to be killed by the system and you'll see the message "Glass must cool down to run smoothly".

这篇关于在谷歌玻璃检测过热programmaticaly的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆