Button configuration goes bad when phone has requested messages from button press and Mode is changed
tekojo opened this issue · 18 comments
All this on a digital metawatch with 0.8.0 firmware running against a Nokia N9 with sowatch 0.2.1
The issue is described in the forum thread here:
http://www.metawatch.org/forums/thread/273/firmware-sometimes-goes-to-a-strange-state
The steps are:
- the phone and watch are paired and connected normally
- the phone application has requested button messages to be sent on button presses in notification and application modes
- the user presses buttons E or F and returns to the main screen with the same button (double press E or F)
Results:
4. watch does not send button messages anymore
5. button D does not turn the led light on
6. watch does receive messages and correctly shows them
Question: in what mode does pressing E or F twice put the watch in? i.e. should the application grab the button messages in all modes to keep in contact?
Reading the code, it's related to calling ConfigureIdleUserInterfaceButtons on every single *ScreenHandler in LcdDisplay.c haven't figured out what goes wrong with those bit operations when there are ButtonActions defined.
I may need your phone application to look into this problem.
Pressing a button should not change the mode.
The problem I see is that if I override the action for one button only in IdleMode (say, A), but then press one of the other buttons that trigger in-firmware UI (such as, F), the buttons the phone had overriden get overriden again by the firmware (as ConfigureIdleUserInterfaceButtons is called).
However, the phone is not notified of this at all. It just stops getting messages for the buttons (pressing A no longer sends a message, but does whatever ConfigureIdleUserInterfaceButtons configured it for).
From the user point of view, the watch is now "stuck".
I have a few ideas that could solve this. Simply, the watch could notify the phone if connected that the current button mappings have been lost via a special message.
Alternatively, with higher memory requirements, the watch could "push" the currently configured actions before showing the menu/UI, then pop them back when going back to the idle screen.
It was never intended that the Idle mode button configuration would be changed by the phone application. That is why application mode and notification mode have their own button configurations.
However, I now see the issue if the user doesn't want to leave idle mode but wants to change the function of a button. For example making the Display Bar Code button send a message to the phone instead. The user presses a different button and the new setting is lost. Is this your use case?
I think your idea of creating a copy of the idle mode (normal page) button configuration is the proper solution.
It was never intended that the Idle mode button configuration would be changed by the phone application. That is why application mode and notification mode have their own button configurations.
However, I now see the issue if the user doesn't want to leave idle mode but wants to change the function of a button. For example making the Display Bar Code button send a message to the phone instead. The user presses a different button and the new setting is lost. Is this your use case?
Well, I do need to change the function of at least one button in Idle Mode.
In my current design, the only way to enter application mode is by pressing a button in the watch, not by any interaction with the phone. Within application mode the user can cycle between different applications by using the same button.
Please try version 0.8.2
A link to 0.8.2 would be appreciated :)
ahedin25/MetaWatch-WDS11x-IAR@903ac4b3f7fe52b3e6bb64d7269f86cb74505008
Thanks!
That helps in learning how it all works.
ummm,
Sorry to bother still, but any chance of having the flashable image as .hex ?
I'm currently completely non-Windows...
Do you know what the settings in IAR should be to generate the file as a .hex?
-----Original Message-----
From: tekojo [mailto:reply@reply.github.com]
Sent: Monday, December 12, 2011 2:53 PM
To: Andrew Hedin
Subject: Re: [MetaWatch-WDS11x-IAR] Button configuration goes bad when phone has requested messages from button press and Mode is changed (#10)
Importance: Low
ummm,
Sorry to bother still, but any chance of having the flashable image as .hex ?
I'm currently completely non-Windows...
Reply to this email directly or view it on GitHub:
https://github.com/MetaWatchOpenProjects/MetaWatch-WDS11x-IAR/issues/10#issuecomment-3112526
Sorry, my mistake there. The .txt format you have on the web site for 0.8.0 works too.
.hex seems to be intel extended ( http://www.metawatch.org/forums/thread/?thread=124&page=1 )
On a Linux laptop here :)
Do you want it for Digital or analog watch?
-----Original Message-----
From: tekojo [mailto:reply@reply.github.com]
Sent: Monday, December 12, 2011 3:04 PM
To: Andrew Hedin
Subject: Re: [MetaWatch-WDS11x-IAR] Button configuration goes bad when phone has requested messages from button press and Mode is changed (#10)
Importance: Low
Sorry, my mistake there. The .txt format you have on the web site for 0.8.0 works too.
.hex seems to be intel extended ( http://www.metawatch.org/forums/thread/?thread=124&page=1 )
On a Linux laptop here :)
Reply to this email directly or view it on GitHub:
https://github.com/MetaWatchOpenProjects/MetaWatch-WDS11x-IAR/issues/10#issuecomment-3112707
Digital :)
Try this and let me know.
-----Original Message-----
From: tekojo [mailto:reply@reply.github.com]
Sent: Monday, December 12, 2011 3:10 PM
To: Andrew Hedin
Subject: Re: [MetaWatch-WDS11x-IAR] Button configuration goes bad when phone has requested messages from button press and Mode is changed (#10)
Importance: Low
Digital :)
Reply to this email directly or view it on GitHub:
https://github.com/MetaWatchOpenProjects/MetaWatch-WDS11x-IAR/issues/10#issuecomment-3112811
A link would be nice again.
ahedin25/MetaWatch-WDS11x-IAR@500d5e6a9cef580621ccc6cc4aa54a1873c8c556
Now works like it should.
Thank you :)