vanderbiltrobotics / loadcell

0 stars 0 forks source link

Use a private variable to store value #9

Open AWatk opened 6 years ago

AWatk commented 6 years ago

To help with #8 and #3 store the load cell value as a private double representing the reading in mV

value_ = read()

Have read() return a double by scaling the integer value read on dout_ by the range of the input mode

double read(){
....
...
...
return value*scalar based on current input mode range
}
AWatk commented 6 years ago

The range depends on the input supply voltage, so consider adding in a private variable and get/set functions to specify this voltage to use in internal calculations of range.