I'd like to know, is there any "minimal allowed duration" on which I can set vibrating (by Display.vibrate(i))? Because even if I set vibr. duration to 50 millis, it's the smame as 5 millis (and in real it's vibrating for more than half second (500 millis and more, can't say exact number)). I don't want it to really vibrate for some time, only to 'jump' a little (max 1/20s). Is it possible, or is there any minimal limit? In documentation is nothink about some limit, but in real it's just vibrating too long. I also tried somethink like:
- Code: Select all
double startVibrTime;
booloean vibrating = false;
int vibrDuration;
public void vibr(int dur) {
vibrDuration = dur;
display.vibrate(dur);
vibrating = true;
startVibrTime = System.currentTimeMillis();
}
public void run() {
.....
if(vibrating) {
if(System.currentTimeMillis()-startVibrTime > vibrDuration) {
display.vibrate(0); // stop vibrate
vibrating = false;
}
}
.....
}
But no success, still vibrating at least about 500 millis like before... Any ideas? Must it always vibrate for some time before it stops?
