Compare commits
3 Commits
v2.0.0-bet
...
v2.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
63fafa2463 | |||
f664e85933 | |||
7bf9868d79 |
104
CHANGELOG.md
104
CHANGELOG.md
@@ -1,5 +1,109 @@
|
||||
# Changelog
|
||||
|
||||
## [2.0.0-beta8] - 2025-08-30
|
||||
### Breaking Changes
|
||||
- enhance commit categorization for breaking changes
|
||||
- Handling of Spools with Tags from Vendors. fix: improve get_last_tag function to handle non-beta tags and fallback to newest tag
|
||||
|
||||
### Added
|
||||
- implement robust page reading with error recovery for NFC tags
|
||||
- enhance NFC tag reading with robust error recovery and JSON optimization for fast-path detection
|
||||
- implement robust page reading and safe tag detection with error recovery
|
||||
- add Manufacturer Tags support documentation in German and English
|
||||
- add display delay for vendor, filament, and spool creation processes
|
||||
- add progress bar updates for vendor and filament creation processes
|
||||
- update vendor and filament ID handling to use NULL and add delays for stability
|
||||
- add delay to ensure proper setting of vendor and filament IDs after API state changes
|
||||
- enhance NDEF decoding with detailed validation and debugging output
|
||||
- enhance NDEF decoding to validate structure and extract JSON payload
|
||||
- add logging for decoded JSON data in NFC processing
|
||||
- implement filament and spool creation in Spoolman API
|
||||
- Add JSON structure comments for filament and spool creation
|
||||
- Add vendor and filament management to API; implement recycling factory handling in NFC
|
||||
|
||||
### Changed
|
||||
- update platformio.ini for beta version v2.0.0-beta8
|
||||
- update changelog and header for version v2.0.0-beta7
|
||||
- update platformio.ini for beta version v2.0.0-beta7
|
||||
- update changelog and header for version v2.0.0-beta6
|
||||
- update changelog and header for version v2.0.0-beta6
|
||||
- update platformio.ini for beta version v2.0.0-beta6
|
||||
- update changelog and header for version v2.0.0-beta5
|
||||
- update platformio.ini for beta version v2.0.0-beta5
|
||||
- update changelog and header for version v2.0.0-beta4
|
||||
- update platformio.ini for beta version v2.0.0-beta4
|
||||
- update changelog and header for version v2.0.0-beta3
|
||||
- update platformio.ini for beta version v2.0.0-beta3
|
||||
- update createVendor and checkVendor functions to accept JsonDocument payload
|
||||
- update changelog and header for version v2.0.0-beta2
|
||||
- update platformio.ini for beta version v2.0.0-beta2
|
||||
- clarify product URL description for Manufacturer Tags in German and English documentation
|
||||
- update changelog and header for version v2.0.0-beta1
|
||||
- update platformio.ini for beta version v2.0.0-beta1
|
||||
- update version to 2.0.0 in platformio.ini
|
||||
- update changelog and header for version v1.5.12-beta18
|
||||
- update platformio.ini for beta version v1.5.12-beta18
|
||||
- update changelog and header for version v1.5.12-beta17
|
||||
- update platformio.ini for beta version v1.5.12-beta17
|
||||
- optimize page limit detection and remove redundant verification code
|
||||
- update changelog and header for version v1.5.12-beta16
|
||||
- update platformio.ini for beta version v1.5.12-beta16
|
||||
- Refactor NFC interface handling and improve error diagnostics
|
||||
- update changelog and header for version v1.5.12-beta15
|
||||
- update platformio.ini for beta version v1.5.12-beta15
|
||||
- enhance NFC write operation diagnostics and improve error handling
|
||||
- enhance NFC write operation handling and prevent tag operations during write
|
||||
- update changelog and header for version v1.5.12-beta14
|
||||
- update platformio.ini for beta version v1.5.12-beta14
|
||||
- optimize JSON payload structure and enhance NFC tag validation process
|
||||
- update changelog and header for version v1.5.12-beta13
|
||||
- update platformio.ini for beta version v1.5.12-beta13
|
||||
- reorganize clearUserDataArea function for improved clarity and safety
|
||||
- update changelog and header for version v1.5.12-beta12
|
||||
- update platformio.ini for beta version v1.5.12-beta12
|
||||
- update changelog and header for version v1.5.12-beta11
|
||||
- update platformio.ini for beta version v1.5.12-beta11
|
||||
- update changelog and header for version v1.5.12-beta10
|
||||
- update platformio.ini for beta version v1.5.12-beta10
|
||||
- streamline task creation in checkVendor and checkFilament functions
|
||||
- update changelog and header for version v1.5.12-beta9
|
||||
- update platformio.ini for beta version v1.5.12-beta9
|
||||
- update changelog and header for version v1.5.12-beta8
|
||||
- update platformio.ini for beta version v1.5.12-beta8
|
||||
- update changelog and header for version v1.5.12-beta7
|
||||
- update platformio.ini for beta version v1.5.12-beta7
|
||||
- update changelog and header for version v1.5.12-beta6
|
||||
- update platformio.ini for beta version v1.5.12-beta6
|
||||
- improve task synchronization in vendor, filament, and spool creation functions
|
||||
- update changelog and header for version v1.5.12-beta5
|
||||
- update platformio.ini for beta version v1.5.12-beta5
|
||||
- update changelog and header for version v1.5.12-beta4
|
||||
- update platformio.ini for beta version v1.5.12-beta4
|
||||
- update changelog and header for version v1.5.12-beta3
|
||||
- update platformio.ini for beta version v1.5.12-beta3
|
||||
- update changelog and header for version v1.5.12-beta2
|
||||
- update platformio.ini for beta version v1.5.12-beta2
|
||||
- update changelog and header for version v1.5.12-beta1
|
||||
- update platformio.ini for beta version v1.5.12-beta1
|
||||
- Merge branch 'main' into recyclingfabrik
|
||||
- Merge branch 'main' into recyclingfabrik
|
||||
|
||||
### Fixed
|
||||
- call scale.tare() in setup after starting scale
|
||||
- update createVendor function to use external_id as comment instead of static text
|
||||
- update to_old_version in platformio.ini to reflect correct previous version
|
||||
- increase delay in start_scale function for improved stability
|
||||
- replace progress bar with message display for remaining weight in sendToApi function
|
||||
- update vendor check to use shorthand key in payload
|
||||
- reset NFC state on API send failure to allow retry
|
||||
- update createdFilamentId reset value to 65535 for better task handling
|
||||
- update createdVendorId reset value to 65535 for improved API handling
|
||||
- update spoolman ID reset values to 65535 for better API response detection
|
||||
- correct color_hex key usage and comment out unused date fields in spool creation
|
||||
- improve API state handling and vendor name formatting
|
||||
- enhance filament creation logic to include dynamic comments based on payload
|
||||
|
||||
|
||||
## [2.0.0-beta7] - 2025-08-30
|
||||
### Breaking Changes
|
||||
- enhance commit categorization for breaking changes
|
||||
|
@@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[common]
|
||||
version = "2.0.0-beta7"
|
||||
version = "2.0.0-beta8"
|
||||
to_old_version = "1.5.10"
|
||||
|
||||
##
|
||||
|
62
src/nfc.cpp
62
src/nfc.cpp
@@ -108,6 +108,37 @@ bool formatNdefTag() {
|
||||
return buffer[2]*8;
|
||||
}
|
||||
|
||||
// Robust page reading with error recovery
|
||||
bool robustPageRead(uint8_t page, uint8_t* buffer) {
|
||||
const int MAX_READ_ATTEMPTS = 3;
|
||||
|
||||
for (int attempt = 0; attempt < MAX_READ_ATTEMPTS; attempt++) {
|
||||
esp_task_wdt_reset();
|
||||
yield();
|
||||
|
||||
if (nfc.ntag2xx_ReadPage(page, buffer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Serial.printf("Page %d read failed, attempt %d/%d\n", page, attempt + 1, MAX_READ_ATTEMPTS);
|
||||
|
||||
// Try to stabilize connection between attempts
|
||||
if (attempt < MAX_READ_ATTEMPTS - 1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(25));
|
||||
|
||||
// Re-verify tag presence with quick check
|
||||
uint8_t uid[7];
|
||||
uint8_t uidLength;
|
||||
if (!nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength, 100)) {
|
||||
Serial.println("Tag lost during read operation");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
String detectNtagType()
|
||||
{
|
||||
// Read capability container from page 3 to determine exact NTAG type
|
||||
@@ -1730,37 +1761,6 @@ void startWriteJsonToTag(const bool isSpoolTag, const char* payload) {
|
||||
}
|
||||
}
|
||||
|
||||
// Robust page reading with error recovery
|
||||
bool robustPageRead(uint8_t page, uint8_t* buffer) {
|
||||
const int MAX_READ_ATTEMPTS = 3;
|
||||
|
||||
for (int attempt = 0; attempt < MAX_READ_ATTEMPTS; attempt++) {
|
||||
esp_task_wdt_reset();
|
||||
yield();
|
||||
|
||||
if (nfc.ntag2xx_ReadPage(page, buffer)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Serial.printf("Page %d read failed, attempt %d/%d\n", page, attempt + 1, MAX_READ_ATTEMPTS);
|
||||
|
||||
// Try to stabilize connection between attempts
|
||||
if (attempt < MAX_READ_ATTEMPTS - 1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(25));
|
||||
|
||||
// Re-verify tag presence with quick check
|
||||
uint8_t uid[7];
|
||||
uint8_t uidLength;
|
||||
if (!nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength, 100)) {
|
||||
Serial.println("Tag lost during read operation");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Safe tag detection with manual retry logic and short timeouts
|
||||
bool safeTagDetection(uint8_t* uid, uint8_t* uidLength) {
|
||||
const int MAX_ATTEMPTS = 3;
|
||||
|
Reference in New Issue
Block a user