Compare commits
25 Commits
v2.0.2-bet
...
v2.0.6
Author | SHA1 | Date | |
---|---|---|---|
e0d641c817 | |||
40fdb667fa | |||
8f6ecb350f | |||
16887f5248 | |||
a7b06c9b97 | |||
666c929483 | |||
301109c37b | |||
d43fceebbc | |||
2c435e5c98 | |||
f9aa7f2e6b | |||
f810bc5352 | |||
043c2d4fa8 | |||
f5a1debd7d | |||
37309da185 | |||
bcb7c039e2 | |||
98ec5b9846 | |||
f0d1692ae1 | |||
10587276c2 | |||
e74f6076b2 | |||
2ee60ce430 | |||
5db80d3670 | |||
2b195ed9ea | |||
45a623cff6 | |||
b4a06d0f2a | |||
85cff3923c |
111
CHANGELOG.md
111
CHANGELOG.md
@@ -1,5 +1,116 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [2.0.6] - 2025-09-03
|
||||||
|
### Fixed
|
||||||
|
- correct progress bar message and update tare function description
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.5] - 2025-09-03
|
||||||
|
### Changed
|
||||||
|
- adjust auto tare counter threshold and reposition tare check in scale loop
|
||||||
|
- improve auto tare logic and reset conditions in scale handling
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- update progress bar message from 'Tare scale' to 'Searching scale'
|
||||||
|
- Scale tare function after boot
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.4-beta2] - 2025-09-03
|
||||||
|
### Changed
|
||||||
|
- adjust auto tare counter threshold and reposition tare check in scale loop
|
||||||
|
- improve auto tare logic and reset conditions in scale handling
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.4-beta1] - 2025-09-03
|
||||||
|
### Changed
|
||||||
|
- improve auto tare logic and reset conditions in scale handling
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.4] - 2025-09-02
|
||||||
|
### Changed
|
||||||
|
- filter out automatic release documentation commits in changelog categorization
|
||||||
|
- disable auto tare and weight filter reset in scale loop
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.3] - 2025-09-02
|
||||||
|
### Added
|
||||||
|
- add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update platformio.ini for version v2.0.3
|
||||||
|
- update changelog and header for version v2.0.2-beta6
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta6
|
||||||
|
- update changelog and header for version v2.0.2-beta5
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta5
|
||||||
|
- update changelog and header for version v2.0.2-beta4
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta4
|
||||||
|
- update changelog and header for version v2.0.2-beta3
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta3
|
||||||
|
- update changelog and header for version v2.0.2-beta2
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta2
|
||||||
|
- update changelog and header for version v2.0.2-beta1
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta1
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- set scale tare request to true in setup function
|
||||||
|
- correct assignment operator in scale tare request handling
|
||||||
|
- correct tare scale request handling in tareScale function
|
||||||
|
- reset weight filter after tare scale operation
|
||||||
|
- correct tare scale function to set scaleTareRequest flag
|
||||||
|
- reset weight counter logic and update spool ID in loop function
|
||||||
|
- reduce delay in start_scale function and reset weight after tare
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.2-beta6] - 2025-09-02
|
||||||
|
### Added
|
||||||
|
- add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta6
|
||||||
|
- update changelog and header for version v2.0.2-beta5
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta5
|
||||||
|
- update changelog and header for version v2.0.2-beta4
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta4
|
||||||
|
- update changelog and header for version v2.0.2-beta3
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta3
|
||||||
|
- update changelog and header for version v2.0.2-beta2
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta2
|
||||||
|
- update changelog and header for version v2.0.2-beta1
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta1
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- set scale tare request to true in setup function
|
||||||
|
- correct assignment operator in scale tare request handling
|
||||||
|
- correct tare scale request handling in tareScale function
|
||||||
|
- reset weight filter after tare scale operation
|
||||||
|
- correct tare scale function to set scaleTareRequest flag
|
||||||
|
- reset weight counter logic and update spool ID in loop function
|
||||||
|
- reduce delay in start_scale function and reset weight after tare
|
||||||
|
|
||||||
|
|
||||||
|
## [2.0.2-beta5] - 2025-09-02
|
||||||
|
### Added
|
||||||
|
- add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta5
|
||||||
|
- update changelog and header for version v2.0.2-beta4
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta4
|
||||||
|
- update changelog and header for version v2.0.2-beta3
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta3
|
||||||
|
- update changelog and header for version v2.0.2-beta2
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta2
|
||||||
|
- update changelog and header for version v2.0.2-beta1
|
||||||
|
- update platformio.ini for beta version v2.0.2-beta1
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- correct tare scale request handling in tareScale function
|
||||||
|
- reset weight filter after tare scale operation
|
||||||
|
- correct tare scale function to set scaleTareRequest flag
|
||||||
|
- reset weight counter logic and update spool ID in loop function
|
||||||
|
- reduce delay in start_scale function and reset weight after tare
|
||||||
|
|
||||||
|
|
||||||
## [2.0.2-beta4] - 2025-09-02
|
## [2.0.2-beta4] - 2025-09-02
|
||||||
### Added
|
### Added
|
||||||
- add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t
|
- add updateOctoSpoolId for OctoPrint integration and change autoSetToBambuSpoolId type to uint16_t
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
version = "2.0.2-beta4"
|
version = "2.0.6"
|
||||||
to_old_version = "1.5.10"
|
to_old_version = "1.5.10"
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@@ -42,6 +42,12 @@ def categorize_commit(commit_msg):
|
|||||||
"""Categorize commit messages based on conventional commits"""
|
"""Categorize commit messages based on conventional commits"""
|
||||||
lower_msg = commit_msg.lower()
|
lower_msg = commit_msg.lower()
|
||||||
|
|
||||||
|
# Filter out automatic release documentation commits
|
||||||
|
if ('docs:' in lower_msg and
|
||||||
|
('update changelog and header for version' in lower_msg or
|
||||||
|
'update platformio.ini for' in lower_msg)):
|
||||||
|
return None # Skip these commits
|
||||||
|
|
||||||
# Check for breaking changes first
|
# Check for breaking changes first
|
||||||
if ('!' in commit_msg and any(x in lower_msg for x in ['feat!', 'fix!', 'chore!', 'refactor!'])) or \
|
if ('!' in commit_msg and any(x in lower_msg for x in ['feat!', 'fix!', 'chore!', 'refactor!'])) or \
|
||||||
'breaking change' in lower_msg or 'breaking:' in lower_msg:
|
'breaking change' in lower_msg or 'breaking:' in lower_msg:
|
||||||
@@ -77,11 +83,12 @@ def get_changes_from_git():
|
|||||||
for commit in commits:
|
for commit in commits:
|
||||||
if commit:
|
if commit:
|
||||||
category = categorize_commit(commit)
|
category = categorize_commit(commit)
|
||||||
# Clean up commit message
|
if category is not None: # Skip commits that return None (filtered out)
|
||||||
clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?!?:', '', commit).strip()
|
# Clean up commit message
|
||||||
# Remove BREAKING CHANGE prefix if present
|
clean_msg = re.sub(r'^(feat|fix|chore|docs|style|refactor|perf|test)(\(.*\))?!?:', '', commit).strip()
|
||||||
clean_msg = re.sub(r'^breaking change:\s*', '', clean_msg, flags=re.IGNORECASE).strip()
|
# Remove BREAKING CHANGE prefix if present
|
||||||
changes[category].append(clean_msg)
|
clean_msg = re.sub(r'^breaking change:\s*', '', clean_msg, flags=re.IGNORECASE).strip()
|
||||||
|
changes[category].append(clean_msg)
|
||||||
|
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print("Error: Failed to get git commits")
|
print("Error: Failed to get git commits")
|
||||||
|
12
src/main.cpp
12
src/main.cpp
@@ -59,6 +59,7 @@ void setup() {
|
|||||||
|
|
||||||
// Scale
|
// Scale
|
||||||
start_scale(touchSensorConnected);
|
start_scale(touchSensorConnected);
|
||||||
|
scaleTareRequest = true;
|
||||||
|
|
||||||
// WDT initialisieren mit 10 Sekunden Timeout
|
// WDT initialisieren mit 10 Sekunden Timeout
|
||||||
bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus
|
bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus
|
||||||
@@ -196,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)
|
||||||
{
|
{
|
||||||
|
@@ -142,7 +142,6 @@ uint8_t tareScale() {
|
|||||||
Serial.println("Tare scale");
|
Serial.println("Tare scale");
|
||||||
scale.tare();
|
scale.tare();
|
||||||
resetWeightFilter();
|
resetWeightFilter();
|
||||||
scaleTareRequest == true;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -164,17 +163,8 @@ void scale_loop(void * parameter) {
|
|||||||
if (currentTime - lastMeasurementTime >= MEASUREMENT_INTERVAL_MS) {
|
if (currentTime - lastMeasurementTime >= MEASUREMENT_INTERVAL_MS) {
|
||||||
if (scale.is_ready())
|
if (scale.is_ready())
|
||||||
{
|
{
|
||||||
// Waage automatisch Taren, wenn zu lange Abweichung
|
|
||||||
if (autoTare && scale_tare_counter >= 5)
|
|
||||||
{
|
|
||||||
Serial.println("Auto Tare scale");
|
|
||||||
scale.tare();
|
|
||||||
resetWeightFilter(); // Reset filter after auto tare
|
|
||||||
scale_tare_counter = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Waage manuell Taren
|
// Waage manuell Taren
|
||||||
if (scaleTareRequest == true)
|
if (scaleTareRequest == true || (autoTare && scale_tare_counter >= 20))
|
||||||
{
|
{
|
||||||
Serial.println("Re-Tare scale");
|
Serial.println("Re-Tare scale");
|
||||||
oledShowMessage("TARE Scale");
|
oledShowMessage("TARE Scale");
|
||||||
@@ -184,6 +174,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
|
||||||
@@ -197,6 +189,17 @@ void scale_loop(void * parameter) {
|
|||||||
weight = stabilizedWeight;
|
weight = stabilizedWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prüfen ob die Waage korrekt genullt ist
|
||||||
|
// Abweichung von 2g ignorieren
|
||||||
|
if (autoTare && (rawWeight > 2 && rawWeight < 7) || rawWeight < -2)
|
||||||
|
{
|
||||||
|
scale_tare_counter++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scale_tare_counter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Debug output for monitoring (can be removed in production)
|
// Debug output for monitoring (can be removed in production)
|
||||||
static unsigned long lastDebugTime = 0;
|
static unsigned long lastDebugTime = 0;
|
||||||
if (currentTime - lastDebugTime > 2000) { // Print every 2 seconds
|
if (currentTime - lastDebugTime > 2000) { // Print every 2 seconds
|
||||||
@@ -239,7 +242,7 @@ void start_scale(bool touchSensorConnected) {
|
|||||||
|
|
||||||
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
|
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
|
||||||
|
|
||||||
oledShowProgressBar(6, 7, DISPLAY_BOOT_TEXT, "Tare scale");
|
oledShowProgressBar(6, 7, DISPLAY_BOOT_TEXT, "Serching scale");
|
||||||
for (uint16_t i = 0; i < 3000; i++) {
|
for (uint16_t i = 0; i < 3000; i++) {
|
||||||
yield();
|
yield();
|
||||||
vTaskDelay(pdMS_TO_TICKS(1));
|
vTaskDelay(pdMS_TO_TICKS(1));
|
||||||
|
@@ -81,7 +81,9 @@ void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventTyp
|
|||||||
else if (doc["type"] == "scale") {
|
else if (doc["type"] == "scale") {
|
||||||
uint8_t success = 0;
|
uint8_t success = 0;
|
||||||
if (doc["payload"] == "tare") {
|
if (doc["payload"] == "tare") {
|
||||||
success = tareScale();
|
scaleTareRequest = true;
|
||||||
|
success = 1;
|
||||||
|
//success = tareScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doc["payload"] == "calibrate") {
|
if (doc["payload"] == "calibrate") {
|
||||||
|
Reference in New Issue
Block a user