getPower()返回用于由传感器在使用时在毫安电源:
现在,我需要计算多少电池所使用的传感器的配准。
他是否值由getPower()返回表示毫安(每小时MA)或其他什么东西? 如果是的话,有没有办法让电池毫安,以计算传感器所使用的电池的百分比?
getPower()返回用于由传感器在使用时在毫安电源:
现在,我需要计算多少电池所使用的传感器的配准。
他是否值由getPower()返回表示毫安(每小时MA)或其他什么东西? 如果是的话,有没有办法让电池毫安,以计算传感器所使用的电池的百分比?
Something quite related has been discussed in Google groups not too long ago. You can find the full thread here for reference.
A small excerpt from the last reply in that thread, which should answer your question more or less:
(...) the battery capacity is always given in terms of mAH. (...) What matters is how long a battery can supply a given current at its rated voltage. 3800mAH means that it can supply 3800mA for 1 hour. Knowing this it makes sense now that the API is providing the current drain as a metric of power consumption. You can now calculate how much effect it will have on the battery life as a function of time.