Skip to content

Commit b1ae0e2

Browse files
committed
add File Upload Compatibility mode (disables binary packet upload)
1 parent e329e62 commit b1ae0e2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

js/comms.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const Comms = {
7676
return Puck.getConnection();
7777
}
7878
},
79-
supportsPacketUpload : () => Comms.getConnection().espruinoSendFile && !Utils.versionLess(device.version,"2v25"),
79+
supportsPacketUpload : () => (!SETTINGS.noPackets) && Comms.getConnection().espruinoSendFile && !Utils.versionLess(device.version,"2v25"),
8080
// Faking EventEmitter
8181
handlers : {},
8282
on : function(id, callback) { // calling with callback=undefined will disable

js/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const DEFAULTSETTINGS = {
1111
bleCompat: false, // 20 byte MTU BLE Compatibility mode
1212
sendUsageStats: true, // send usage stats to banglejs.com
1313
alwaysAllowUpdate : false, // Always show "reinstall app" buttonregardless of the version
14-
autoReload: false // Automatically reload watch after app App Loader actions (removes "Hold button" prompt)
14+
autoReload: false, // Automatically reload watch after app App Loader actions (removes "Hold button" prompt)
15+
noPackets: false, // Enable File Upload Compatibility mode (disables binary packet upload)
1516
};
1617
var SETTINGS = JSON.parse(JSON.stringify(DEFAULTSETTINGS)); // clone
1718

@@ -1270,6 +1271,7 @@ settingsCheckbox("settings-minify", "minify");
12701271
settingsCheckbox("settings-settime", "settime");
12711272
settingsCheckbox("settings-alwaysAllowUpdate", "alwaysAllowUpdate");
12721273
settingsCheckbox("settings-autoReload", "autoReload");
1274+
settingsCheckbox("settings-nopacket", "noPackets");
12731275
loadSettings();
12741276

12751277
let btn;

0 commit comments

Comments
 (0)