Sets the SCALE value.
This value is used to convert the raw data to "human readable" measure units.
1.0 by default.
set-scale
@/set-scale
Sets the SCALE value.
This value is used to convert the raw data to "human readable" measure units.
1.0 by default.
DEV@/hx711-device
The HX711 device.
SCLnumber
The Scale value.
A floating point value. Can be negative.
DOpulse
Triggers a new setting.
DONEpulse
Pulses when the setting is done.
DEV'@/hx711-device
The HX711 device.
To use the node in your project you should have the gabbapeople/hx711 library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
node {
void evaluate(Context ctx) {
auto dev = getValue<input_DEV>(ctx);
if (isSettingUp())
emitValue<output_DEVU0027>(ctx, dev);
if (!isInputDirty<input_DO>(ctx))
return;
float scale = getValue<input_SCL>(ctx);
dev->set_scale(scale);
emitValue<output_DONE>(ctx, 1);
}
}