{
LOG_DISK("Sending write request to disk writer for %1 %2", _dcp.string(), _drive.device());
if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device()), 2000)) {
{
LOG_DISK("Sending write request to disk writer for %1 %2", _dcp.string(), _drive.device());
if (!_nanomsg.send(String::compose(DISK_WRITER_WRITE "\n%1\n%2\n", _dcp.string(), _drive.device()), 2000)) {
- } else if (*s == DISK_WRITER_FORMATTING) {
- sub (_("Formatting drive"));
- set_progress_unknown ();
- state = FORMAT;
+ } else if (*s == DISK_WRITER_FORMAT_PROGRESS) {
+ if (state == SETUP) {
+ sub (_("Formatting drive"));
+ state = FORMAT;
+ }
+ auto progress = _nanomsg.receive (500);
+ if (progress) {
+ set_progress (raw_convert<float>(*progress));
+ }