poe-svelte-ui-lib 3.15.2 → 3.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -654,7 +654,7 @@ npm pack # сборка пакета в dist/: проверка т
654
654
 
655
655
  ---
656
656
 
657
- ## 👤 Создатель и владелец проекта
657
+ ## 👤 Автор и правообладатель
658
658
 
659
659
  **Олег Перевышин**
660
660
 
@@ -77,6 +77,14 @@ export const createCanParser = ({ sessionTimeoutMs = 2000, maxPacketBytes = 8192
77
77
  const dlc = parseInt(dlcHex, 16);
78
78
  const size = Math.min(type === "T" ? Math.min(dlc, 8) : fdLength(dlc), dataHex.length >> 1);
79
79
  const data = hexToBytes(dataHex.slice(0, size * 2));
80
+ /* Однокадровый пакет (frame 0 + last) самодостаточен: декодируем сразу, не трогая многокадровые сессии.
81
+ Иначе частые однокадровые пакеты (уставки 500 Гц) с тем же 3-битным counter сбрасывают сборку большого ответа того же отправителя */
82
+ if (id.frame === 0 && id.last) {
83
+ const parsed = decodeRecords(data);
84
+ if (parsed.status === "complete")
85
+ messages.push({ canId, priority: id.priority, srcBusID: id.srcBusID, counter: id.counter, data: data.subarray(0, parsed.length), timestamp: now });
86
+ return end + 1;
87
+ }
80
88
  const key = (id.srcBusID << 3) | id.counter;
81
89
  let session = sessions.get(key);
82
90
  if (id.frame === 0 && session?.next !== 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "3.15.2",
3
+ "version": "3.15.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Oleg-Perevyshin/ElementsUI.git"