Skip to content

Don't modify register addresses #16

Description

@phibos

In the file command_line.c you decrease the given register address by 1.

case 'a':
	rc = parse_int_param(optarg, &params->sad);
	if (params->sad <= 0) {
		ERR("Address should be greater than zero: %s\n", optarg);
		rc = RESULT_WRONG_ARG;
	}
	params->sad--; /* register/bit address starts from 0 */
break;

Is there any reason to modify the register address instead of using the given value? The start address of the devices I use is 1. That's why I have to set the address to 2 on the commandline. This might be very confusing for people comparing the device documentation with my check configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions