#include "Property.cpp"

//Defines to shorten print statements
#define mp(x) Serial.print(F(x))
#define mpl(x) Serial.println(F(x))
#define sp(x) Serial.print(x)
#define spl(x) Serial.println(x)

char buff[60] = "";
/*
       Name = name;
      Value = initialValue;
      Min = minValue;
      Max = maxValue;
      Increment = increment;
      StepSize = stepSize;
*/
Property props[3] {
  //        Name      Value   Min     Max     Incr  Stepsize
  Property("Voltage",   25.0, 0.0,   90.0,    1.0,  0.1),
  Property("Reference", 50.0, 50.0, 100.0,    1.0,  0.1),
  Property("Speed",     0,    0,     1000.0,   5,     1),
};

int arrLen = sizeof(props) / sizeof(props[0]);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  mpl("===== Parameters ====");

  for (int i = 0 ; i < arrLen; i++) {
    sprintf(buff, "%s = \t%2.2f", props[i].Name, props[i].Value);
    Serial.println(buff);
  }

}

void loop() {
  // put your main code here, to run repeatedly:
  delay(100); // this speeds up the simulation
}