@zimo-elektronik/zcan 1.0.8 → 1.0.9
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.
|
@@ -113,7 +113,7 @@ export default class LanDataGroup {
|
|
|
113
113
|
const era = buffer.readUInt16LE(50);
|
|
114
114
|
const countryCode = buffer.readUInt16LE(52);
|
|
115
115
|
const functions = Array();
|
|
116
|
-
for (let i = 0; i <
|
|
116
|
+
for (let i = 0; i < 32; i++) {
|
|
117
117
|
const icon = buffer.readUInt16LE(54 + i * 2);
|
|
118
118
|
const iconString = icon === 0 ? String(i).padStart(2, '0') : String(icon);
|
|
119
119
|
functions.push({
|
|
@@ -146,7 +146,7 @@ export default class LanDataGroup {
|
|
|
146
146
|
const name = ExtendedASCII.byte2str(buffer.subarray(12, 38));
|
|
147
147
|
const imageId = buffer.readUInt16LE(44);
|
|
148
148
|
const functions = Array();
|
|
149
|
-
for (let i = 0; i <
|
|
149
|
+
for (let i = 0; i < 32; i++) {
|
|
150
150
|
const icon = buffer.readUInt16LE(68 + i * 2);
|
|
151
151
|
const iconString = icon === 0 ? String(i).padStart(2, '0') : String(icon);
|
|
152
152
|
functions.push({
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "https://github.com/ZIMO-Elektronik/zcan",
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.9",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "node dist/main.js",
|
|
11
11
|
"start:dev": "nodemon --ext js,ts,json,env --exec \"node --experimental-specifier-resolution=node --loader ts-node/esm\" src/main.ts",
|
package/src/zcan/lanDataGroup.ts
CHANGED
|
@@ -188,7 +188,7 @@ export default class LanDataGroup {
|
|
|
188
188
|
|
|
189
189
|
// reading 64 bytes of functions
|
|
190
190
|
const functions = Array<TrainFunction>();
|
|
191
|
-
for (let i = 0; i <
|
|
191
|
+
for (let i = 0; i < 32; i++) {
|
|
192
192
|
const icon = buffer.readUInt16LE(54 + i * 2);
|
|
193
193
|
const iconString =
|
|
194
194
|
icon === 0 ? String(i).padStart(2, '0') : String(icon);
|
|
@@ -245,7 +245,7 @@ export default class LanDataGroup {
|
|
|
245
245
|
|
|
246
246
|
// reading 64 bytes of functions
|
|
247
247
|
const functions = Array<TrainFunction>();
|
|
248
|
-
for (let i = 0; i <
|
|
248
|
+
for (let i = 0; i < 32; i++) {
|
|
249
249
|
const icon = buffer.readUInt16LE(68 + i * 2);
|
|
250
250
|
const iconString =
|
|
251
251
|
icon === 0 ? String(i).padStart(2, '0') : String(icon);
|