Skip to content

Commit e8790f6

Browse files
fix: importing machine in dev mode could cause issues
fixes: [BUG] "machine" changed to "fake_machine" #275
1 parent a0bd1f2 commit e8790f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Watcher/DeviceManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ class DeviceManager {
3737
return uploadWhen === "always" || (uploadWhen === "outOfSync" && this.outOfSync);
3838
}
3939

40+
get transform() {
41+
return this.project.config.dev?.simulateDeepSleep && fakeDeepSleep;
42+
}
43+
4044
async ensureBootPy() {
4145
const prependStr = [
4246
"# EDIT BY PYMAKR DEV",
@@ -168,7 +172,7 @@ class DeviceManager {
168172
}
169173

170174
if (action === "delete") await this.device.remove(target);
171-
else await this.pymakr.commands.upload({ fsPath: file }, this.device, target, fakeDeepSleep);
175+
else await this.pymakr.commands.upload({ fsPath: file }, this.device, target, this.transform);
172176

173177
return target;
174178
}

0 commit comments

Comments
 (0)