From 6a110b795077e1b255000a0398011020f0ed0681 Mon Sep 17 00:00:00 2001 From: drfritz142 Date: Fri, 4 Mar 2022 13:10:27 +0100 Subject: [PATCH 1/3] Update HX711.h provide function get_gain() --- src/HX711.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/HX711.h b/src/HX711.h index 9814891..9329dca 100644 --- a/src/HX711.h +++ b/src/HX711.h @@ -72,6 +72,9 @@ class HX711 // set the SCALE value; this value is used to convert the raw data to "human readable" data (measure units) void set_scale(float scale = 1.f); + // get the current GAIN + byte get_gain(); + // get the current SCALE float get_scale(); From b89301dc59829ce01b8fdc317c1c358d53894385 Mon Sep 17 00:00:00 2001 From: drfritz142 Date: Fri, 4 Mar 2022 13:12:08 +0100 Subject: [PATCH 2/3] Update HX711.cpp provide function get_gain() in source --- src/HX711.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HX711.cpp b/src/HX711.cpp index 9e3b4f4..1816237 100644 --- a/src/HX711.cpp +++ b/src/HX711.cpp @@ -256,6 +256,10 @@ void HX711::set_scale(float scale) { SCALE = scale; } +byte HX711::get_gain() { + return GAIN; +} + float HX711::get_scale() { return SCALE; } From 86bcdd17ef1b7b29f57df45aad64714df8673734 Mon Sep 17 00:00:00 2001 From: Andreas Nickel Date: Fri, 4 Mar 2022 14:36:53 +0100 Subject: [PATCH 3/3] sorting files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e66e203..b5344a9 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ # PlatformIO virtualenv and pioenv /.venv* /.pioenvs +.pio +.vscode