Skip to content

Commit

Permalink
check one load cell
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Nov 2, 2024
1 parent cff2117 commit c331218
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,11 @@ void update(float &d0, float &d1, float &d2) {
namespace load_cell {
void update(float &d0) {
float val1 = HX711_Bus::read_scale(0);
float val2 = HX711_Bus::read_scale(1);
if (val1 != -1 && val2 != -1) {
d0 = val1 + val2;
} else if (val1 != -1) {
// float val2 = HX711_Bus::read_scale(1);
// if (val1 != -1 && val2 != -1) {
// d0 = val1 + val2;
if (val1 != -1) {
d0 = val1;
} else if (val2 != -1) {
d0 = val2;
}
}
} // namespace load_cell
Expand Down

0 comments on commit c331218

Please sign in to comment.