Skip to content

Commit

Permalink
Add option to automatically reload the clock after uploading an app
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 13, 2023
1 parent 11f8e16 commit 0f78c42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Comms = {
},
// When upload is finished, show a message (or reload)
showUploadFinished : () => {
if (Const.LOAD_APP_AFTER_UPLOAD || Const.SINGLE_APP_ONLY) return Comms.write("\x10load()\n");
if (SETTINGS.autoReload || Const.LOAD_APP_AFTER_UPLOAD || Const.SINGLE_APP_ONLY) return Comms.write("\x10load()\n");
else return Comms.showMessage(Const.MESSAGE_RELOAD);
},
// Gets a text command to append to what's being sent to show progress. If progress==undefined, it's the first command
Expand Down
6 changes: 5 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ let files = []; // list of files on the Espruimo Device
const DEFAULTSETTINGS = {
pretokenise : true,
minify : false, // disabled by default due to https://github.com/espruino/BangleApps/pull/355#issuecomment-620124162
settime : false, // Always update time when we connect
favourites : ["launch"],
language : "",
bleCompat: false, // 20 byte MTU BLE Compatibility mode
sendUsageStats: true // send usage stats to banglejs.com
sendUsageStats: true, // send usage stats to banglejs.com
alwaysAllowUpdate : false, // Always show "reinstall app" buttonregardless of the version
autoReload: false // Automatically reload watch after app App Loader actions (removes "Hold button" prompt)
};
var SETTINGS = JSON.parse(JSON.stringify(DEFAULTSETTINGS)); // clone

Expand Down Expand Up @@ -1162,6 +1165,7 @@ settingsCheckbox("settings-pretokenise", "pretokenise");
settingsCheckbox("settings-minify", "minify");
settingsCheckbox("settings-settime", "settime");
settingsCheckbox("settings-alwaysAllowUpdate", "alwaysAllowUpdate");
settingsCheckbox("settings-autoReload", "autoReload");
loadSettings();

let btn;
Expand Down

3 comments on commit 0f78c42

@thyttan
Copy link

@thyttan thyttan commented on 0f78c42 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case something needs to be done manually, auto reload doesn't seem to have shown up on https://espruino.github.io/BangleApps/android.html yet.

Android version development app loader:
image

Standard version development app loader:
image

@gfwilliams
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixed

@bobrippling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this - I'd just started thinking I would find a feature like this useful, started to implement it and there it was!

Please sign in to comment.