endail/hx711

Remove magic numbers; replace with predefined statics

endail opened this issue · 0 comments

hx711/src/HX711.cpp

Lines 65 to 67 in 42d6305

val_t HX711::_convertFromTwosComplement(const val_t val) noexcept {
return -(val & 0x800000) + (val & 0x7fffff);
}