Changeset e6c2b145 in subsurface


Ignore:
Timestamp:
Jul 9, 2017, 4:09:04 PM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
e8b4603
Parents:
9111ce0
git-author:
Dirk Hohndel <dirk@…> (07/09/17 15:52:10)
git-committer:
Dirk Hohndel <dirk@…> (07/09/17 16:09:04)
Message:

More meaningful device info display

While it's nice to have the numerical model in the logfile,
on the screen the user wants to see the dive computer product
name. And none of those hex numbers that make the text so long
that it becomes useless.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/libdivecomputer.c

    r8e5c211e re6c2b145  
    949949                break;
    950950        case DC_EVENT_DEVINFO:
    951                 dev_info(devdata, translate("gettextFromC", "model=%u (0x%08x), firmware=%u (0x%08x), serial=%u (0x%08x)"),
    952                          devinfo->model, devinfo->model,
    953                          devinfo->firmware, devinfo->firmware,
    954                          devinfo->serial, devinfo->serial);
    955                 if (devdata->libdc_logfile) {
    956                         fprintf(devdata->libdc_logfile, "Event: model=%u (0x%08x), firmware=%u (0x%08x), serial=%u (0x%08x)\n",
    957                                 devinfo->model, devinfo->model,
    958                                 devinfo->firmware, devinfo->firmware,
    959                                 devinfo->serial, devinfo->serial);
    960                 }
    961951                if (dc_descriptor_get_model(devdata->descriptor) != devinfo->model) {
    962952                        fprintf(stderr, "EVENT_DEVINFO gave us the correct detected product (model %d instead of %d)\n",
     
    969959                                devdata->model = str_printf("%s %s", devdata->vendor, devdata->product);
    970960                        }
     961                }
     962                dev_info(devdata, translate("gettextFromC", "model=%s firmware=%u serial=%u"),
     963                         devdata->product, devinfo->firmware, devinfo->serial);
     964                if (devdata->libdc_logfile) {
     965                        fprintf(devdata->libdc_logfile, "Event: model=%u (0x%08x), firmware=%u (0x%08x), serial=%u (0x%08x)\n",
     966                                devinfo->model, devinfo->model,
     967                                devinfo->firmware, devinfo->firmware,
     968                                devinfo->serial, devinfo->serial);
    971969                }
    972970                /*
Note: See TracChangeset for help on using the changeset viewer.