This application claims priority to Chinese Patent Application No. 201611101223.2 filed on Dec. 5, 2016, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to device management, especially relates to an device with automatic shutdown function and method with automatic shutdown function.
When an electronic device, such as a smart phone or a tablet computer, is dropped, some elements of the electronic device can deform and generate short circuit. Also, when the electronic device falls into water and does not shut down, the motherboard of the electronic can be damaged by a short circuit.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. Several definitions that apply throughout this disclosure will now be presented. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
The term “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an EPROM. The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term “comprising” indicates “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series, and the like.
The storage device 12 stores data and software program code of the device 1. For example, the storage device 12 stores a preset acceleration value or a preset distance value. In at least one exemplary embodiment, the storage device 12 can include various types of non-transitory computer-readable storage mediums. For example, the storage device 12 can be an internal storage system, such as a flash memory, a random access memory (RAM) for temporary storage of information, and/or a read-only memory (ROM) for permanent storage of information. In another embodiment, the storage device 12 can also be an external storage system, such as a hard disk, a storage card, or a data storage medium. The processor 13 is used to execute software program code or operational data stored in the storage device 13. The processor 13 can be a central processing unit (CPU), a microprocessor, or other data processor chip.
The acquiring module 101 acquires the acceleration value of the device 1 detected by the acceleration sensor 11.
The determining module 102 determines whether the acceleration value of the device 1 is more than the preset acceleration value.
The timing module 103 controls the timing unit 16 to begin counting time when the acceleration value is more than the preset acceleration value.
The calculation module 104 calculates a travel distance of the device 1 according to the acceleration value acquired by the acquiring module 101 and the time detected by the timing module 103.
The determining module 102 further determines whether the travel distance of the automatic shutdown 1 is more than a preset distance.
The control module 105 controls the power management system 15 to shut down the power supply device 14 to stop supplying power for the device 1 when the acceleration value is more than the preset acceleration value.
In at least one exemplary embodiment, the preset acceleration value is 9.8 m/s2. The preset distance is 0.2 m. Namely, when the determining module 102 determines that the acceleration value of the device 1 is at least 9.8 m/s2, the timing module 102 starts to time. The calculation module 104 calculates the travel distance of the device 1 according to the acceleration value of the device 1 acquired by the acquiring module 101 and the time detected by the timing module 103. When the travel distance is more than 0.2 m at the above acceleration value, the control module 105 controls the power management system 15 to shut down the power supply device 14.
The setting module 201 provides a setting interface 3 for a user to set the preset acceleration value and the preset distance.
The acquiring module 202 acquires the acceleration value of the device 1 detected by the acceleration sensor 11.
The determining module 203 determines whether the acceleration value of the device 1 is more than the preset acceleration value set by the setting module 201.
The timing module 204 controls the timing unit 16 to begin timing when the acceleration value is more than the preset acceleration value.
The calculation module 205 calculates a travel distance of the device 1 according to the acceleration value acquired by the acquiring module 202 and the time detected by the timing module 204.
The determining module 203 further determines whether the travel distance of the automatic shutdown 1 is more than the preset distance set by the setting module 201.
The control module 105 controls the power management system 15 to shut down the power supply device 14when the acceleration value is more than the preset acceleration value.
At block 501, the device acquires an acceleration value of the device detected by a acceleration sensor.
At block 502, the device determines whether the acceleration value of the device is more than a preset acceleration value. In at least one exemplary embodiment, when the acceleration value of the device is more than the preset acceleration value, the method executes block 503, otherwise, the method executes block 501. In at least one exemplary embodiment, the preset acceleration value is 9.8 m/s2.
At block 503, the device controls a timing unit to begin counting time.
At block 504, the device acquires the timing of the timing unit.
At block 505, the device calculates a travel distance of the device according to the acceleration value and the time.
At block 506, the device determines whether the travel distance of the device is more than a preset distance. In at least one exemplary embodiment, when the travel distance of the automatic shutdown is more than the preset distance, the method executes block 507, otherwise, the method executes block 505. In at least one exemplary embodiment, the preset distance can be 0.2 m.
At block 507, the device controls a power management system to shut down a power supply device to stop supplying power.
At block 601, the device provides a setting interface for a user to set the preset acceleration value and the preset distance. In at least one exemplary embodiment, the setting interface includes a first setting option and a second setting option. The first setting option is used to set the preset acceleration value. The second setting option is used to set the preset distance.
At block 602, the device acquires an acceleration value of the device detected by a acceleration sensor.
At block 603, the device determines whether the acceleration value of the device is more than the preset acceleration value. In at least one exemplary embodiment, when the acceleration value of the device is more than the preset acceleration value, the method executes block 604, otherwise, the method executes block 602.
At block 604, the device controls a timing unit to begin counting time.
At block 605, the device acquires the timing of the timing unit.
At block 606, the device calculates a travel distance of the device according to the acceleration value and the time.
At block 607, the device determines whether the travel distance of the automatic shutdown is more than a preset distance. In at least one exemplary embodiment, when the travel distance of the automatic shutdown is more than the preset distance, the method executes block 507, otherwise, the method executes block 505.
At block 608, the device controls a power management system to shut down a power supply device to stop supplying power.
It should be emphasized that the above-described embodiments of the present disclosure, including any particular embodiments, are merely possible examples of implementations, set forth for a clear understanding of the principles of the disclosure. Many variations and modifications can be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
201611101223.2 | Dec 2016 | CN | national |