Repository navigation
Version 2.0.0
Breaking version update
As signaled by the major version jump, version 2.0 of this library is a major update. This version introduces the new type Finder6MMeasure, now returned by most of the functions of the library that previously returned int32_t,float or double values.
The new class Finder6MMeasure allows you to:
- Get the read value as
float, using the functiontoFloat(). - Get the read value as
int32_t, using the functiontoInt(). - Get the result of the read as
bool, using the functionisReadError().
Additionally, some functions that previously returned uint16_t now return a bool and take a uint16_t * parameter.
This means that when you update from version 1.x to version 2.x, you will likely need to update your sketches to reflect these changes. Below is the full list of the changed functions:
getMachineId,getFirmwareVersion,getStatus,getFlagMeasurement:- Changed return type from
uint16_ttobool. Returnstrueon success,falseotherwise. - Added parameter
valueof typeuint16_t *. Pointer to the variable where the read value will be stored.
- Changed return type from
getTARatio,getTVRatio:- Changed return type from
floattoFinder6MMeasure.
- Changed return type from
getVoltageRMS100,getVoltageMax100,getVoltageMin100,getCurrentRMS100,getCurrentMax100,getCurrentMin100,
getActivePower100,getReactivePower100,getApparentPower100,getPowerFactor100,getFrequency100,getTHD100,getEnergy100,getEnergyPositive100,getEnergyNegative100,getInstantaneousVoltagePeak100,getInstantaneousCurrentPeak100:- Changed return type from
int32_ttoFinder6MMeasure.
- Changed return type from
getVoltageRMS,getVoltageMax,getVoltageMin,getCurrentRMS,getCurrentMax,getCurrentMin,getActivePower,getReactivePower,getApparentPower,getPowerFactor,getFrequency,getTHD,getEnergy,getEnergyPositive,getEnergyNegative,getInstantaneousVoltagePeak,getInstantaneousCurrentPeak:- Changed return type from
doubletoFinder6MMeasure.
- Changed return type from
modbus6MRead16:- Changed return type from
uint32_ttobool. Returnstrueon success,falseotherwise. - Added parameter
valueof typeuint16_t *. Pointer to the variable where the read value will be stored.
- Changed return type from
modbus6MRead32:- Changed return type from
uint32_ttobool. Returnstrueon success,falseotherwise. - Added parameter
valueof typeuint32_t *. Pointer to the variable where the read value will be stored.
- Changed return type from
All of the example sketches use the latest version of the library, offering guidance on how to update your code.
Other changes
- Added ability to set custom Modbus timeout.
- Added ability to set number of read or write attempts before returning error.