Missed Button Press

I've posted on this problem before but it seems to have slipped through the cracks so I'm going to try to bump it up. This has been a bug on several devices since CIQ came out.

When an activity is started or stopped, the next up or down button press will be missed by the event handler.

Here's a video that shows the problem on a 735XT.

https://youtu.be/dssvYvn5Cqc

Devices I know HAVE the problem:
fr735XT
fr235
VivoActive HR

Devices I know DON'T have the problem:
Fenix3
Edge1000
Edge520

I don't have the other devices available to test right now. The 920XT and vivoactive used to have this problem, but I haven't verified them lately.

Here's the test case. If you just comment out the mActivity.start() and .stop(), the problem goes away.

using Toybox.Application as App;
using Toybox.ActivityRecording as Arc;
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;

class MissedButtonPressApp extends App.AppBase {
var mActivity;
var mTimer;
var mView;

function initialize() {
AppBase.initialize();
mActivity = Arc.createSession({
:sport => Arc.SPORT_CYCLING,
:subSport => Arc.SUB_SPORT_GENERIC,
:name => "cycling"
});
mTimer = new Timer.Timer();
mTimer.start(self.method(:onTimerCallback), 1000, true);
}

function getInitialView() {
mView = new MissedButtonPressView();
return [mView , new MissedButtonPressDelegate() ];
}

function PressDown() {
mView.Display(1);
Ui.requestUpdate();
}

function PressUp() {
mView.Display(2);
Ui.requestUpdate();
}

function StartStopAct() {
if (mActivity.isRecording()) {
mActivity.stop();
mView.Display(4);
}
else {
mActivity.start();
mView.Display(3);
}
Ui.requestUpdate();
}

function SomeKey() {
mView.Display(5);
Ui.requestUpdate();
}

function onTimerCallback() {
Ui.requestUpdate();
}
}

class MissedButtonPressView extends Ui.View {
var message = "Idle";
var mTime = Sys.getTimer();

function initialize() {
View.initialize();
}

function onUpdate(dc) {
View.onUpdate(dc);
dc.setColor(Gfx.COLOR_WHITE, Gfx.COLOR_BLACK);
dc.clear();

var width = dc.getWidth();
var height = dc.getHeight();
if (Sys.getTimer() - mTime > 4000) {
message = "Idle";
}
dc.drawText(width/2, height/2, Gfx.FONT_LARGE, message, Gfx.TEXT_JUSTIFY_CENTER | Gfx.TEXT_JUSTIFY_VCENTER);
}

function Display(val) {
mTime = Sys.getTimer();
if (val == 1) {
message = "Down";
}
else if (val == 2) {
message = "Up";
}
else if (val == 3) {
message = "Start";
}
else if (val == 4) {
message = "Stop";
}
else if (val == 5) {
message = "Some Other Button";
}
}
}

class MissedButtonPressDelegate extends Ui.BehaviorDelegate {

function initialize() {
BehaviorDelegate.initialize();
}

function onKey(evt) {
var key = evt.getKey();
if (key == Ui.KEY_DOWN) {
App.getApp().PressDown();
}
else if (key == Ui.KEY_UP) {
App.getApp().PressUp();
}
else if (key == Ui.KEY_START) {
App.getApp().StartStopAct();
}
else if (key == Ui.KEY_ENTER) {
App.getApp().StartStopAct();
}
else if (key == Ui.KEY_ESC) {
return false;
}
else {
App.getApp().SomeKey();
}
return true;
}

function onTap(evt) {
App.getApp().SomeKey();
return true;
}

function onSwipe(evt) {
App.getApp().SomeKey();
return true;
}
}
  • These are known issues on the forerunner platform, and we have tickets filed with the device teams. I don't see any reports to the VA-HR team, though, so I'll get it reported to them for investigation, too.
  • Former Member
    Former Member over 8 years ago
    I can confirm that this issue is also present for FR230, although I always thought that this is something related to FIT-write performace, because I never encountered this problem outside of Applications which starts recording.

    In my case first button press is also missed but I cannot predict whether it will happen or not, because sometimes press is just processed in a normal way and sometimes it is skipped completely (I don't receive relevant callback in BehaviorDelegate). I blame flash-write operations because even in native recording applications with CIQ data fields there are micro-freezes which happen from time to time, and I noticed similar slowdowns during my own CIQ applications exit phase, if it is preceded by App.getApp().setProperty(...), which means, that write will be "commited" on application exit and actual file will be updated.
  • Brandon. It's still on the va-hr (I just tried it to make sure). But in that case it's taps too.. For example, if you stop a recording and put up a resume/save/discard menu, you have to tap twice. If you wait 2 minutes and get the RHR screen, back out of that, a single tap works fine, so the extra screen masks it.

    Just tried the va and it no longer seems to be an issue there.
  • Yeah, I assumed that was the case for the VA-HR. That's what I was seeing anyway, so I reported that screen taps in general are a problem on that device. :)
  • Several somewhat old issues reported to the device teams have been getting attention lately, and as a result this has been fixed on the 735XT and related devices (230, 630 etc.)! I'd expect to see this in the next firmware release.