@springfield/ham-radio-api 18.3.0 → 18.5.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/README.md +4 -1
- package/dist/radio/memory-map.d.ts +29 -0
- package/dist/radio/memory-map.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/radio/memory-map.ts +30 -0
package/README.md
CHANGED
|
@@ -6,7 +6,10 @@ Packages that talk to radios depend on this library. It does not open a serial p
|
|
|
6
6
|
|
|
7
7
|
Docs: [HamBench developer docs](https://springfield-ham-radio.github.io/ham-radio-docs/developer/)
|
|
8
8
|
|
|
9
|
-
Package docs:
|
|
9
|
+
Package docs:
|
|
10
|
+
|
|
11
|
+
- [radio read/write dialog messages](docs/radio-dialog-messages.md)
|
|
12
|
+
- [memory map field UI](docs/memory-map.md)
|
|
10
13
|
|
|
11
14
|
## License
|
|
12
15
|
|
|
@@ -25,6 +25,15 @@ export type RadioMemoryMapToneValue = {
|
|
|
25
25
|
code: number;
|
|
26
26
|
polarity: "N" | "R";
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Named option for a string setting.
|
|
30
|
+
* `label` is the name shown in a select. `value` is the stored characters, not an enum index.
|
|
31
|
+
* TH-D74 menu 501 stores Radio as `\Y` and RV as `/R`.
|
|
32
|
+
*/
|
|
33
|
+
export interface RadioMemoryMapStringChoice {
|
|
34
|
+
label: string;
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
28
37
|
/** How a field's raw bits/bytes become a setting value. */
|
|
29
38
|
export type RadioMemoryMapValueKind = {
|
|
30
39
|
kind: "integer";
|
|
@@ -40,6 +49,11 @@ export type RadioMemoryMapValueKind = {
|
|
|
40
49
|
length: number;
|
|
41
50
|
/** Fill byte for unused character slots (default 0xFF). Kenwood names use 0. */
|
|
42
51
|
pad?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Named options for a select. Omit for free text.
|
|
54
|
+
* EEPROM layout is unchanged. An unknown stored string stays that string.
|
|
55
|
+
*/
|
|
56
|
+
choices?: RadioMemoryMapStringChoice[];
|
|
43
57
|
} | {
|
|
44
58
|
kind: "digits";
|
|
45
59
|
/** Number of decimal digit bytes. */
|
|
@@ -55,6 +69,11 @@ export type RadioMemoryMapValueKind = {
|
|
|
55
69
|
length: number;
|
|
56
70
|
/** Character set indexed by byte value; 0xFF terminates. */
|
|
57
71
|
charset?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Named options for a select. Omit for free text.
|
|
74
|
+
* `value` is the stored DTMF string. EEPROM layout is unchanged.
|
|
75
|
+
*/
|
|
76
|
+
choices?: RadioMemoryMapStringChoice[];
|
|
58
77
|
} | {
|
|
59
78
|
kind: "bbcd";
|
|
60
79
|
/** Number of packed BCD bytes (Chirp bbcd). */
|
|
@@ -143,6 +162,16 @@ export interface RadioMemoryMapFieldUi {
|
|
|
143
162
|
description?: string;
|
|
144
163
|
/** Front-panel menu reference. Omitted when the setting is not a numbered menu item. */
|
|
145
164
|
menu?: RadioMemoryMapFieldMenu;
|
|
165
|
+
/**
|
|
166
|
+
* Radio menu group name (e.g. "Display") that UIs use to group radio-wide settings.
|
|
167
|
+
* Menu numbers are not shown.
|
|
168
|
+
*/
|
|
169
|
+
section?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Order of section groups. Lower values come first (e.g. the radio menu's hundreds digit).
|
|
172
|
+
* EEPROM layout is unchanged.
|
|
173
|
+
*/
|
|
174
|
+
sectionOrder?: number;
|
|
146
175
|
/** Defaults to true. Set false for firmware / read-only messages. */
|
|
147
176
|
writable?: boolean;
|
|
148
177
|
/** Optional display rank in the settings panel. Lower values come first. EEPROM layout is unchanged. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-map.d.ts","sourceRoot":"","sources":["../../src/radio/memory-map.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,I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AAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC/B,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,2EAA2E;IAC3E,eAAe,CAAC,EAAE,6BAA6B,CAAC;CACjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-api",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.5.0",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"ts-brand": "^0.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@commitlint/cli": "21.2.
|
|
36
|
-
"@commitlint/config-conventional": "21.2.
|
|
35
|
+
"@commitlint/cli": "21.2.4",
|
|
36
|
+
"@commitlint/config-conventional": "21.2.4",
|
|
37
37
|
"@semantic-release/changelog": "7.0.0",
|
|
38
38
|
"@semantic-release/git": "11.0.1",
|
|
39
39
|
"@semantic-release/github": "12.0.10",
|
|
40
40
|
"@semantic-release/npm": "13.2.0",
|
|
41
41
|
"husky": "9.1.7",
|
|
42
|
-
"oxfmt": "^0.
|
|
43
|
-
"oxlint": "1.
|
|
42
|
+
"oxfmt": "^0.74.0",
|
|
43
|
+
"oxlint": "1.89.0",
|
|
44
44
|
"semantic-release": "25.0.9",
|
|
45
45
|
"typescript": "7.0.2",
|
|
46
|
-
"vite": "^8.3.
|
|
46
|
+
"vite": "^8.3.5",
|
|
47
47
|
"vitest": "^5.0.5"
|
|
48
48
|
},
|
|
49
49
|
"resolutions": {
|
package/src/radio/memory-map.ts
CHANGED
|
@@ -22,6 +22,16 @@ export type RadioMemoryMapToneValue =
|
|
|
22
22
|
| { mode: "ctcss"; value: number }
|
|
23
23
|
| { mode: "dcs"; code: number; polarity: "N" | "R" };
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Named option for a string setting.
|
|
27
|
+
* `label` is the name shown in a select. `value` is the stored characters, not an enum index.
|
|
28
|
+
* TH-D74 menu 501 stores Radio as `\Y` and RV as `/R`.
|
|
29
|
+
*/
|
|
30
|
+
export interface RadioMemoryMapStringChoice {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
/** How a field's raw bits/bytes become a setting value. */
|
|
26
36
|
export type RadioMemoryMapValueKind =
|
|
27
37
|
| { kind: "integer"; min?: number; max?: number }
|
|
@@ -32,6 +42,11 @@ export type RadioMemoryMapValueKind =
|
|
|
32
42
|
length: number;
|
|
33
43
|
/** Fill byte for unused character slots (default 0xFF). Kenwood names use 0. */
|
|
34
44
|
pad?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Named options for a select. Omit for free text.
|
|
47
|
+
* EEPROM layout is unchanged. An unknown stored string stays that string.
|
|
48
|
+
*/
|
|
49
|
+
choices?: RadioMemoryMapStringChoice[];
|
|
35
50
|
}
|
|
36
51
|
| {
|
|
37
52
|
kind: "digits";
|
|
@@ -49,6 +64,11 @@ export type RadioMemoryMapValueKind =
|
|
|
49
64
|
length: number;
|
|
50
65
|
/** Character set indexed by byte value; 0xFF terminates. */
|
|
51
66
|
charset?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Named options for a select. Omit for free text.
|
|
69
|
+
* `value` is the stored DTMF string. EEPROM layout is unchanged.
|
|
70
|
+
*/
|
|
71
|
+
choices?: RadioMemoryMapStringChoice[];
|
|
52
72
|
}
|
|
53
73
|
| {
|
|
54
74
|
kind: "bbcd";
|
|
@@ -147,6 +167,16 @@ export interface RadioMemoryMapFieldUi {
|
|
|
147
167
|
description?: string;
|
|
148
168
|
/** Front-panel menu reference. Omitted when the setting is not a numbered menu item. */
|
|
149
169
|
menu?: RadioMemoryMapFieldMenu;
|
|
170
|
+
/**
|
|
171
|
+
* Radio menu group name (e.g. "Display") that UIs use to group radio-wide settings.
|
|
172
|
+
* Menu numbers are not shown.
|
|
173
|
+
*/
|
|
174
|
+
section?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Order of section groups. Lower values come first (e.g. the radio menu's hundreds digit).
|
|
177
|
+
* EEPROM layout is unchanged.
|
|
178
|
+
*/
|
|
179
|
+
sectionOrder?: number;
|
|
150
180
|
/** Defaults to true. Set false for firmware / read-only messages. */
|
|
151
181
|
writable?: boolean;
|
|
152
182
|
/** Optional display rank in the settings panel. Lower values come first. EEPROM layout is unchanged. */
|