Skip to content

Commit

Permalink
oops - naming issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Nov 29, 2023
1 parent bb80bf8 commit d6d1fff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libs/banglejs/jswrap_bangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ typedef enum {
} JsBangleTasks;
JsBangleTasks bangleTasks;

const char *unlockReason = 0; ///< If JSBT_UNLOCK is set, this is the reason (if known) - should point to a constant string (not on stack!)
const char *lockReason = 0; ///< If JSBT_LOCK/UNLOCK is set, this is the reason (if known) - should point to a constant string (not on stack!)
void _jswrap_banglejs_setLocked(bool isLocked, const char *reason);

void jswrap_banglejs_pwrGPS(bool on) {
Expand Down Expand Up @@ -1105,7 +1105,7 @@ bool wakeUpBangle(const char *reason) {
}
if (lockTimeout && bangleFlags&JSBF_LOCKED) {
woke = true;
unlockReason = reason;
lockReason = reason;
bangleTasks |= JSBT_UNLOCK;
}
if (woke) {
Expand Down Expand Up @@ -1262,7 +1262,7 @@ void peripheralPollHandler() {
if (lockTimeout && !(bangleFlags&JSBF_LOCKED) && inactivityTimer>=lockTimeout) {
// 10 seconds of inactivity, lock display
bangleTasks |= JSBT_LOCK;
unlockReadon = "timeout";
lockReason = "timeout";
jshHadEvent();
}

Expand Down Expand Up @@ -4181,12 +4181,12 @@ bool jswrap_banglejs_idle() {
if (bangleTasks & JSBT_LCD_BL_OFF) jswrap_banglejs_setLCDPowerBacklight(0);
if (bangleTasks & JSBT_LCD_BL_ON) jswrap_banglejs_setLCDPowerBacklight(1);
if (bangleTasks & JSBT_LOCK) {
_jswrap_banglejs_setLocked(1, unlockReason);
unlockReason = 0;
_jswrap_banglejs_setLocked(1, lockReason);
lockReason = 0;
}
if (bangleTasks & JSBT_UNLOCK) {
_jswrap_banglejs_setLocked(0, unlockReason);
unlockReason = 0;
_jswrap_banglejs_setLocked(0, lockReason);
lockReason = 0;
}
if (bangleTasks & JSBT_RESET) jsiStatus |= JSIS_TODO_FLASH_LOAD;
if (bangleTasks & JSBT_ACCEL_INTERVAL_DEFAULT) jswrap_banglejs_setPollInterval_internal(DEFAULT_ACCEL_POLL_INTERVAL);
Expand Down

0 comments on commit d6d1fff

Please sign in to comment.