Patent attributes
An electronic device incorporating a magnet and a Hall-effect sensor to determine a location of a portion of the electronic device. The electronic device comprises a magnet mechanically coupled to a first portion of the electronic device and a Hall-effect sensor coupled to a second portion of the electronic device where the first portion and the second portion are moveable with reference to each other and where the Hall-effect sensor receives a magnetic field of the magnet. The device further comprises an electronic stage that outputs a comparison threshold signal based on peak detecting an output of the Hall-effect sensor using a long term adjustment and resetting the long term adjustment to a current output of the Hall-effect sensor in response to a short term adjustment and a switch electronic stage that switches in response to the output of the Hall-effect sensor exceeding the comparison threshold output.