Compare commits
4 Commits
v1.5.12-be
...
v1.5.12-be
Author | SHA1 | Date | |
---|---|---|---|
40cb835e51 | |||
eb9d9e74f4 | |||
d8af3f45e5 | |||
96bb8f9c7c |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
## [1.5.12-beta8] - 2025-08-29
|
||||
### Added
|
||||
- add delay to ensure proper setting of vendor and filament IDs after API state changes
|
||||
|
||||
### Changed
|
||||
- update platformio.ini for beta version v1.5.12-beta8
|
||||
|
||||
### Fixed
|
||||
- correct color_hex key usage and comment out unused date fields in spool creation
|
||||
|
||||
|
||||
## [1.5.12-beta7] - 2025-08-29
|
||||
### Changed
|
||||
- update platformio.ini for beta version v1.5.12-beta7
|
||||
|
@@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[common]
|
||||
version = "1.5.12-beta7"
|
||||
version = "1.5.12-beta8"
|
||||
to_old_version = "1.5.0"
|
||||
|
||||
##
|
||||
|
14
src/api.cpp
14
src/api.cpp
@@ -716,6 +716,9 @@ uint16_t checkVendor(String vendor) {
|
||||
while(spoolmanApiState != API_IDLE) {
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
// Additional delay to ensure foundVendorId is properly set after API state becomes IDLE
|
||||
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||
|
||||
// Check if vendor was found
|
||||
if (foundVendorId == 0) {
|
||||
@@ -748,7 +751,7 @@ uint16_t createFilament(uint16_t vendorId, const JsonDocument& payload) {
|
||||
|
||||
// Create JSON payload for filament creation
|
||||
JsonDocument filamentDoc;
|
||||
filamentDoc["name"] = payload["name"].as<String>();
|
||||
filamentDoc["name"] = payload["color_name"].as<String>();
|
||||
filamentDoc["vendor_id"] = String(vendorId);
|
||||
filamentDoc["material"] = payload["type"].as<String>();
|
||||
filamentDoc["density"] = (payload["density"].is<String>() && payload["density"].as<String>().length() > 0) ? payload["density"].as<String>() : "1.24";
|
||||
@@ -775,7 +778,7 @@ uint16_t createFilament(uint16_t vendorId, const JsonDocument& payload) {
|
||||
}
|
||||
else
|
||||
{
|
||||
filamentDoc["color_hex"] = (payload["color"].is<String>() && payload["color"].as<String>().length() >= 6) ? payload["color"].as<String>() : "FFFFFF";
|
||||
filamentDoc["color_hex"] = (payload["color_hex"].is<String>() && payload["color_hex"].as<String>().length() >= 6) ? payload["color_hex"].as<String>() : "FFFFFF";
|
||||
}
|
||||
|
||||
String filamentPayload;
|
||||
@@ -861,6 +864,9 @@ uint16_t checkFilament(uint16_t vendorId, const JsonDocument& payload) {
|
||||
while(spoolmanApiState != API_IDLE) {
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
// Additional delay to ensure foundFilamentId is properly set after API state becomes IDLE
|
||||
vTaskDelay(50 / portTICK_PERIOD_MS);
|
||||
|
||||
// Check if filament was found
|
||||
if (foundFilamentId == 0) {
|
||||
@@ -894,8 +900,8 @@ uint16_t createSpool(uint16_t vendorId, uint16_t filamentId, JsonDocument& paylo
|
||||
|
||||
// Create JSON payload for spool creation
|
||||
JsonDocument spoolDoc;
|
||||
spoolDoc["first_used"] = String(currentDate);
|
||||
spoolDoc["last_used"] = String(currentDate);
|
||||
//spoolDoc["first_used"] = String(currentDate);
|
||||
//spoolDoc["last_used"] = String(currentDate);
|
||||
spoolDoc["filament_id"] = String(filamentId);
|
||||
spoolDoc["initial_weight"] = weight > 10 ? String(weight) : "1000";
|
||||
spoolDoc["spool_weight"] = (payload["spool_weight"].is<String>() && payload["spool_weight"].as<String>().length() > 0) ? payload["spool_weight"].as<String>() : "180";
|
||||
|
Reference in New Issue
Block a user