CN107491291A - The method that intelligent machine shutdown charging shows time and date - Google Patents
The method that intelligent machine shutdown charging shows time and date Download PDFInfo
- Publication number
- CN107491291A CN107491291A CN201610698573.5A CN201610698573A CN107491291A CN 107491291 A CN107491291 A CN 107491291A CN 201610698573 A CN201610698573 A CN 201610698573A CN 107491291 A CN107491291 A CN 107491291A
- Authority
- CN
- China
- Prior art keywords
- time
- date
- shutdown
- charging
- intelligent machine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
The present invention discloses a kind of method that intelligent machine shutdown charging shows time and date, including implemented below step:System enters shutdown charge mode by the BootLoader first;Then by the time-zone information when user data storage region obtains last time shutdown, and current time zone is arranged to, while passes through function and calculate acquisition time and date and time information;Furthermore system trigger on charger, start shutdown charging service charger, and intelligent machine proceeds by charging;Triggered finally by function, draw current time and date, and time, date and charged state are included on the display screen of intelligent machine.After system enters shutdown charge mode by init, initialization shows resource, after charging starts, draws shutdown charged interface, so as to reach the effect that time and date is shown in shutdown charged interface.Mobile phone is charged, system real time date and time is can obtain in charged interface, allows and charge faster, use is more intimate.
Description
Technical field
The present invention relates to the technical field of intelligent machine, more particularly to a kind of shutdown charging of intelligent machine to show time and date
Method.
Background technology
Intelligent machine is powerful, but power consumption is also very severe, thus mobile phone charging be live daily it is essential.
Charged in shutdown, all intelligent machines are can not to show time and date in the market, but we are usually again in need
Know the demand of time and date, if so can be charged in shutdown, allow screen display time and date, particularly at night,
Need not so start shooting again just can quickly view date and time, very convenient.
The content of the invention
For weak point present in above-mentioned technology, it is aobvious that the present invention provides a kind of easy to operate intelligent machine shutdown charging
Show the method for time and date.
In order to achieve the above object, the method that a kind of intelligent machine shutdown charging of the present invention shows time and date, including with
Under realize step:
S1, start shutdown charge mode:System enters shutdown charge mode by the BootLoader;
S2, initialization show resource:By the time-zone information when user data storage region obtains last time shutdown, and it is arranged to
Current time zone, while calculated by function and obtain time and date and time information;
S3, shutdown charge control:System trigger on charger, start shutdown charging service charger, and intelligent machine proceeds by
Charging;
S4, shutdown charged interface are drawn:Triggered by function, draw current time and date, and by time, date and fill
Electricity condition is shown on the display screen of intelligent machine.
Wherein, in the case of the normal boot-strap of intelligent machine, user is set behind time zone to store the file variable of time-zone information
The mode of name attribute is stored in user data storage region, and the concrete operations that time-zone information is obtained in S2 comprise the following steps:
S21, under the charge mode that shuts down, by the modification to system initialization boot configuration script, be allowed to fill starting shutdown
Electricity services charger, before first carry user data subregion;
S22, attribute information is loaded by load_persist_props functions, this function is used for loading in user storage space
With persist originate name attribute;
S23, the file variable name attribute information for reading storage time-zone information is loaded by load_persist_props functions;
S24, storage time-zone information is obtained, be arranged to current time zone.
Wherein, after S24, in addition to S25 calculates the process for obtaining time and date and time information, the realization of Time of Day
Completed in the library file for encapsulating icon drafting interface, calculating the function of acquisition time and date and time information includes:
time_t timep;
struct tm *p;
time(&timep);
p=localtime(&timep)。
Wherein, the calculating function that drafting current time and date use in S4 includes:
fill_animation_date;
fill_animation_time。
Wherein, also include triggering the initialization event events that drawn Time of Day is shown between S3 and S4,
Its specific implementation is button operation, plugs USB message event, and under charged state, the initialization of button operation, short-press shows
Show charging logo, long-press start, this function judges key-press status using event_loop in event events, confirms that DC is
No plug;
If long-press is started shooting:Perform the function call of restarting equipment;
If extract DC:Perform the function call of power-off operation.
Wherein, after S4 progress Time of Days are shown, also to carry out S5 and create the device node with charging chip interaction,
The process of socket information notice application layer, two programs on network realize data by a two-way communication connection
Exchange, one end of this connection is referred to as a socket.
Wherein, S5 concrete operations are:
Using function uevent_open_socket application is notified by way of initializing uevent environment functions and calling
Layer, is exactly to broadcast a message toward a socket, it is only necessary to monitors kernel to bottom transmission in application layer open socket
Message, it is possible to receive, create the filec descriptor that socket interfaces obtain uevent in this process, then triggering is same
Uevent under the device node catalogue and its subdirectory of charging chip interaction, then receives and creates device node, so far equipment
Node just calculates establishment.
Function uevent_open_socket is the socket for opening uevent.Here uevent is to use netlink
In kernel events to User space notify(KOBJECT_UEVENT)Function, it is that kernel and User space carry out bidirectional data transfers
Extraordinary mode;Uevent is a Kobject part, for when Kobject states change, such as increase, is moved
Except etc., notify user space program.After user space program receives such event, corresponding processing can be done.
Wherein, during charge control of being shut down in S3, the mode for charging of shutting down has:Battery norma
Charging is charged normal, Battery fast charging quick charges and Battery wireless charging
Three kinds of modes of wireless charging.
The beneficial effects of the invention are as follows:
Compared with prior art, the method that intelligent machine of the invention shutdown charging shows time and date, shuts down day in charging interval
The display of phase, realized based on the extension to shutdown charging.After system enters shutdown charge mode by init, initialization is aobvious
Show resource, to obtain time-zone information and Time of Day information, after charging starts, shutdown charged interface is drawn, so as to reach
The effect of time and date is shown in shutdown charged interface.When intelligent machine in the present invention shuts down, mobile phone is charged, charged
Interface can obtain system real time date and time, allows and charges faster, use is more intimate.
Brief description of the drawings
Fig. 1 is the schematic flow sheet for the method that intelligent machine of the present invention shutdown charging shows time and date;
Fig. 2 is that present invention initialization shows the schematic flow sheet that time-zone information is obtained in resources step.
Embodiment
In order to more clearly state the present invention, the present invention is further described below in conjunction with the accompanying drawings.
Refering to Fig. 1, a kind of method of intelligent machine shutdown charging display time and date of the present invention, including implemented below step
Suddenly:
S1, start shutdown charge mode:System enters shutdown charge mode by the BootLoader;
S2, initialization show resource:By the time-zone information when user data storage region obtains last time shutdown, and it is arranged to
Current time zone, while calculated by function and obtain time and date and time information;
S3, shutdown charge control:System trigger on charger, start shutdown charging service charger, and intelligent machine proceeds by
Charging;
S4, shutdown charged interface are drawn:Triggered by function, draw current time and date, and by time, date and fill
Electricity condition is shown on the display screen of intelligent machine.
Compared to prior art, the method for intelligent machine of the invention shutdown charging display time and date, when shutdown is charged
Between the date display, be based on to shutdown charging extension realize.After system enters shutdown charge mode by init, initially
Change and show resource, to obtain time-zone information and Time of Day information, after charging starts, draw shutdown charged interface, so as to
The effect that time and date is shown in shutdown charged interface is reached.When intelligent machine in the present invention shuts down, mobile phone is charged,
Charged interface can obtain system real time date and time, allows and charges faster, use is more intimate.
In the present embodiment, in the case of the normal boot-strap of intelligent machine, user is set behind time zone to store time-zone information
The mode of file variable name attribute is stored in user data storage region, in S2 obtain time-zone information concrete operations include with
Lower step:
S21, under the charge mode that shuts down, by the modification to system initialization boot configuration script, be allowed to fill starting shutdown
Electricity services charger, before first carry user data subregion;
S22, attribute information is loaded by load_persist_props functions, this function is used for loading in user storage space
With persist originate name attribute;
S23, the file variable name attribute information for reading storage time-zone information is loaded by load_persist_props functions;
S24, storage time-zone information is obtained, be arranged to current time zone.
In the present embodiment, after S24, in addition to S25 calculates the process for obtaining time and date and time information, when every other day
The realization of phase is completed in the library file for encapsulating icon drafting interface, calculates the function bag for obtaining time and date and time information
Include:
time_t timep;
struct tm *p;
time(&timep);
p=localtime(&timep)。
In the present embodiment, the calculating function that drafting current time and date use in S4 includes:
fill_animation_date;
fill_animation_time。
The specific programming operation mode of drawing process is:
void fill_animation_date(unsigned int index, unsigned int position, void
*fill_addr,void * logo_addr, LCM_SCREEN_T phical_screen);
void fill_animation_time(unsigned int index, unsigned int position, void
*fill_addr,void * logo_addr, LCM_SCREEN_T phical_screen)。
In the present embodiment, also include triggering the initialization that drawn Time of Day is shown between S3 and S4
Event events, its specific implementation is button operation, plugs USB message event, under charged state, at the beginning of button operation
Beginningization, short-press display charging logo, long-press start, using event_loop, this function judges to press key-like in event events
State, confirms whether DC plugs;
If long-press is started shooting:Perform the function call of restarting equipment;
If extract DC:Perform the function call of power-off operation.
In the present embodiment, after S4 progress Time of Days are shown, also to carry out S5 and create with charging chip interaction
Device node, socket information is notified the process of application layer, two programs on network pass through a two-way communication connection
The exchange of data is realized, one end of this connection is referred to as a socket.
In the present embodiment, S5 concrete operations are:
Using function uevent_open_socket application is notified by way of initializing uevent environment functions and calling
Layer, is exactly to broadcast a message toward a socket, it is only necessary to monitors kernel to bottom transmission in application layer open socket
Message, it is possible to receive, create the filec descriptor that socket interfaces obtain uevent in this process, then triggering is same
Uevent under the device node catalogue and its subdirectory of charging chip interaction, then receives and creates device node, so far equipment
Node just calculates establishment.
Function uevent_open_socket is the socket for opening uevent.Here uevent is to use netlink
In kernel events to User space notify(KOBJECT_UEVENT)Function, it is that kernel and User space carry out bidirectional data transfers
Extraordinary mode;Uevent is a Kobject part, for when Kobject states change, such as increase, is moved
Except etc., notify user space program.After user space program receives such event, corresponding processing can be done.
In the present embodiment, during charge control of being shut down in S3, the mode for charging of shutting down has:Battery
Norma charging are charged normal, Battery fast charging quick charges and Battery wireless
Three kinds of modes of charging wireless chargings.
Disclosed above is only several specific embodiments of the present invention, but the present invention is not limited to this, any ability
What the technical staff in domain can think change should all fall into protection scope of the present invention.
Claims (8)
1. a kind of method that intelligent machine shutdown charging shows time and date, it is characterised in that including implemented below step:
S1, start shutdown charge mode:System enters shutdown charge mode by the BootLoader;
S2, initialization show resource:By the time-zone information when user data storage region obtains last time shutdown, and it is arranged to
Current time zone, while calculated by function and obtain time and date and time information;
S3, shutdown charge control:System trigger on charger, start shutdown charging service charger, and intelligent machine proceeds by
Charging;
S4, shutdown charged interface are drawn:Triggered by function, draw current time and date, and by time, date and fill
Electricity condition is shown on the display screen of intelligent machine.
2. the method that intelligent machine shutdown charging according to claim 1 shows time and date, it is characterised in that in intelligence
In the case of the normal boot-strap of machine, to be stored in use in a manner of the file variable name attribute for storing time-zone information behind user's setting time zone
User data storage region, the concrete operations that time-zone information is obtained in S2 comprise the following steps:
S21, under the charge mode that shuts down, by the modification to system initialization boot configuration script, be allowed to fill starting shutdown
Electricity services charger, before first carry user data subregion;
S22, attribute information is loaded by load_persist_props functions, this function is used for loading in user storage space
With persist originate name attribute;
S23, the file variable name attribute information for reading storage time-zone information is loaded by load_persist_props functions;
S24, storage time-zone information is obtained, be arranged to current time zone.
3. the method that intelligent machine shutdown charging according to claim 2 shows time and date, it is characterised in that in S24
Afterwards, in addition to S25 calculates the process for obtaining time and date and time information, and the realization of Time of Day is connect encapsulating icon and draw
Completed in the library file of mouth, calculating the function of acquisition time and date and time information includes:
time_t timep;
struct tm *p;
time(&timep);
p=localtime(&timep)。
4. the method that intelligent machine shutdown charging according to claim 1 shows time and date, it is characterised in that in S4
The calculating function that drafting current time and date use includes:
fill_animation_date;
fill_animation_time。
5. the method that intelligent machine according to claim 1 shutdown charging shows time and date, it is characterised in that in S3 and
Also include triggering the initialization event events that drawn Time of Day is shown between S4, its specific implementation be by
Key operation, the message event for plugging USB, under charged state, the initialization of button operation, short-press display charging logo, long-press opens
Machine, using event_loop, this function judges key-press status in event events, confirms whether DC plugs;
If long-press is started shooting:Perform the function call of restarting equipment;
If extract DC:Perform the function call of power-off operation.
6. the method that intelligent machine shutdown charging according to claim 1 shows time and date, it is characterised in that enter in S4
After row Time of Day is shown, also to carry out S5 and create the device node with charging chip interaction, should socket information notice
With the process of layer.
7. the method that intelligent machine shutdown charging according to claim 6 shows time and date, it is characterised in that S5 tool
Gymnastics conduct:
Using function uevent_open_socket application is notified by way of initializing uevent environment functions and calling
Layer, is exactly to broadcast a message toward a socket, it is only necessary to monitors kernel to bottom transmission in application layer open socket
Message, it is possible to receive, create the filec descriptor that socket interfaces obtain uevent in this process, then triggering is same
Uevent under the device node catalogue and its subdirectory of charging chip interaction, then receives and creates device node, so far equipment
Node just calculates establishment.
8. the method that intelligent machine shutdown charging according to claim 1 shows time and date, it is characterised in that in S3
During charge control of shutting down, the mode for charging of shutting down has:Battery norma charging are charged normal, Battery
Fast charging quick charges and Battery wireless charging three kinds of modes of wireless charging.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610698573.5A CN107491291A (en) | 2016-08-22 | 2016-08-22 | The method that intelligent machine shutdown charging shows time and date |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610698573.5A CN107491291A (en) | 2016-08-22 | 2016-08-22 | The method that intelligent machine shutdown charging shows time and date |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107491291A true CN107491291A (en) | 2017-12-19 |
Family
ID=60642872
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610698573.5A Withdrawn CN107491291A (en) | 2016-08-22 | 2016-08-22 | The method that intelligent machine shutdown charging shows time and date |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107491291A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108494967A (en) * | 2018-03-29 | 2018-09-04 | 青岛海信移动通信技术股份有限公司 | time display method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020188838A1 (en) * | 1999-06-18 | 2002-12-12 | Welder W. Dean | Method and apparatus for providing content on a computer system based on usage profile |
CN1780431A (en) * | 2004-11-24 | 2006-05-31 | 中兴通讯股份有限公司 | Time displaying method for cell phone |
CN101937342A (en) * | 2010-09-16 | 2011-01-05 | 广东欧珀移动通信有限公司 | Method for displaying time of handheld mobile terminal |
CN101977265A (en) * | 2010-10-19 | 2011-02-16 | 惠州Tcl移动通信有限公司 | Method for viewing time in off state of mobile phone and mobile phone thereof |
CN102014204A (en) * | 2010-10-28 | 2011-04-13 | 惠州Tcl移动通信有限公司 | Method for displaying time in shutdown state of mobile terminal |
US20160062431A1 (en) * | 2014-08-29 | 2016-03-03 | Zippy Technology Corp. | Redundant power supply system providing rapid start of backup |
CN105446674A (en) * | 2014-07-31 | 2016-03-30 | 展讯通信(上海)有限公司 | Method and system for quickly displaying charging icon of mobile terminal |
-
2016
- 2016-08-22 CN CN201610698573.5A patent/CN107491291A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020188838A1 (en) * | 1999-06-18 | 2002-12-12 | Welder W. Dean | Method and apparatus for providing content on a computer system based on usage profile |
CN1780431A (en) * | 2004-11-24 | 2006-05-31 | 中兴通讯股份有限公司 | Time displaying method for cell phone |
CN101937342A (en) * | 2010-09-16 | 2011-01-05 | 广东欧珀移动通信有限公司 | Method for displaying time of handheld mobile terminal |
CN101977265A (en) * | 2010-10-19 | 2011-02-16 | 惠州Tcl移动通信有限公司 | Method for viewing time in off state of mobile phone and mobile phone thereof |
CN102014204A (en) * | 2010-10-28 | 2011-04-13 | 惠州Tcl移动通信有限公司 | Method for displaying time in shutdown state of mobile terminal |
CN105446674A (en) * | 2014-07-31 | 2016-03-30 | 展讯通信(上海)有限公司 | Method and system for quickly displaying charging icon of mobile terminal |
US20160062431A1 (en) * | 2014-08-29 | 2016-03-03 | Zippy Technology Corp. | Redundant power supply system providing rapid start of backup |
Non-Patent Citations (3)
Title |
---|
CHENQIANGJSJ: "C语言时间函数", 《HTTPS://WWW.CNBLOGS.COM/CHENQIANGJSJ/ARCHIVE/2011/04/06/2007054.HTML》 * |
CSLUNATIC: "【转】android 电池(二):android关机充电流程、充电画面显示", 《HTTPS://WWW.CNBLOGS.COM/CSLUNATIC/P/3637842.HTML》 * |
鸭子船长: "Android属性(property)机制", 《HTTPS://WWW.CNBLOGS.COM/ZL1991/P/5364690.HTML》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108494967A (en) * | 2018-03-29 | 2018-09-04 | 青岛海信移动通信技术股份有限公司 | time display method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104205016B (en) | A kind of photographic method and mobile terminal | |
CN102385792B (en) | Electronic equipment and operation method thereof | |
CN103019542A (en) | Method for quickly photographing under screen locking interface | |
US8738094B2 (en) | Automatically enabling wireless communication | |
CN102014204B (en) | Method for displaying time in shutdown state of mobile terminal | |
CN104850211B (en) | The method of power saving when smart machine is shot | |
CN111464674B (en) | Electronic equipment and temperature control method thereof during charging | |
CN103648045A (en) | Method and device for switching display interface through side navigation bar | |
CN102735346B (en) | Refrigeration thermal infrared imager and power supply management method thereof | |
CN102014021A (en) | Method and device for controlling connection/disconnection of data link | |
CN103024200B (en) | Be applied to image pickup method and the filming apparatus of intelligent terminal | |
CN105811508A (en) | Mobile terminal charging method and mobile terminal | |
CN106685018B (en) | Reverse charging method and device and terminal | |
CN104994427A (en) | Method and system for configuring and managing self-start-up of smart television desktop | |
CN103558947A (en) | Method for touch-controlling terminal startup and shutdown and touch control terminal | |
CN104750237A (en) | Multi-screen interactive connection method and device as well as electronic equipment | |
CN103870290B (en) | A kind of switching method and equipment | |
CN107491291A (en) | The method that intelligent machine shutdown charging shows time and date | |
CN114283573A (en) | Equipment control method and device, electronic equipment and storage medium | |
CN108900912A (en) | Screen protection setting method, smart television and computer readable storage medium | |
CN102253690A (en) | Computer integration device, system and method | |
CN104102498A (en) | Mobile terminal and booting method thereof | |
CN103648029B (en) | The energising guard method of intelligent television and system | |
CN115268340A (en) | Electronic device and control method | |
CN105094585A (en) | Mobile phone capable of performing rapid shooting on lock screen |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20171219 |