sonia-auv / provider_hydrophone

Allow to communicate with hydrophone
GNU General Public License v3.0
0 stars 1 forks source link

Improve code structure #20

Closed supertoto29 closed 2 years ago

supertoto29 commented 2 years ago

Warning : Before creating an issue or task, make sure that it does not already exists in the issue tracker. Thank you.

Context

The code uses a lot of private variable without any protection methods

Changes

Add protection methods and reduce the amount of access to the private variable

supertoto29 commented 2 years ago

result = setSNRThreshold(msg->argv[0]) && setSignalLowThreshold(msg->argv[1]) && setSignalHighThreshold(msg->argv[2]); createDOACommand();

This just assign the value into the private variable and then reuse it in the function under it. This is one of the parts that can be improved.