Compare commits
3 Commits
v2.0.4
...
f9aa7f2e6b
| Author | SHA1 | Date | |
|---|---|---|---|
| f9aa7f2e6b | |||
| f810bc5352 | |||
| 043c2d4fa8 |
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.0.4-beta1] - 2025-09-03
|
||||||
|
### Changed
|
||||||
|
- improve auto tare logic and reset conditions in scale handling
|
||||||
|
|
||||||
|
|
||||||
## [2.0.4] - 2025-09-02
|
## [2.0.4] - 2025-09-02
|
||||||
### Changed
|
### Changed
|
||||||
- filter out automatic release documentation commits in changelog categorization
|
- filter out automatic release documentation commits in changelog categorization
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "2.0.4"
|
version = "2.0.4-beta1"
|
||||||
to_old_version = "1.5.10"
|
to_old_version = "1.5.10"
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|||||||
11
src/main.cpp
11
src/main.cpp
@@ -197,17 +197,6 @@ void loop() {
|
|||||||
{
|
{
|
||||||
lastWeightReadTime = currentMillis;
|
lastWeightReadTime = currentMillis;
|
||||||
|
|
||||||
// Prüfen ob die Waage korrekt genullt ist
|
|
||||||
// Abweichung von 2g ignorieren
|
|
||||||
if (autoTare && (weight > 2 && weight < 7) || weight < -2)
|
|
||||||
{
|
|
||||||
scale_tare_counter++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
scale_tare_counter = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfen ob das Gewicht gleich bleibt und dann senden
|
// Prüfen ob das Gewicht gleich bleibt und dann senden
|
||||||
if (abs(weight - lastWeight) <= 2 && weight > 5)
|
if (abs(weight - lastWeight) <= 2 && weight > 5)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -161,20 +161,21 @@ void scale_loop(void * parameter) {
|
|||||||
|
|
||||||
// Only measure at defined intervals to reduce noise
|
// Only measure at defined intervals to reduce noise
|
||||||
if (currentTime - lastMeasurementTime >= MEASUREMENT_INTERVAL_MS) {
|
if (currentTime - lastMeasurementTime >= MEASUREMENT_INTERVAL_MS) {
|
||||||
if (scale.is_ready())
|
// Prüfen ob die Waage korrekt genullt ist
|
||||||
|
// Abweichung von 2g ignorieren
|
||||||
|
if (autoTare && (weight > 2 && weight < 7) || weight < -2)
|
||||||
{
|
{
|
||||||
// Waage automatisch Taren, wenn zu lange Abweichung
|
scale_tare_counter++;
|
||||||
if (autoTare && scale_tare_counter >= 5)
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Serial.println("Auto Tare scale");
|
|
||||||
//scale.tare();
|
|
||||||
//resetWeightFilter(); // Reset filter after auto tare
|
|
||||||
scaleTareRequest = true;
|
|
||||||
scale_tare_counter = 0;
|
scale_tare_counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (scale.is_ready())
|
||||||
|
{
|
||||||
// Waage manuell Taren
|
// Waage manuell Taren
|
||||||
if (scaleTareRequest == true)
|
if (scaleTareRequest == true || (autoTare && scale_tare_counter >= 5))
|
||||||
{
|
{
|
||||||
Serial.println("Re-Tare scale");
|
Serial.println("Re-Tare scale");
|
||||||
oledShowMessage("TARE Scale");
|
oledShowMessage("TARE Scale");
|
||||||
@@ -184,6 +185,8 @@ void scale_loop(void * parameter) {
|
|||||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||||
oledShowWeight(0);
|
oledShowWeight(0);
|
||||||
scaleTareRequest = false;
|
scaleTareRequest = false;
|
||||||
|
scale_tare_counter = 0;
|
||||||
|
weight = 0; // Reset global weight variable after tare
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get raw weight reading
|
// Get raw weight reading
|
||||||
|
|||||||
Reference in New Issue
Block a user