Skip to content

Commit dfb8fae

Browse files
jefdriesenmikeller
authored andcommitted
Report the device model number
The hardware info contains a 32 bit model number that can be used to distinguish the different models. There is also a serial number prefix (at offset 8) which contains a single letter that serves the same purpose: A = Action B = Screen E = Tablet
1 parent 3002287 commit dfb8fae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/descriptor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ static const dc_descriptor_t g_descriptors[] = {
482482
{"Genesis", "Centauri", DC_FAMILY_DEEPSIX_EXCURSION, 0, DC_TRANSPORT_BLE, dc_filter_deepsix},
483483
{"Scorpena", "Alpha", DC_FAMILY_DEEPSIX_EXCURSION, 0, DC_TRANSPORT_BLE, dc_filter_deepsix},
484484
/* Seac Screen */
485-
{"Seac", "Screen", DC_FAMILY_SEAC_SCREEN, 0, DC_TRANSPORT_SERIAL, NULL},
486-
{"Seac", "Action", DC_FAMILY_SEAC_SCREEN, 0, DC_TRANSPORT_SERIAL, NULL},
485+
{"Seac", "Action", DC_FAMILY_SEAC_SCREEN, 0x01, DC_TRANSPORT_SERIAL, NULL},
486+
{"Seac", "Screen", DC_FAMILY_SEAC_SCREEN, 0x02, DC_TRANSPORT_SERIAL, NULL},
487487
/* Deepblu Cosmiq */
488488
{"Deepblu", "Cosmiq+", DC_FAMILY_DEEPBLU_COSMIQ, 0, DC_TRANSPORT_BLE, dc_filter_deepblu},
489489
/* Oceans S1 */

src/seac_screen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ seac_screen_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
370370

371371
// Emit a device info event.
372372
dc_event_devinfo_t devinfo;
373-
devinfo.model = 0;
373+
devinfo.model = array_uint32_le (device->info + 4);
374374
devinfo.firmware = array_uint32_le (device->info + 0x11C);
375375
devinfo.serial = array_uint32_le (device->info + 0x10);
376376
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
@@ -404,7 +404,7 @@ seac_screen_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
404404

405405
// Emit a device info event.
406406
dc_event_devinfo_t devinfo;
407-
devinfo.model = 0;
407+
devinfo.model = array_uint32_le (device->info + 4);
408408
devinfo.firmware = array_uint32_le (device->info + 0x11C);
409409
devinfo.serial = array_uint32_le (device->info + 0x010);
410410
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);

0 commit comments

Comments
 (0)