modbus-esp8266 icon indicating copy to clipboard operation
modbus-esp8266 copied to clipboard

- Fixed "responce" typo and other typos in doc and comments

Open lmartorella opened this issue 2 years ago • 2 comments

Hello, Thanks for this awesome library! It is working perfectly on both ESP8266 and ESP32 cores, so probably it deserves a rename.

However the "responce" typo just let me down a bit, especially since it is quite prominent since exposed in the API. What about a rename? I know that this will change the API, so probably you will be interested in maintaining the backward compatibility. Please let me know if you want to do that, eventually with the usage of __attribute__((deprecated)) in order to raise warnings at compile time.

A whole next level change would be to rename the methods to drop the master/slave naming in favor of client/server (see here], but I noticed there is always something going on, even if is not super-clear to me (it looks inverted in the RTU interface?):

	void client() { isMaster = true; };
	inline void master() {client();}
	void server(uint8_t serverId) {_slaveId = serverId;};
	inline void slave(uint8_t slaveId) {server(slaveId);}
	uint8_t server() { return _slaveId; }
	inline uint8_t slave() { return server(); }

Thanks! L

lmartorella avatar Aug 05 '23 19:08 lmartorella

Thanks. You are right about leaving typo names API calls marked as deprecated but still available. Could you please add these wrappers to the request?

emelianov avatar Oct 14 '23 03:10 emelianov

Great, added! Thx, L

lmartorella avatar Oct 14 '23 21:10 lmartorella