Electronic apparatus, control method thereof, and storage medium
An electronic apparatus communicates with a battery and obtains, from the battery, information related to a remaining capacity of the battery. The apparatus identifies a communication standard for obtaining the information related to the remaining capacity of the battery, and outputs a remaining level of the battery obtained based on the information related to the remaining capacity of the battery. The apparatus obtains the remaining level of the battery by adjusting the remaining capacity of the battery in accordance with the communication standard being identified.
1 . An electronic apparatus comprising:
a CPU which functions as:
a communication unit configured to communicate with a battery;
an obtaining unit configured to obtain, from the battery, information related to a remaining capacity of the battery via the communication unit;
an identification unit configured to identify a communication standard for obtaining the information related to the remaining capacity of the battery; and
an output unit configured to output a remaining level of the battery obtained based on the information related to the remaining capacity of the battery,
wherein the output unit obtains the remaining level of the battery by adjusting the remaining capacity of the battery in accordance with the communication standard being identified,
wherein the electronic apparatus can obtain information related to a remaining capacity of a dedicated battery exclusively used for the electronic apparatus, via a connection unit configured to connect the dedicated battery,
wherein the output unit adjusts the remaining capacity of the battery in accordance with the communication standard being identified, but does not adjust the remaining capacity of the dedicated battery.
2 . The electronic apparatus of claim 1 , wherein the output unit adjusts the remaining capacity of the battery by applying a correction amount, in accordance with the communication standard being identified, to the remaining capacity of the battery.
3 . The electronic apparatus of claim 2 ,
wherein the output unit applies a first correction amount to the remaining capacity of the battery, in a case where the communication standard being identified is a first communication standard, and
the output unit applies a second correction amount that is larger than the first correction amount to the remaining capacity of the battery, in a case where the communication standard being identified is a second communication standard earlier than the first communication standard.
4 . The electronic apparatus of claim 1 , wherein the output unit adjusts the remaining capacity of the battery in a case where the communication standard being identified is a second communication standard earlier than a first communication standard, such that the remaining capacity of the battery varies more largely than a case where the first communication standard is identified.
5 . The electronic apparatus of claim 1 , wherein the output unit adjusts the remaining capacity of the battery, in a case where the communication standard being identified is a second communication standard earlier than a first communication standard, by using a calculation formula that causes the remaining capacity of the battery to vary more largely than a case where the first communication standard is identified.
6 . The electronic apparatus of claim 1 , wherein the output unit adjusts the remaining capacity of the battery in a case where the communication standard being identified is a second communication standard earlier than a first communication standard, or does not adjust the remaining capacity of the battery in a case where the communication standard being identified is a communication standard equal to or later than the first communication standard.
7 . The electronic apparatus of claim 1 , wherein the identification unit obtains information for identifying the communication standard from the battery via the communication unit.
8 . The electronic apparatus of claim 1 , wherein the identification unit identifies the communication standard, based on a format of storing the information related to the remaining capacity of the battery.
9 . The electronic apparatus of claim 3 , wherein the first communication standard is a communication standard that specifies the transmission of information related to the remaining capacity of the battery to be mandatory, and the second communication standard is a communication standard that specifies the transmission of information related to the remaining capacity of the battery to be optional.
10 . The electronic apparatus of claim 1 , wherein the identifying of the communication standard by the identifying unit includes identifying a version or a revision of the communication standard.
11 . The electronic apparatus of claim 2 ,
wherein the information related to the remaining capacity of the battery corresponds to the remaining capacity of the battery, and
the correction amount is a correction amount for the remaining capacity of the battery.
12 . The electronic apparatus of claim 1 , wherein the communication unit performs CC communication based on a USB Type-C standard.
13 . A method of controlling an electronic apparatus that includes a communication unit configured to communicate with a battery, the method comprising:
obtaining, from the battery, information related to a remaining capacity of the battery via the communication unit;
identifying a communication standard for obtaining the information related to the remaining capacity of the battery; and
outputting a remaining level of the battery obtained based on the information related to the remaining capacity of the battery,
wherein, in the outputting, the remaining level of the battery is obtained by adjusting the remaining capacity of the battery in accordance with the communication standard being identified,
wherein the method further comprises obtaining information related to a remaining capacity of a dedicated battery exclusively used for the electronic apparatus, via a connection unit of the electronic apparatus configured to connect the dedicated battery,
wherein, in the outputting, the remaining capacity of the battery is adjusted in accordance with the communication standard being identified, but the remaining capacity of the dedicated battery is not adjusted.
14 . A non-transitory computer-readable storage medium comprising instructions for performing a method of controlling an electronic apparatus that includes a communication unit configured to communicate with a battery, the method comprising:
obtaining, from the battery, information related to a remaining capacity of the battery via the communication unit;
identifying a communication standard for obtaining the information related to the remaining capacity of the battery; and
outputting a remaining level of the battery obtained based on the information related to the remaining capacity of the battery,
wherein, in the outputting, the remaining level of the battery is obtained by adjusting the remaining capacity of the battery in accordance with the communication standard being identified,
wherein the method further comprises obtaining information related to a remaining capacity of a dedicated battery exclusively used for the electronic apparatus, via a connection unit of the electronic apparatus configured to connect the dedicated battery,
wherein, in the outputting, the remaining capacity of the battery is adjusted in accordance with the communication standard being identified, but the remaining capacity of the dedicated battery is not adjusted.