Closed laukik-hase closed 4 years ago
Fixed in 80c40452484da403d5dfedbdc64ec38520d78551
@laukik-hase Please code review again, I also added bound checks to degree_of_rotation parameter, such that if it is greater than SERVO_MAX_DEGREE it will become equal to SERVO_MAX_DEGREE.
Changed it in 13b55a9f82cb383f876105d6460bd3d3943e7d73
@VedantParanjape Use either operation success or failure in error checking. Both of them make code redundant
@VedantParanjape https://github.com/SRA-VJTI/sra-board-component/blob/13b55a9f82cb383f876105d6460bd3d3943e7d73/src/servo.c#L52 Very dangerous naming followed here.
Also, the second part in the if check is redundant. Get it?
@VedantParanjape https://github.com/SRA-VJTI/sra-board-component/blob/13b55a9f82cb383f876105d6460bd3d3943e7d73/src/servo.c#L52 Very dangerous naming followed here.
Also, the second part in the if check is redundant. Get it?
Yes, got it. I will make the change, maybe make the err__A into err_D, alright?
@laukik-hase Fixed in 2619bc76c739efd06095768b163231ee789b70e3
Done.
https://github.com/SRA-VJTI/sra-board-component/blob/6fc123672daa01aa050f5e3db8d87741e3b18f51/src/servo.c#L9
Remove error handling blocks for functions which have a very little chance of failing. (These functions will be automatically get verified when stress-tested)