Skip to content

Commit

Permalink
Add missing models to set_tz_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Dec 13, 2024
1 parent d4cdd08 commit a77ae6c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
12 changes: 9 additions & 3 deletions src/set_tz_offset/set_tz_offset/set_tz_offset.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <errno.h>
#include "set_tz_offset.h"

int tz_offset_osd_addr[35][2] = {
int tz_offset_osd_addr[37][2] = {
{ 0x4f4, 1 }, // Y203C
{ 0x4a0, 1 }, // Y23
{ 0x4f4, 1 }, // Y25
Expand All @@ -43,10 +43,12 @@ int tz_offset_osd_addr[35][2] = {
{ 0x4e0, 1 }, // QG311R
{ 0x4e0, 1 }, // R30GB
{ 0x56c, 1 }, // R35GB
{ 0x570, 1 }, // R37GB
{ 0x560, 1 }, // R40GA
{ 0x56c, 1 }, // Y211BA
{ 0x4e0, 1 }, // Y211GA_9
{ 0x570, 1 }, // Y211GA_12
{ 0x56c, 1 }, // Y213
{ 0x56c, 1 }, // Y213GA
{ 0x4e0, 1 }, // Y21GA_9
{ 0x564, 1 }, // Y21GA_12
{ 0x4e0, 1 }, // Y28GA
Expand Down Expand Up @@ -236,7 +238,7 @@ void print_usage(char *progname)
fprintf(stderr, "\t-m MODEL, --model MODEL\n");
fprintf(stderr, "\t\tset model: y203c, y23, y25, y30, h201c, h305r, h307\n");
fprintf(stderr, "\t\tset model: y20ga, y25ga, y30qa, y501gc\n");
fprintf(stderr, "\t\tset model: h30ga, h51ga, h52ga, h60ga, q321br_lsx, qg311r, q705br r30gb, r35gb, r40ga, y211ga, y213ga, y21ga, y28ga, y291ga, y29ga, y623 or b091qp (default y21ga)\n");
fprintf(stderr, "\t\tset model: h30ga, h51ga, h52ga, h60ga, q321br_lsx, qg311r, q705br r30gb, r35gb, r37gb, r40ga, y211ba, y211ga, y213ga, y21ga, y28ga, y291ga, y29ga, y623 or b091qp (default y21ga)\n");
fprintf(stderr, "\t\t(required if tz_offset_osd command is specified)\n");
fprintf(stderr, "\t-f FIRMWARE_VERSION, --fwver FIRMWARE_VERSION\n");
fprintf(stderr, "\t\tfirmware version (required if tz_offset_osd command is specified)\n");
Expand Down Expand Up @@ -349,8 +351,12 @@ int main(int argc, char **argv)
model = R30GB;
} else if (strcasecmp("r35gb", optarg) == 0) {
model = R35GB;
} else if (strcasecmp("r37gb", optarg) == 0) {
model = R37GB;
} else if (strcasecmp("r40ga", optarg) == 0) {
model = R40GA;
} else if (strcasecmp("y211ba", optarg) == 0) {
model = Y211BA;
} else if (strcasecmp("y211ga", optarg) == 0) {
model = Y211GA;
} else if (strcasecmp("y213ga", optarg) == 0) {
Expand Down
28 changes: 2 additions & 26 deletions src/set_tz_offset/set_tz_offset/set_tz_offset.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,6 @@
#define MID_DISPATCH 4
#define MID_RCD 0x10

/*
#define Y20GA_9_TZ_OFFSET_OSD 0x4a0
#define Y20GA_12_TZ_OFFSET_OSD 0x4a4
#define Y25GA_TZ_OFFSET_OSD 0x4a0
#define Y30QA_TZ_OFFSET_OSD 0x4a0
#define H30GA_9_TZ_OFFSET_OSD 0x4e0
#define H30GA_11_TZ_OFFSET_OSD 0x56c // Already present
#define H51GA_TZ_OFFSET_OSD 0x4e0
#define H52GA_TZ_OFFSET_OSD 0x4e0
#define H60GA_TZ_OFFSET_OSD 0x560 // Already present
#define Q321BR_LSX_TZ_OFFSET_OSD 0x4e0
#define QG311R_TZ_OFFSET_OSD 0x4e0
#define R30GB_TZ_OFFSET_OSD 0x4e0
#define R35GB_TZ_OFFSET_OSD 0x56c // Already present
#define R40GA_TZ_OFFSET_OSD 0x560 // Already present
#define Y211GA_9_TZ_OFFSET_OSD 0x4e0
#define Y211GA_12_TZ_OFFSET_OSD 0x570 // Already present
#define Y21GA_9_TZ_OFFSET_OSD 0x4e0
#define Y21GA_12_TZ_OFFSET_OSD 0x564 // Already present
#define Y28GA_TZ_OFFSET_OSD 0x4e0
#define Y291GA_9_TZ_OFFSET_OSD 0x56c // Already present
#define Y291GA_12_TZ_OFFSET_OSD 0x570 // Already present
#define Y29GA_TZ_OFFSET_OSD 0x4e0
#define B091QP_TZ_OFFSET_OSD 0x000 // 0x560 or 0x56c but already present
*/
typedef enum {
Y203C,
Y23,
Expand All @@ -69,7 +43,9 @@ typedef enum {
QG311R,
R30GB,
R35GB,
R37GB,
R40GA,
Y211BA,
Y211GA, // 9
Y211GA_12,
Y213GA,
Expand Down

0 comments on commit a77ae6c

Please sign in to comment.