Merge pull request #546 from wybren1971/IMDwriter

Im dwriter
This commit is contained in:
David Given
2022-08-07 20:45:36 +02:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -403,7 +403,7 @@ public:
Logger() << "IMD: read "
<< fmt::format("{} tracks, {} heads; {}; {} kbps; {} sectoren; sectorsize {}; {} kB total.",
<< fmt::format("{} tracks, {} heads; {}; {} kbps; {} sectors; sectorsize {}; {} kB total.",
header.track + 1, header.Head + 1,
fm ? "FM" : "MFM",
Modulation_Speed, header.numSectors, sectorSize, (header.track+1) * trackSize / 1024);

View File

@@ -10,6 +10,8 @@
#include <algorithm>
#include <iostream>
#include <fstream>
#include <chrono>
#include <ctime>
/*
* Where to get the type of encoding FM or MFM? Now solved with options in proto config
@@ -168,14 +170,17 @@ public:
//Give the user a option to give a comment in the IMD file for archive purposes.
auto start = std::chrono::system_clock::now();
std::time_t time = std::chrono::system_clock::to_time_t(start);
std::string comment = _config.imd().comment();
if (comment.size() == 0)
{
comment = LABEL ;
comment.append(" date: ");
comment.append(__DATE__);
comment.append(" time: ");
comment.append(__TIME__);
comment.append(std::ctime(&time));
// comment.append(" time: ");
// comment.append(__TIME__);
} else
{
comment.insert(0,"IMD ");