CN109634452B - State switching method and device - Google Patents
State switching method and device Download PDFInfo
- Publication number
- CN109634452B CN109634452B CN201811293467.4A CN201811293467A CN109634452B CN 109634452 B CN109634452 B CN 109634452B CN 201811293467 A CN201811293467 A CN 201811293467A CN 109634452 B CN109634452 B CN 109634452B
- Authority
- CN
- China
- Prior art keywords
- signal
- equipment
- instruction
- state
- sending
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/044—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Electronic Switches (AREA)
- Position Input By Displaying (AREA)
Abstract
The invention discloses a state switching method and device, and relates to the technical field of communication. The problem that the flexibility is not enough and the function is single when the working state is switched through the key at present is solved. The method comprises the following steps: when receiving a contact signal sent by a detector, sending a starting signal to the equipment; and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a state switching method and apparatus.
Background
Radio Frequency Identification (RFID, Radio Frequency Identification) is a non-contact automatic Identification technology that identifies a specific target and reads and writes related data by Radio signals without establishing mechanical or optical contact between an Identification system and the specific target. In the wireless connection between the host and the slave based on the RFID, the host and the identification head (slave) realize the transmission of the wireless key and the pairing code between the identification head (slave) and the host server by using the RFID technology, and then the host and the identification head (slave) realize the pairing connection between the host and the identification head according to the wireless connection information obtained by the RFID induction, so that the complicated step of manually inputting the key or the pairing code for pairing connection can be omitted.
In the prior art, the switching of the working state of the identification head is judged according to the state of the key, and generally, the state which can be controlled by the key only comprises an on state and an off state. Therefore, the operating state of the identification head is controlled by the key, and the switching between the opening state and the closing state can be realized only by pressing the key up and down.
In summary, the existing method for switching the working state of the identification head through the key has the problems of insufficient flexibility and single function.
Disclosure of Invention
The embodiment of the invention provides a state switching method and device, which are used for solving the problems of insufficient flexibility and single function of the conventional method for switching the working state through a key.
The embodiment of the invention provides a state switching method, which comprises the following steps:
when receiving a contact signal sent by a detector, sending a starting signal to the equipment;
and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction.
Preferably, the contact signal comprises a capacitive touch signal and/or a press signal;
the capacitive touch signal is generated when a capacitive touch pad electrically coupled with the device is touched;
the pressing signal is generated when a roller electrically connected with the equipment is pressed by external force.
Preferably, the signal switching instruction comprises an activation signal and/or a scroll wheel rolling signal;
when the charging and discharging time of the capacitive touch pad is determined to be larger than a threshold value, sending the activation signal to the equipment electrically connected with the capacitive touch pad;
and when receiving a roller signal, sending the roller rolling signal to the equipment electrically connected with the roller.
Preferably, the scroll signal comprises a forward scroll signal and/or a reverse scroll signal;
the device switches states according to the signal switching instruction, and comprises:
when the received signal switching instruction is a forward rolling signal, sending the forward rolling signal to the equipment so that the equipment executes a reset programming state instruction matched with the forward rolling signal according to the forward rolling signal; or
And when the received signal switching instruction is a reverse rolling signal, sending the reverse rolling signal to the equipment so that the equipment executes an identification state instruction matched with the reverse rolling signal according to the reverse rolling signal.
Preferably, the activation signal comprises an odd-numbered activation signal and/or an even-numbered activation signal;
the device switches states according to the signal switching instruction, and comprises:
when the received signal switching instruction is an odd activation signal, sending an identification state instruction corresponding to the odd activation signal to the equipment so that the equipment executes the identification state instruction;
and when the received signal switching instruction is an even-number activation signal, sending a reset programming state instruction corresponding to the even-number activation signal to the equipment so that the equipment executes the reset programming state instruction.
Preferably, the capacitive touch pad is a capacitive sensing pad;
the threshold value is related to a time that the capacitive touch pad first generates a voltage.
An embodiment of the present invention further provides a state switching apparatus, including:
the first sending unit is used for sending a starting signal to the equipment when receiving the contact signal sent by the detector;
and the second sending unit is used for determining the current execution state of the equipment and sending the signal switching instruction to the equipment if the instruction sent by the detector is determined to be the signal switching instruction, so that the equipment can perform state switching according to the signal switching instruction.
Preferably, the contact signal comprises a capacitive touch signal and/or a press signal;
the capacitive touch signal is generated when a capacitive touch pad electrically coupled with the device is touched;
the pressing signal is generated when a roller electrically connected with the equipment is pressed by external force.
Preferably, the signal switching instruction comprises an activation signal and/or a scroll wheel rolling signal;
when the charging and discharging time of the capacitive touch pad is determined to be larger than a threshold value, sending the activation signal to the equipment electrically connected with the capacitive touch pad;
and when receiving a roller signal, sending the roller rolling signal to the equipment electrically connected with the roller.
Preferably, the scroll signal comprises a forward scroll signal and/or a reverse scroll signal;
the second sending unit is specifically configured to:
when the received signal switching instruction is a forward rolling signal, sending the forward rolling signal to the equipment so that the equipment executes a reset programming state instruction matched with the forward rolling signal according to the forward rolling signal;
and when the received signal switching instruction is a reverse rolling signal, sending the reverse rolling signal to the equipment so that the equipment executes an identification state instruction matched with the reverse rolling signal according to the reverse rolling signal.
Preferably, the activation signal comprises an odd-numbered activation signal and/or an even-numbered activation signal;
the second sending unit is specifically configured to:
when the received signal switching instruction is an odd activation signal, sending an identification state instruction corresponding to the odd activation signal to the equipment so that the equipment executes the identification state instruction;
and when the received signal switching instruction is an even-number activation signal, sending a reset programming state instruction corresponding to the even-number activation signal to the equipment so that the equipment executes the reset programming state instruction.
Preferably, the capacitive touch pad is a capacitive sensing pad;
the threshold value is related to a time that the capacitive touch pad first generates a voltage.
An embodiment of the present invention further provides a computer-readable storage medium, where a program of a state switching method is stored on the computer-readable storage medium, and the program of the wireless connection method is executed by a processor to implement the steps of the state switching method.
The embodiment of the invention also provides a system based on the state switching method, the system comprises a memory, a processor and a state switching method program which is stored on the memory and can run on the processor, and the state switching method program realizes the steps of the state switching method when being executed by the processor.
The embodiment of the invention provides a state switching method and a state switching device, wherein the method comprises the following steps: when receiving a contact signal sent by a detector, sending a starting signal to the equipment; and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction. According to the method, the controller realizes switching among the states of the equipment according to the received signal switching instruction, and as the types of the signal switching instruction can include multiple types, switching among multiple states of the equipment can be realized based on the signal switching instruction, so that the problems of insufficient flexibility and single function existing in the conventional method for switching the working states through keys are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a state switching method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a capacitive touch pad provided in an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a state switching process based on a roller according to embodiment 1 of the present invention;
fig. 4 is a schematic flowchart of a state switching process based on an activation signal according to embodiment 2 of the present invention;
fig. 5 is a schematic structural diagram of a state switching device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 exemplarily shows a schematic flow chart of a state switching method provided by an embodiment of the present invention, and as shown in fig. 1, the method mainly includes the following steps:
and 102, if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction.
In the above steps, the controller is used for controlling the device to perform state switching, that is, the main execution body of the method is the controller, and specifically, the controller is electrically connected to the detector and the device, respectively.
In step 101, when the controller determines that the detector receives the contact signal through the detector electrically connected to the controller, the controller may send a power-on signal to the device electrically connected to the controller according to the contact signal, and accordingly, the device electrically connected to the controller executes a power-on command after receiving the power-on signal, and then enters a power-on state or a standby state.
In an embodiment of the present invention, the contact signal may include a capacitive touch signal and a press signal. The above two signals are described in detail below:
one of the situations is: when the contact signal is a capacitive touch signal:
in practical application, the touch capacitance sensing circuit can be arranged on different sides of the recognition head, so when the recognition head is pressed, a capacitance touch signal can be generated on the side contacted by the recognition head correspondingly. It should be noted that, in the embodiment of the present invention, although the touch capacitance sensing circuits may be disposed on a plurality of sides of the recognition head, in the above method, only the touch capacitance sensing circuit on one side of the plurality of sides is targeted, and the touch capacitance sensing circuits on the other sides are negligible.
The controller can send a starting signal to the equipment after confirming the equipment electrically connected with the touch capacitance induction circuit, and the equipment enters a ready state by starting after receiving the starting signal.
In another case, when the touch signal is a press signal:
in practical application, when the recognition head is provided with the roller or the roller electrically connected with the recognition head is pressed, the detector electrically connected with the roller can detect the pressing signal of the roller and send the detected pressing signal to the controller. In practical application, when the roller is pressed by an external force, the detector can confirm that the roller generates a pressing signal according to the small deformation of the roller.
Further, after the controller receives the pressing signal sent by the detector, it confirms that the equipment electrically connected with the roller needs to be started or the equipment provided with the roller needs to be started, namely, the controller sends a starting signal to the equipment, and the equipment enters a ready state by starting after receiving the starting signal.
In step 102, after the device receives the power-on signal sent by the controller, the device enters a power-on state. Further, if a controller electrically connected with the detector receives a signal switching instruction sent by the detector, the controller needs to confirm the type of the signal switching instruction and then sends the signal switching instruction to the equipment, and further, after receiving the signal switching instruction, the equipment executes corresponding state switching according to the signal switching instruction.
In the embodiment of the present invention, the signal switching command includes two types, namely an activation signal and a scroll signal, and the two signal switching commands are described in detail as follows:
one of the situations is: when the signal switching command is an activation signal:
when the detector confirms that the capacitive touch pad provided with the touch capacitive sensing circuit is charged and discharged, the charging time or the discharging time of the capacitive touch pad needs to be confirmed first, and then whether an activation signal needs to be sent to the controller is confirmed according to the charging time or the discharging time.
Specifically, when the detector confirms that the charging time or the discharging time of the capacitive touch pad is equal to a preset threshold time, the detector sends an activation signal to the controller, and if the charging time or the discharging time of the capacitive touch pad is confirmed to be less than the threshold time, the detector does not send the activation signal to the controller.
It should be noted that, in the embodiment of the present invention, the preset threshold time is related to the time length when the voltage is generated by the capacitive touch panel for the first time. Specifically, fig. 2 is a schematic structural diagram of the capacitive touch pad according to the embodiment of the present invention, as shown in fig. 2, where R is an external capacitive charging resistor, and Cs is a stray capacitance between the TPAD and the surface of the recognition head when no touch is pressed. And Cx is the capacitance formed between the pressing source and TPAD when there is pressing, and the switch in the figure is a capacitance discharge switch and is connected with the input/output pin of the controller. The switch is first used to discharge the electricity on the Cs (or Cs + Cx), then the switch is turned off to allow R to charge the Cs or (Cs + Cx), and when no finger touches the Cs, the charging curve of the Cs is shown as curve A in the figure. When touched, a new capacitance Cx is introduced between the voltage source and TPAD, and the charging curve of Cs + Cx is shown as curve B in the figure. From the above figure, it can be seen that A, B the time for Vc to reach Vth is Tcs and Tcs + Tcx, respectively.
Wherein, except Cs and Cx need to be calculated, other are known, according to the capacitance charge-discharge formula: vc is V0, (1-e ^ (-t/RC)). Where Vc is the capacitor voltage, V0 is the charging voltage, R is the charging resistance, C is the capacitor capacitance, e is the natural base number, and t is the charging time. From this equation, Cs and Cx can be calculated. Touch detection is already possible as long as Tcs and Tcs + Tcx can be distinguished, with no touch being considered when the charge time is near Tcs and a touch being pressed when the charge time is greater than Tcs + Tx. Where Tx is the detection threshold, it can be confirmed that the threshold time can be set to 1/3 of Tcs according to the above formula.
Further, in the embodiment of the present invention, the activation signal includes an odd activation signal and an even activation signal. In practical application, the detector can continuously send the activation signal to the controller, and accordingly, the controller can match the signal switching instruction corresponding to the activation signal according to the accumulated times of the received activation signal. For example, when the cumulative number of times of the received activation signal is odd, an identification state instruction matching the activation signal for the odd times is sent to the device, and after the device receives the identification state instruction signal, the current state can be switched to the identification state; for example, when the cumulative number of times of receiving the activation signal is an even number, a reset programming state instruction matching the even activation signal is sent to the device, and after the device receives the reset programming state instruction, the current state may be switched to the reset programming state.
It should be noted that, in the embodiment of the present invention, a time interval during which the controller receives the activation signal sent by the detector is not specifically limited, that is, the controller has no time limit on the statistics of the number of times of accumulation of the received activation signal, for example, the time interval during which the received activation signal is accumulated may be 1s, 1min, or 1 h.
One of the situations is: when the signal switching instruction is a scroll signal:
in practical application, when the detector detects that the roller arranged on the identification head rolls, a rolling signal is sent to the controller.
In the embodiment of the invention, because the rolling of the roller can be performed with two conditions of upward rolling or downward rolling, correspondingly, when the roller generates two different rolling conditions, the roller can be determined to generate two different rolling signals according to the different rolling conditions of the roller.
Specifically, when the roller rolls upwards, the detector detects a rolling-upwards signal; when the scroll wheel rolls downwards, the detector detects a downwards rolling signal.
Further, when the controller receives an upward rolling signal sent by the detector, the controller sends a reset programming state instruction matched with the forward rolling signal to the equipment, and the equipment executes corresponding operation according to the reset programming state instruction; when the controller receives the downward rolling signal sent by the detector, an identification state instruction matched with the reverse rolling signal is sent to the equipment, and the equipment executes corresponding operation according to the identification state instruction.
It should be noted that, in practical applications, the detector may be a roller with a grating structure, or a mechanical encoder. In the embodiment of the invention, the detector is in a periodic working state.
In summary, an embodiment of the present invention provides a method and an apparatus for switching states, where the method includes: when receiving a contact signal sent by a detector, sending a starting signal to the equipment; and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction. According to the method, the controller realizes switching among the states of the equipment according to the received signal switching instruction, and as the types of the signal switching instruction can include multiple types, switching among multiple states of the equipment can be realized based on the signal switching instruction, so that the problems of insufficient flexibility and single function existing in the conventional method for switching the working states through keys are solved.
Example 1
In order to more clearly describe the state switching method provided by the embodiment of the present invention, the method is further described below with reference to the state switching flow diagram provided in fig. 3.
As shown in fig. 3, the device with the roller is initialized to a working environment, the detector detects whether the roller is pressed toward the center of the roller, if the detector detects a pressing signal, the detector sends a power-on signal to the controller, and accordingly, the controller sends a power-on signal to the device, and the device is automatically powered on and enters a standby state after receiving the power-on signal sent by the controller.
In fig. 3, D is a periodic "detector" that detects that a roller provided on the device is pressed and rolls under the pressing action; in this embodiment, D _ f represents forward scrolling, and when the signal value of the forward scrolling is equal to D, that is, when the detector detects that the scroll wheel generates a forward scrolling signal, the forward scrolling signal is sent to the controller, and accordingly, the controller sends a signal switching instruction matching the forward scrolling signal to the device, specifically, after the controller sends a reset programming state instruction to the device, the device enters a reset programming state according to the reset programming instruction. Further, D _ b represents reverse scrolling, when a signal value of the reverse scrolling is equal to D, that is, when the detector detects that the roller generates a reverse scrolling signal, the detector sends the reverse scrolling signal to the controller, and accordingly, the controller sends a signal switching instruction matched with the reverse scrolling signal to the device, specifically, after the controller sends the identification state instruction to the device, the device enters the identification state according to the identification state instruction.
It should be noted that, in practical applications, in a normal working state, the controller detects whether the roller is pressed in real time by using a signal triggering mode through the detector, and if the roller is pressed, the controller sends an instruction to enter a hibernation or shutdown state to the device, and accordingly, the device enters the hibernation or shutdown state after receiving the hibernation or shutdown state instruction.
Example 2
In order to more clearly describe the state switching method provided by the embodiment of the present invention, the method is further described below with reference to the state switching flow diagram provided in fig. 4.
As shown in fig. 4, in an initial state, the device needs to be initialized, the controller may detect the capacitive touch pad on the surface of the identification head through the detector, and further determine whether the capacitive touch pad on the identification head is held by a hand or touched by a hand, when the detector detects that the capacitive touch pad on the identification head is held by a hand or touched by a hand, the detector may send a power-on signal to the controller, accordingly, the controller sends the power-on signal to the device electrically connected to the identification head or the device provided with the identification head, and the device, after receiving the power-on signal sent by the controller, may automatically power on and enter a standby state.
It should be noted that, in practical applications, since the plurality of side surfaces included in the identification head may be provided with the capacitive touch pad, that is, when any one side surface of the identification head is held by a hand or is contacted by a hand, the capacitive touch pad may be detected by the detector, that is, when any one side surface of the identification head is held by a hand or is contacted by a hand, the controller may send the power-on signal to the identification head.
As shown in fig. 4, when the detector detects that the capacitive touch pad is charged or discharged, it determines whether to send an activation signal to the controller according to the length of the charging or discharging time of the capacitive touch pad.
Specifically, X is the time for charging and discharging the capacitive touch panel when the periodic "detector" detects the side of the identification head touched by the user, and X _ set is a charging and discharging time threshold; in this embodiment, when the detector detects that the time for charging and discharging the capacitive touch panel is greater than the charging and discharging time threshold, the detector sends an activation signal to the controller, and accordingly, the controller counts the cumulative number of times of the received activation signal, and when the cumulative value of the received activation signal is an odd number value, the controller sends an identification state instruction matched with the odd number of activation signals to the device, and after the device receives the identification state instruction signal, the current state can be switched to the identification state; when the accumulated number of the received activation signals is an even number, a reset programming state instruction matched with the even activation signals is sent to the equipment, and after the equipment receives the reset programming state instruction, the current state can be switched to a reset programming state.
It should be noted that, in this embodiment, X _ set is a default initial value of the system, and the user may set one or more sides according to the needs of the user.
It should be noted that, in practical applications, under a normal working condition, if the controller detects that the hand or the human body does not touch the identification head within a set time through the detector, the controller sends an instruction to enter the hibernation or power-off state to the device, and accordingly, the device enters the hibernation or power-off state after receiving the hibernation or power-off state instruction.
Example 3
On the basis of the foregoing embodiments, an embodiment of the present invention further provides a computer-readable storage medium, where a program of a state switching method is stored, and when the program runs on a processor, the processor may implement the following steps when the program is executed:
when receiving a contact signal sent by a detector, sending a starting signal to the equipment;
and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction.
The above-mentioned computer-readable storage medium stores a program of a state switching method, which can be executed on a processor, and any available medium or data storage device that the processor can access, including but not limited to a magnetic memory such as a flexible disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc., an optical memory such as a CD, a DVD, a BD, an HVD, etc., and a semiconductor memory such as a ROM, an EPROM, an EEPROM, a nonvolatile memory (NANDFLASH), a Solid State Disk (SSD), etc.
The computer-readable storage medium provided in the embodiment of the present invention stores a state switching method program, and when the state switching method program is executed by a processor, the state switching between the devices can be realized according to a received signal switching instruction, and the working state switching does not need to be performed by a key, so that the problems of insufficient flexibility and single function in the conventional method for performing the working state switching by a key are solved.
Example 4
On the basis of the foregoing embodiments, an embodiment of the present invention further provides a system based on a state switching method, where the system includes a memory, a processor, and a state switching method program stored in the memory and executable on the processor, and when the program is executed on the processor, the processor may implement the following steps:
when receiving a contact signal sent by a detector, sending a starting signal to the equipment;
and if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction.
The system of state-based switching methods stored on the above-described system-readable storage medium may be executed on a processor, and any available medium or data storage device that the processor can access includes, but is not limited to, magnetic memory such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, nonvolatile memories (NANDFLASHs), Solid State Disks (SSDs), etc.
In the state switching method and system provided in the embodiments of the present invention, when the program of the state switching method is executed by the processor, the switching between the states of the devices can be realized according to the received signal switching instruction, and the working state switching does not need to be performed by a key, so that the problems of insufficient flexibility and single function in the conventional method for performing the working state switching by a key are solved.
Based on the same inventive concept, embodiments of the present invention provide a state switching apparatus, and since the principle of the apparatus for solving the technical problem is similar to that of a state switching method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are not repeated.
Fig. 5 is a schematic structural diagram of a state switching apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes a first sending unit 51 and a second sending unit 52.
The first sending unit is used for sending a starting signal to the equipment when receiving the contact signal sent by the detector;
and the second sending unit is used for determining the current execution state of the equipment and sending the signal switching instruction to the equipment if the instruction sent by the detector is determined to be the signal switching instruction, so that the equipment can perform state switching according to the signal switching instruction.
Preferably, the contact signal comprises a capacitive touch signal and/or a press signal;
the capacitive touch signal is generated when a capacitive touch pad electrically coupled with the device is touched;
the pressing signal is generated when a roller electrically connected with the equipment is pressed by external force.
Preferably, the signal switching instruction comprises an activation signal and/or a scroll wheel rolling signal;
when the charging and discharging time of the capacitive touch pad is determined to be larger than a threshold value, sending the activation signal to the equipment electrically connected with the capacitive touch pad;
and when receiving a roller signal, sending the roller rolling signal to the equipment electrically connected with the roller.
Preferably, the scroll signal comprises a forward scroll signal and/or a reverse scroll signal;
the second sending unit 52 is specifically configured to:
when the received signal switching instruction is a forward rolling signal, sending the forward rolling signal to the equipment so that the equipment executes a reset programming state instruction matched with the forward rolling signal according to the forward rolling signal;
and when the received signal switching instruction is a reverse rolling signal, sending the reverse rolling signal to the equipment so that the equipment executes an identification state instruction matched with the reverse rolling signal according to the reverse rolling signal.
Preferably, the activation signal comprises an odd-numbered activation signal and/or an even-numbered activation signal;
the second sending unit 52 is specifically configured to:
when the received signal switching instruction is an odd activation signal, sending an identification state instruction corresponding to the odd activation signal to the equipment so that the equipment executes the identification state instruction;
and when the received signal switching instruction is an even-number activation signal, sending a reset programming state instruction corresponding to the even-number activation signal to the equipment so that the equipment executes the reset programming state instruction.
Preferably, the capacitive touch pad is a capacitive sensing pad;
the threshold value is related to a time that the capacitive touch pad first generates a voltage.
It should be understood that the above state switching device includes only the units logically divided according to the functions implemented by the apparatus device, and in practical applications, the above units may be stacked or split. The functions implemented by a state switching device provided in this embodiment correspond to the state switching methods provided in the above embodiments one to one, and for the more detailed processing flow implemented by the device, the detailed description is already described in the above method embodiment, and the detailed description is not repeated here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (8)
1. A method of state switching, comprising:
when receiving a contact signal sent by a detector, sending a starting signal to the equipment;
if the instruction sent by the detector is determined to be a signal switching instruction, determining the current execution state of the equipment, and sending the signal switching instruction to the equipment so that the equipment can perform state switching according to the signal switching instruction;
the contact signal comprises a capacitive touch signal and/or a press signal;
the capacitive touch signal is generated when a capacitive touch pad electrically coupled with the device is touched;
the pressing signal is generated when a roller electrically connected with the equipment is pressed by external force;
the signal switching instruction comprises an activation signal and/or a roller rolling signal;
when the charging and discharging time of the capacitive touch pad is determined to be larger than a threshold value, sending the activation signal to the equipment electrically connected with the capacitive touch pad;
when a roller signal is received, sending the roller rolling signal to the equipment electrically connected with the roller;
the scroll signal comprises a forward scroll signal and/or a reverse scroll signal;
the device switches states according to the signal switching instruction, and comprises:
when the received signal switching instruction is a forward rolling signal, sending the forward rolling signal to the equipment so that the equipment executes a reset programming state instruction matched with the forward rolling signal according to the forward rolling signal;
and when the received signal switching instruction is a reverse rolling signal, sending the reverse rolling signal to the equipment so that the equipment executes an identification state instruction matched with the reverse rolling signal according to the reverse rolling signal.
2. The method of claim 1, wherein the activation signal comprises an odd activation signal and/or an even activation signal;
the device switches states according to the signal switching instruction, and comprises:
when the received signal switching instruction is an odd activation signal, sending an identification state instruction corresponding to the odd activation signal to the equipment so that the equipment executes the identification state instruction;
and when the received signal switching instruction is an even-number activation signal, sending a reset programming state instruction corresponding to the even-number activation signal to the equipment so that the equipment executes the reset programming state instruction.
3. The method of claim 1, wherein the capacitive touch pad is a capacitive sense pad;
the threshold value is related to a time that the capacitive touch pad first generates a voltage.
4. A state switching device, comprising:
the first sending unit is used for sending a starting signal to the equipment when receiving the contact signal sent by the detector;
a second sending unit, configured to determine a current execution state of the device if it is determined that the instruction sent by the detector is a signal switching instruction, and send the signal switching instruction to the device, so that the device performs state switching according to the signal switching instruction;
the contact signal comprises a capacitive touch signal and/or a press signal;
the capacitive touch signal is generated when a capacitive touch pad electrically coupled with the device is touched;
the pressing signal is generated when a roller electrically connected with the equipment is pressed by external force;
the signal switching instruction comprises an activation signal and/or a roller rolling signal;
when the charging and discharging time of the capacitive touch pad is determined to be larger than a threshold value, sending the activation signal to the equipment electrically connected with the capacitive touch pad;
when a roller signal is received, sending the roller rolling signal to the equipment electrically connected with the roller;
wherein the scroll signal comprises a forward scroll signal and/or a reverse scroll signal;
the second sending unit is specifically configured to:
when the received signal switching instruction is a forward rolling signal, sending the forward rolling signal to the equipment so that the equipment executes a reset programming state instruction matched with the forward rolling signal according to the forward rolling signal;
and when the received signal switching instruction is a reverse rolling signal, sending the reverse rolling signal to the equipment so that the equipment executes an identification state instruction matched with the reverse rolling signal according to the reverse rolling signal.
5. The apparatus of claim 4, wherein the activation signal comprises an odd activation signal and/or an even activation signal;
the second sending unit is specifically configured to:
when the received signal switching instruction is an odd activation signal, sending an identification state instruction corresponding to the odd activation signal to the equipment so that the equipment executes the identification state instruction;
and when the received signal switching instruction is an even-number activation signal, sending a reset programming state instruction corresponding to the even-number activation signal to the equipment so that the equipment executes the reset programming state instruction.
6. The apparatus of claim 4, wherein the capacitive touch pad is a capacitive sense pad;
the threshold value is related to a time that the capacitive touch pad first generates a voltage.
7. A computer-readable storage medium, characterized in that a state switching method program is stored on the computer-readable storage medium, the state switching method program being executed by a processor to implement the steps of the state switching method according to any one of claims 1 to 3.
8. A system based on a state switching method, characterized in that the system comprises a memory, a processor and a state switching method program stored on the memory and executable on the processor, the state switching method program when executed by the processor implementing the steps of the state switching method according to any one of claims 1 to 3.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811293467.4A CN109634452B (en) | 2018-10-31 | 2018-10-31 | State switching method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811293467.4A CN109634452B (en) | 2018-10-31 | 2018-10-31 | State switching method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109634452A CN109634452A (en) | 2019-04-16 |
| CN109634452B true CN109634452B (en) | 2022-04-22 |
Family
ID=66067124
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811293467.4A Active CN109634452B (en) | 2018-10-31 | 2018-10-31 | State switching method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109634452B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111608570B (en) * | 2020-05-28 | 2021-11-09 | 北京三一智造科技有限公司 | Rotary drilling rig control method and device, rotary drilling rig and readable storage medium |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2341738B1 (en) * | 2009-12-29 | 2017-03-29 | Lg Electronics Inc. | Mobile terminal with Wi-Fi module operating in a power saving mode and providing an AP function and a method for controlling said terminal |
| CN103019572A (en) * | 2011-09-20 | 2013-04-03 | 联想(北京)有限公司 | Electronic equipment and state controlling method |
| CN103324273B (en) * | 2012-03-19 | 2017-11-28 | 联想(北京)有限公司 | The control method of a kind of electronic equipment and electronic equipment |
| US9703389B2 (en) * | 2012-12-24 | 2017-07-11 | Peigen Jiang | Computer input device |
| CN103236142A (en) * | 2013-01-09 | 2013-08-07 | 陈源波 | Wireless flash trigger, wireless flash triggering module, and control method thereof |
| CN104408389A (en) * | 2014-08-27 | 2015-03-11 | 北京中电华大电子设计有限责任公司 | Dual-mode card reader based on non-contact and wireless mode |
-
2018
- 2018-10-31 CN CN201811293467.4A patent/CN109634452B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN109634452A (en) | 2019-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110658930B (en) | Computer-readable non-transitory storage medium, method, and stylus | |
| CN103324431B (en) | Electronic device and control method thereof | |
| CN111352534B (en) | Touch key touch threshold correction method, wire controller, electric appliance and computer readable storage medium | |
| US20170123568A1 (en) | Touch panel system and electronic device | |
| US8988378B2 (en) | Touch device and driving method thereof | |
| US20090146963A1 (en) | Method for determining multiple touch inputs on a resistive touch screen | |
| CN103902114A (en) | Capacitance detection circuit | |
| CN103793055A (en) | Method and terminal for responding to gesture | |
| CN110084082B (en) | Electronic equipment, fingerprint identification device and finger touch detection circuit thereof | |
| CN111900973A (en) | Touch key detection circuit and detection method based on FPGA | |
| CN103793175A (en) | Touch screen communication terminal and touch response method and system in communication state thereof | |
| US10135547B2 (en) | Method and system for shortening wireless pairing connection time by detecting an object or body | |
| CN103840526A (en) | Method and device for processing information and electronic equipment | |
| CN109634452B (en) | State switching method and device | |
| CN101626246B (en) | Touch-control method and touch-control device | |
| CN103473145A (en) | Terminal crash reset method, device and terminal | |
| CN103370680A (en) | Touch input device, electronic apparatus, and input method | |
| CN104991625A (en) | Electronic device and reset method and apparatus thereof | |
| CN109661644B (en) | Pressure touch method and terminal | |
| CN104407698A (en) | Projecting method and electronic equipment | |
| CN105138323B (en) | A kind of information processing method and electronic equipment | |
| CN114077325A (en) | Sensing device of equipment, touch detection method and system | |
| CN105490319A (en) | Information processing method and electronic equipment | |
| KR102790015B1 (en) | Electronic device with touch function and method for restoring touch sensitivity thereof | |
| CN108476540A (en) | The wireless communication system of terminating machine and the control method and use of the terminating machine terminating machine |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder |
Address after: 510000 Room 202, building G10, South China new material innovation park, No. 31 Kefeng Road, Guangzhou high tech Industrial Development Zone, Guangzhou, Guangdong Province Patentee after: Guangzhou Zhongnuo Microelectronics Co.,Ltd. Address before: 510000 Room 202, building G10, South China new material innovation park, No. 31 Kefeng Road, Guangzhou high tech Industrial Development Zone, Guangzhou, Guangdong Province Patentee before: GUANGZHOU ZHONO ELECTRONIC TECHNOLOGY Co.,Ltd. |
|
| CP01 | Change in the name or title of a patent holder |