Skip to content

Commit 528ec04

Browse files
committed
Heinrichs Weikamp: Display the Model for OSTC4 / OSTC5.
Signed-off-by: Michael Keller <[email protected]>
1 parent 2622135 commit 528ec04

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/hw_ostc_parser.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@
9696
#define OSTC4_SCRUBBER_STATE_ERROR_FLAG 0x4000
9797
#define OSTC4_SCRUBBER_STATE_WARNING_FLAG 0x2000
9898

99+
#define OSTC5_STARTING_SERIAL 1500
100+
99101
typedef struct hw_ostc_sample_info_t {
100102
unsigned int type;
101103
unsigned int divisor;
@@ -818,19 +820,28 @@ hw_ostc_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigned
818820
break;
819821
case 6:
820822
if (parser->first_scrubber_time_minutes == INT_MAX) {
821-
return DC_STATUS_DATAFORMAT;
823+
return DC_STATUS_UNSUPPORTED;
822824
}
823825

824826
string->desc = "Remaining scrubber time at start [minutes]";
825827
snprintf(buf, BUFLEN, "%d", parser->first_scrubber_time_minutes);
826828
break;
827829
case 7:
828830
if (parser->last_scrubber_time_minutes == INT_MAX) {
829-
return DC_STATUS_DATAFORMAT;
831+
return DC_STATUS_UNSUPPORTED;
830832
}
831833

832834
string->desc = "Remaining scrubber time at end [minutes]";
833835
snprintf(buf, BUFLEN, "%d", parser->last_scrubber_time_minutes);
836+
break;
837+
case 8:
838+
if (parser->model != OSTC4) {
839+
return DC_STATUS_UNSUPPORTED;
840+
}
841+
842+
string->desc = "Model";
843+
snprintf(buf, BUFLEN, "%s", parser->serial < OSTC5_STARTING_SERIAL ? "OSTC4" : "OSTC5");
844+
834845
break;
835846
default:
836847
return DC_STATUS_UNSUPPORTED;

0 commit comments

Comments
 (0)