From 135b606686a2e14e2f5fd59a2c98662e499d083c Mon Sep 17 00:00:00 2001 From: hkc Date: Wed, 18 Oct 2023 00:54:19 +0300 Subject: [PATCH] Tape fixes --- tape-rip.lua | 11 +++++++++-- tapeget.lua | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tape-rip.lua b/tape-rip.lua index c551938..55f50ba 100644 --- a/tape-rip.lua +++ b/tape-rip.lua @@ -73,12 +73,19 @@ if seekToStart then end local _, y = term.getCursorPos() +local i = 0 while not src.isEnd() do dst.write(src.read(6000 * 10)) local pos, sz = src.getPosition(), src.getSize() term.setCursorPos(1, y) term.clearLine() - textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz) - os.sleep(0.01) + if (i % 10) == 0 then + textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz) + os.sleep(0.01) + end + i = i + 1 end +local pos, sz = src.getPosition(), src.getSize() +textProgress(pos / sz, colors.green, colors.gray, "%7.3f%% %8d / %8d", pos * 100 / sz, pos, sz) +print() diff --git a/tapeget.lua b/tapeget.lua index d8193fb..e4c99d6 100644 --- a/tapeget.lua +++ b/tapeget.lua @@ -38,7 +38,7 @@ if #tape == 0 then elseif #tape ~= 1 then print("More than one drive found:") for i = 1, #tape do - print(tape[i]) + print(peripheral.getName(tape[i])) end print("Input drive name:") io.write("> ")