Skip to content

Commit

Permalink
Explicitly send boolean values as numbers for watch config
Browse files Browse the repository at this point in the history
Apparently PebbleKit JS on Android sends the values `true` and `false`
as TUPLE_CSTRING, which does not cast to boolean as intended. Confirmed
issue on KitKat (4.4.?) and Lollipop (5.1.1, running Pebble app 2.4.2
and watch firmware 2.9.1).

Fixes #8.
  • Loading branch information
mddub committed Jan 29, 2016
1 parent ebf1a20 commit 8f390ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified release/urchin-cgm.pbw
Binary file not shown.
4 changes: 2 additions & 2 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ function main(c) {
function sendPreferences() {
sendMessage({
msgType: c.MSG_TYPE_RESPONSE_PREFERENCES,
mmol: config.mmol,
mmol: config.mmol ? 1 : 0,
topOfGraph: config.topOfGraph,
topOfRange: config.topOfRange,
bottomOfRange: config.bottomOfRange,
bottomOfGraph: config.bottomOfGraph,
hGridlines: config.hGridlines,
batteryAsNumber: config.batteryAsNumber,
batteryAsNumber: config.batteryAsNumber ? 1 : 0,
timeAlign: c.ALIGN[getLayout(config).timeAlign],
batteryLoc: c.BATTERY_LOC[getLayout(config).batteryLoc],
numElements: countElementsForPebble(getLayout(config)),
Expand Down

0 comments on commit 8f390ff

Please sign in to comment.