Compare commits
3 Commits
v1.5.12-be
...
v1.5.12-be
Author | SHA1 | Date | |
---|---|---|---|
3dd4b82710 | |||
bc41205f15 | |||
f450d1efdf |
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [1.5.12-beta2] - 2025-08-29
|
||||
### Changed
|
||||
- update platformio.ini for beta version v1.5.12-beta2
|
||||
|
||||
### Fixed
|
||||
- enhance filament creation logic to include dynamic comments based on payload
|
||||
|
||||
|
||||
## [1.5.12-beta1] - 2025-08-28
|
||||
### Added
|
||||
- implement filament and spool creation in Spoolman API
|
||||
|
@@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[common]
|
||||
version = "1.5.12-beta1"
|
||||
version = "1.5.12-beta2"
|
||||
to_old_version = "1.5.0"
|
||||
|
||||
##
|
||||
|
12
src/api.cpp
12
src/api.cpp
@@ -752,10 +752,18 @@ uint16_t createFilament(uint16_t vendorId, const JsonDocument& payload) {
|
||||
filamentDoc["weight"] = payload["weight"].as<String>();
|
||||
filamentDoc["spool_weight"] = payload["spool_weight"].as<String>();
|
||||
filamentDoc["article_number"] = payload["artnr"].as<String>();
|
||||
filamentDoc["comment"] = String("automatically generated");
|
||||
filamentDoc["extruder_temp"] = payload["extruder_temp"].is<String>() ? payload["extruder_temp"].as<String>() : "";
|
||||
filamentDoc["bed_temp"] = payload["bed_temp"].is<String>() ? payload["bed_temp"].as<String>() : "";
|
||||
filamentDoc["external_id"] = payload["artnr"].as<String>();
|
||||
|
||||
if (payload["artnr"].is<String>())
|
||||
{
|
||||
filamentDoc["external_id"] = payload["artnr"].as<String>();
|
||||
filamentDoc["comment"] = payload["url"].is<String>() ? payload["url"].as<String>() + payload["artnr"].as<String>() : "automatically generated";
|
||||
}
|
||||
else
|
||||
{
|
||||
filamentDoc["comment"] = payload["url"].is<String>() ? payload["url"].as<String>() : "automatically generated";
|
||||
}
|
||||
|
||||
if (payload["multi_color_hexes"].is<String>()) {
|
||||
filamentDoc["multi_color_hexes"] = payload["multi_color_hexes"].as<String>();
|
||||
|
Reference in New Issue
Block a user