datjan / esp8266-victron-mppt-solarchargecontroller

This is a online information server with rest api based on esp8266 and Victron Solar MPPT Solar Charge Controller
MIT License
9 stars 1 forks source link

Purpose of some defines in Config.h #5

Open rin67630 opened 10 months ago

rin67630 commented 10 months ago

In Config.h some #defines like:

    #define PID 0
    #define FW 1
    #define SER 2   // Offically SER# but # does not play that well as macro
    #define V 3     // ScV
    #define I 4     // ScI
    #define VPV 5   // PVV
    #define PPV 6   // PVI = PVV / VPV

Seem to be used only to name the listed parameters Actually the #define V 3 conflicts with another Library from the rest of my code where V is a macro as well:

Config.h:39:11: error: expected unqualified-id before numeric constant
   39 | #define V 3
      |           ^
/Users/MiFi/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include/bearssl/bearssl_rand.h:205:16: note: in expansion of macro 'V'
  205 |  unsigned char V[64];
      |                ^

It would be better ti use longe macro names

define PID 0

#define FW 1
#define SER   2      // Offically SER# but # does not play that well as macro
#define VOLT 3     // ScV
#define AMP 4      // ScI
#define VPV 5       // PVV
#define PPV 6       // PVI = PVV / VPV