Skip to content

Version 2.0.0

Choose a tag to compare

@haveyouseenf haveyouseenf released this 26 Feb 16:52
· 14 commits to main since this release

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 function toFloat().
  • Get the read value as int32_t, using the function toInt().
  • Get the result of the read as bool, using the function isReadError().

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_t to bool. Returns true on success, false otherwise.
    • Added parameter value of type uint16_t *. Pointer to the variable where the read value will be stored.
  • getTARatio, getTVRatio:
    • Changed return type from float to Finder6MMeasure.
  • getVoltageRMS100 , getVoltageMax100 , getVoltageMin100 ,getCurrentRMS100 , getCurrentMax100 , getCurrentMin100 ,
    getActivePower100 , getReactivePower100 , getApparentPower100 , getPowerFactor100 , getFrequency100 , getTHD100 , getEnergy100 , getEnergyPositive100 , getEnergyNegative100 , getInstantaneousVoltagePeak100, getInstantaneousCurrentPeak100:
    • Changed return type from int32_t to Finder6MMeasure.
  • getVoltageRMS , getVoltageMax , getVoltageMin , getCurrentRMS , getCurrentMax , getCurrentMin , getActivePower , getReactivePower , getApparentPower , getPowerFactor , getFrequency , getTHD , getEnergy , getEnergyPositive , getEnergyNegative , getInstantaneousVoltagePeak , getInstantaneousCurrentPeak:
    • Changed return type from double to Finder6MMeasure.
  • modbus6MRead16:
    • Changed return type from uint32_t to bool. Returns true on success, false otherwise.
    • Added parameter value of type uint16_t *. Pointer to the variable where the read value will be stored.
  • modbus6MRead32:
    • Changed return type from uint32_t to bool. Returns true on success, false otherwise.
    • Added parameter value of type uint32_t *. Pointer to the variable where the read value will be stored.

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.