@springfield/ham-radio-api 17.11.0 → 18.0.0
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/dist/radio/protocol.d.ts
CHANGED
|
@@ -72,6 +72,11 @@ export interface RadioExchange {
|
|
|
72
72
|
* Optional `ack` is a second exchange after each chunk (for example an ACK).
|
|
73
73
|
* Optional `delay` is milliseconds to wait after each accepted chunk (Kenwood
|
|
74
74
|
* TM-D710A clone at 57600 needs this so the next `R` does not outrun the radio).
|
|
75
|
+
* Optional `ready` is a byte prefixed to the next chunk when `ack.expect` times out.
|
|
76
|
+
* UV-5R firmware that replies `06` to the host ACK stays on the plain frame.
|
|
77
|
+
* Firmware that stays silent prefixes the next `X` block with `06`. A short
|
|
78
|
+
* `ack.timeout` (50ms) turns that silence into a timeout before the radio
|
|
79
|
+
* answers `FE`.
|
|
75
80
|
*/
|
|
76
81
|
export interface RadioReadStep {
|
|
77
82
|
description?: string;
|
|
@@ -82,6 +87,7 @@ export interface RadioReadStep {
|
|
|
82
87
|
ack?: RadioExchange;
|
|
83
88
|
timeout?: number;
|
|
84
89
|
delay?: number;
|
|
90
|
+
ready?: RadioByteToken;
|
|
85
91
|
};
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/radio/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,cAAc,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAA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MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;KAC7B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,GAAG,iBAAiB,CAAC"}
|
|
@@ -3,15 +3,28 @@ import type { AntennaTypeId } from "../antenna/type.js";
|
|
|
3
3
|
export declare const MIN_ANTENNA_HEIGHT_AGL_M = 0.5;
|
|
4
4
|
export declare const MAX_ANTENNA_HEIGHT_AGL_M = 120;
|
|
5
5
|
/**
|
|
6
|
-
* One physical antenna
|
|
6
|
+
* One physical antenna owned by one station or one radio.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* A station antenna is installed at a site (`stationId`). A radio antenna is
|
|
9
|
+
* mounted on a saved radio (`radioId`) and moves with it, such as a handheld
|
|
10
|
+
* whip. Exactly one of `stationId` and `radioId` is set. The same radiator
|
|
11
|
+
* on two owners is two records. `bands` are ham {@link SpectrumBand.wavelength}
|
|
12
|
+
* values, not a second band catalog.
|
|
13
|
+
*
|
|
14
|
+
* Height for a radio-mounted antenna is a low figure, about head height,
|
|
15
|
+
* because the site is wherever that radio is operating.
|
|
10
16
|
*/
|
|
11
17
|
export interface StationAntenna {
|
|
12
18
|
id: string;
|
|
13
|
-
|
|
19
|
+
/** Site where this antenna is installed. Absent when `radioId` is set. */
|
|
20
|
+
stationId?: string;
|
|
21
|
+
/** Saved radio this antenna is mounted on. Absent when `stationId` is set. */
|
|
22
|
+
radioId?: string;
|
|
14
23
|
nickname: string;
|
|
24
|
+
/** Free-text maker, such as Nagoya. Omitted when blank. Not a manufacturer catalog. */
|
|
25
|
+
manufacturer?: string;
|
|
26
|
+
/** Free-text model, such as NA-771. Omitted when blank. */
|
|
27
|
+
model?: string;
|
|
15
28
|
typeId: AntennaTypeId;
|
|
16
29
|
heightAglM: number;
|
|
17
30
|
/** True heading of maximum radiation, 0–359. Omitted for omni types. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antenna.d.ts","sourceRoot":"","sources":["../../src/station/antenna.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"antenna.d.ts","sourceRoot":"","sources":["../../src/station/antenna.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"ts-brand": "^0.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commitlint/cli": "21.2.
|
|
35
|
-
"@commitlint/config-conventional": "21.2.
|
|
34
|
+
"@commitlint/cli": "21.2.3",
|
|
35
|
+
"@commitlint/config-conventional": "21.2.3",
|
|
36
36
|
"@semantic-release/changelog": "7.0.0",
|
|
37
37
|
"@semantic-release/git": "11.0.1",
|
|
38
38
|
"@semantic-release/github": "12.0.9",
|
|
39
39
|
"@semantic-release/npm": "13.1.5",
|
|
40
40
|
"husky": "9.1.7",
|
|
41
|
-
"oxfmt": "^0.
|
|
42
|
-
"oxlint": "1.
|
|
41
|
+
"oxfmt": "^0.68.0",
|
|
42
|
+
"oxlint": "1.83.0",
|
|
43
43
|
"semantic-release": "25.0.9",
|
|
44
44
|
"typescript": "7.0.2",
|
|
45
45
|
"vite": "^8.3.0",
|
package/src/radio/protocol.ts
CHANGED
|
@@ -80,6 +80,11 @@ export interface RadioExchange {
|
|
|
80
80
|
* Optional `ack` is a second exchange after each chunk (for example an ACK).
|
|
81
81
|
* Optional `delay` is milliseconds to wait after each accepted chunk (Kenwood
|
|
82
82
|
* TM-D710A clone at 57600 needs this so the next `R` does not outrun the radio).
|
|
83
|
+
* Optional `ready` is a byte prefixed to the next chunk when `ack.expect` times out.
|
|
84
|
+
* UV-5R firmware that replies `06` to the host ACK stays on the plain frame.
|
|
85
|
+
* Firmware that stays silent prefixes the next `X` block with `06`. A short
|
|
86
|
+
* `ack.timeout` (50ms) turns that silence into a timeout before the radio
|
|
87
|
+
* answers `FE`.
|
|
83
88
|
*/
|
|
84
89
|
export interface RadioReadStep {
|
|
85
90
|
description?: string;
|
|
@@ -90,6 +95,7 @@ export interface RadioReadStep {
|
|
|
90
95
|
ack?: RadioExchange;
|
|
91
96
|
timeout?: number;
|
|
92
97
|
delay?: number;
|
|
98
|
+
ready?: RadioByteToken;
|
|
93
99
|
};
|
|
94
100
|
}
|
|
95
101
|
|
package/src/station/antenna.ts
CHANGED
|
@@ -5,15 +5,28 @@ export const MIN_ANTENNA_HEIGHT_AGL_M = 0.5;
|
|
|
5
5
|
export const MAX_ANTENNA_HEIGHT_AGL_M = 120;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* One physical antenna
|
|
8
|
+
* One physical antenna owned by one station or one radio.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* A station antenna is installed at a site (`stationId`). A radio antenna is
|
|
11
|
+
* mounted on a saved radio (`radioId`) and moves with it, such as a handheld
|
|
12
|
+
* whip. Exactly one of `stationId` and `radioId` is set. The same radiator
|
|
13
|
+
* on two owners is two records. `bands` are ham {@link SpectrumBand.wavelength}
|
|
14
|
+
* values, not a second band catalog.
|
|
15
|
+
*
|
|
16
|
+
* Height for a radio-mounted antenna is a low figure, about head height,
|
|
17
|
+
* because the site is wherever that radio is operating.
|
|
12
18
|
*/
|
|
13
19
|
export interface StationAntenna {
|
|
14
20
|
id: string;
|
|
15
|
-
|
|
21
|
+
/** Site where this antenna is installed. Absent when `radioId` is set. */
|
|
22
|
+
stationId?: string;
|
|
23
|
+
/** Saved radio this antenna is mounted on. Absent when `stationId` is set. */
|
|
24
|
+
radioId?: string;
|
|
16
25
|
nickname: string;
|
|
26
|
+
/** Free-text maker, such as Nagoya. Omitted when blank. Not a manufacturer catalog. */
|
|
27
|
+
manufacturer?: string;
|
|
28
|
+
/** Free-text model, such as NA-771. Omitted when blank. */
|
|
29
|
+
model?: string;
|
|
17
30
|
typeId: AntennaTypeId;
|
|
18
31
|
heightAglM: number;
|
|
19
32
|
/** True heading of maximum radiation, 0–359. Omitted for omni types. */
|