简体   繁体   English

iPhone电池充电指示灯

[英]iphone battery charging indicator

Context: 内容:

iPhone is connected to the PC via cable and power indicated 100% ( the icon of the batter contains a small power plug also) iPhone通过电缆连接到PC,电源指示为100%(电池图标也包含一个小电源插头)

Question: 题:

In this stage the phone is powered directly from USB or is it using the battery ? 在此阶段,电话直接由USB供电还是使用电池供电?

Thanks 谢谢

(From developer point of view): there's UIDeviceBatteryState enumeration that contains the battery power state of the device. (从开发人员的角度来看):有一个UIDeviceBatteryState枚举,其中包含设备的电池电量状态。 Among its possible values: 其可能的值包括:

  • UIDeviceBatteryStateUnplugged : The device is not plugged into power; UIDeviceBatteryStateUnplugged :设备未接通电源; the battery is discharging 电池正在放电

  • UIDeviceBatteryStateFull : The device is plugged into power and the battery is 100% charged. UIDeviceBatteryStateFull :设备已插入电源,并且电池已100%充电。

So from these descriptions follows that device does not drain battery if it is plugged into power even if it is 100% charged. 因此,从这些描述可以看出,即使设备已充电100%,只要电源接通,设备也不会耗尽电池电量。

I think the device is always drawing off the battery in order to guarantee a smooth power curve ie the battery works like a buffer of sorts. 我认为该设备始终在消耗电池电量,以确保功率曲线平滑,即电池的工作方式类似于缓冲。 (It also simplifies the hardware.) However, when it is plugged in, the power system continually charges the battery so the net charge on the battery never changes. (这也简化了硬件。)但是,插入电源时,电源系统会不断为电池充电,因此电池上的净电荷永远不会改变。

I don't think that has any relevance to programming. 我认为这与编程没有任何关系。 Usually, you only need to know if a device is plugged in if you're doing something that might take longer than the battery can last. 通常,如果您执行的操作所花费的时间可能比电池可以使用的时间更长,则只需知道设备是否已插入电源。 In that case, where the power comes from while plugged in really doesn't matter. 在这种情况下,插上电源的位置实际上并不重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM