Skip to content

Commit

Permalink
Revert "[adam] new disk improvements."
Browse files Browse the repository at this point in the history
This reverts commit 4cc184d.
  • Loading branch information
tschak909 committed Oct 12, 2023
1 parent 4cc184d commit 6e7cdb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Binary file modified data/webui/device_specific/BUILD_ADAM/autorun.ddp
Binary file not shown.
18 changes: 9 additions & 9 deletions lib/device/adamnet/fuji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,28 +916,28 @@ void adamFuji::adamnet_new_disk()

adamnet_recv(); // CK

if (newImageStarted)
fujiDisk &disk = _fnDisks[ds];
fujiHost &host = _fnHosts[hs];

if (host.file_exists((const char *)p))
{
adamnet_response_ack(true);
newImageStarted = false;
AdamNet.start_time = esp_timer_get_time();
adamnet_response_ack();
return;
}

fujiDisk &disk = _fnDisks[ds];
fujiHost &host = _fnHosts[hs];

disk.host_slot = hs;
disk.access_mode = DISK_ACCESS_MODE_WRITE;
strlcpy(disk.filename, (const char *)p, 256);

newImageStarted = true;

disk.fileh = host.file_open(disk.filename, disk.filename, sizeof(disk.filename), "w");

Debug_printf("Creating file %s on host slot %u mounting in disk slot %u numblocks: %lu\n", disk.filename, hs, ds, numBlocks);

disk.disk_dev.write_blank(disk.fileh, numBlocks);

AdamNet.start_time = esp_timer_get_time();
adamnet_response_ack();

fclose(disk.fileh);
}

Expand Down
2 changes: 0 additions & 2 deletions lib/device/adamnet/fuji.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class adamFuji : public virtualDevice

appkey _current_appkey;

bool newImageStarted = false;

protected:
void adamnet_reset_fujinet(); // 0xFF
void adamnet_net_get_ssid(); // 0xFE
Expand Down

0 comments on commit 6e7cdb3

Please sign in to comment.