fossekall-interface 0.1.15 → 0.1.17
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/constants.d.ts +8 -0
- package/dist/constants.js +10 -0
- package/dist/{ecu → generated/ecu}/index.d.ts +0 -1
- package/dist/{ecu → generated/ecu}/index.js +0 -1
- package/dist/{fc → generated/fc}/index.d.ts +0 -1
- package/dist/{fc → generated/fc}/index.js +0 -1
- package/dist/generated/fc/telemetry.d.ts +79 -0
- package/dist/{fc → generated/fc}/telemetry.js +35 -3
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/index.js +2 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +2 -6
- package/dist/types.d.ts +4 -4
- package/dist/types.js +1 -0
- package/package.json +1 -1
- package/dist/ecu/constants.d.ts +0 -2
- package/dist/ecu/constants.js +0 -2
- package/dist/fc/constants.d.ts +0 -1
- package/dist/fc/constants.js +0 -1
- package/dist/fc/telemetry.d.ts +0 -3
- /package/dist/{ecu → generated/ecu}/commands.d.ts +0 -0
- /package/dist/{ecu → generated/ecu}/commands.js +0 -0
- /package/dist/{ecu → generated/ecu}/telemetry.d.ts +0 -0
- /package/dist/{ecu → generated/ecu}/telemetry.js +0 -0
- /package/dist/{fc → generated/fc}/commands.d.ts +0 -0
- /package/dist/{fc → generated/fc}/commands.js +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import bin, { MaxValue, Schema, type IMeasurer, type ISerialInput, type ISerialOutput } from 'typed-binary';
|
|
2
|
+
declare class Float64Schema extends Schema<number> {
|
|
3
|
+
readonly maxSize = 8;
|
|
4
|
+
read(input: ISerialInput): number;
|
|
5
|
+
write(output: ISerialOutput, value: number): void;
|
|
6
|
+
measure(_: number | typeof MaxValue, measurer?: IMeasurer): IMeasurer;
|
|
7
|
+
}
|
|
8
|
+
export declare const AccelerationData: import("typed-binary").ObjectSchema<{
|
|
9
|
+
valid: import("typed-binary").BoolSchema;
|
|
10
|
+
acc_x: import("typed-binary").Float32Schema;
|
|
11
|
+
acc_y: import("typed-binary").Float32Schema;
|
|
12
|
+
acc_z: import("typed-binary").Float32Schema;
|
|
13
|
+
}>;
|
|
14
|
+
export type AccelerationData = bin.Parsed<typeof AccelerationData>;
|
|
15
|
+
export declare const GNSS_DATA: import("typed-binary").ObjectSchema<{
|
|
16
|
+
data_valid: import("typed-binary").BoolSchema;
|
|
17
|
+
lat: Float64Schema;
|
|
18
|
+
lon: Float64Schema;
|
|
19
|
+
hMSL: Float64Schema;
|
|
20
|
+
gSpeed: Float64Schema;
|
|
21
|
+
headMot: Float64Schema;
|
|
22
|
+
numSV: import("typed-binary").ByteSchema;
|
|
23
|
+
}>;
|
|
24
|
+
export type GNSS_DATA = bin.Parsed<typeof GNSS_DATA>;
|
|
25
|
+
export declare const SensorData: import("typed-binary").ObjectSchema<{
|
|
26
|
+
iim_acc_data: import("typed-binary").ObjectSchema<{
|
|
27
|
+
valid: import("typed-binary").BoolSchema;
|
|
28
|
+
acc_x: import("typed-binary").Float32Schema;
|
|
29
|
+
acc_y: import("typed-binary").Float32Schema;
|
|
30
|
+
acc_z: import("typed-binary").Float32Schema;
|
|
31
|
+
}>;
|
|
32
|
+
gnss_data: import("typed-binary").ObjectSchema<{
|
|
33
|
+
data_valid: import("typed-binary").BoolSchema;
|
|
34
|
+
lat: Float64Schema;
|
|
35
|
+
lon: Float64Schema;
|
|
36
|
+
hMSL: Float64Schema;
|
|
37
|
+
gSpeed: Float64Schema;
|
|
38
|
+
headMot: Float64Schema;
|
|
39
|
+
numSV: import("typed-binary").ByteSchema;
|
|
40
|
+
}>;
|
|
41
|
+
}>;
|
|
42
|
+
export type SensorData = bin.Parsed<typeof SensorData>;
|
|
43
|
+
export declare const spec: {
|
|
44
|
+
AccelerationData: {
|
|
45
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
46
|
+
valid: import("typed-binary").BoolSchema;
|
|
47
|
+
acc_x: import("typed-binary").Float32Schema;
|
|
48
|
+
acc_y: import("typed-binary").Float32Schema;
|
|
49
|
+
acc_z: import("typed-binary").Float32Schema;
|
|
50
|
+
}>;
|
|
51
|
+
enums: {};
|
|
52
|
+
};
|
|
53
|
+
SensorData: {
|
|
54
|
+
port: number;
|
|
55
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
56
|
+
iim_acc_data: import("typed-binary").ObjectSchema<{
|
|
57
|
+
valid: import("typed-binary").BoolSchema;
|
|
58
|
+
acc_x: import("typed-binary").Float32Schema;
|
|
59
|
+
acc_y: import("typed-binary").Float32Schema;
|
|
60
|
+
acc_z: import("typed-binary").Float32Schema;
|
|
61
|
+
}>;
|
|
62
|
+
gnss_data: import("typed-binary").ObjectSchema<{
|
|
63
|
+
data_valid: import("typed-binary").BoolSchema;
|
|
64
|
+
lat: Float64Schema;
|
|
65
|
+
lon: Float64Schema;
|
|
66
|
+
hMSL: Float64Schema;
|
|
67
|
+
gSpeed: Float64Schema;
|
|
68
|
+
headMot: Float64Schema;
|
|
69
|
+
numSV: import("typed-binary").ByteSchema;
|
|
70
|
+
}>;
|
|
71
|
+
}>;
|
|
72
|
+
enums: {
|
|
73
|
+
iim_acc_data: {};
|
|
74
|
+
gnss_data: {};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export default spec;
|
|
79
|
+
export type Spec = typeof spec;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Measurer, Schema } from 'typed-binary';
|
|
2
|
-
// This file was generated by FRICC on 2026-03-19
|
|
1
|
+
import bin, { Measurer, Schema } from 'typed-binary';
|
|
2
|
+
// This file was generated by FRICC on 2026-03-19 14:23:40. Do not edit manually!
|
|
3
3
|
// The current version of typed-binary does not support 64-bit primitives.
|
|
4
4
|
// So for we'll implement our own schemas. :)
|
|
5
5
|
const __littleEndian = true;
|
|
@@ -60,5 +60,37 @@ class Float64Schema extends Schema {
|
|
|
60
60
|
const u64 = new UInt64Schema();
|
|
61
61
|
const i64 = new Int64Schema();
|
|
62
62
|
const f64 = new Float64Schema();
|
|
63
|
-
export const
|
|
63
|
+
export const AccelerationData = bin.object({
|
|
64
|
+
valid: bin.bool, // bool
|
|
65
|
+
acc_x: bin.f32, // float
|
|
66
|
+
acc_y: bin.f32, // float
|
|
67
|
+
acc_z: bin.f32, // float
|
|
68
|
+
});
|
|
69
|
+
export const GNSS_DATA = bin.object({
|
|
70
|
+
data_valid: bin.bool, // bool
|
|
71
|
+
lat: f64, // double
|
|
72
|
+
lon: f64, // double
|
|
73
|
+
hMSL: f64, // double
|
|
74
|
+
gSpeed: f64, // double
|
|
75
|
+
headMot: f64, // double
|
|
76
|
+
numSV: bin.u8, // unsigned char
|
|
77
|
+
});
|
|
78
|
+
export const SensorData = bin.object({
|
|
79
|
+
iim_acc_data: AccelerationData, // AccelerationData
|
|
80
|
+
gnss_data: GNSS_DATA, // GNSS_DATA
|
|
81
|
+
});
|
|
82
|
+
export const spec = {
|
|
83
|
+
AccelerationData: {
|
|
84
|
+
schema: AccelerationData,
|
|
85
|
+
enums: {},
|
|
86
|
+
},
|
|
87
|
+
SensorData: {
|
|
88
|
+
port: 3001,
|
|
89
|
+
schema: SensorData,
|
|
90
|
+
enums: {
|
|
91
|
+
iim_acc_data: {},
|
|
92
|
+
gnss_data: {},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
64
96
|
export default spec;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AnyObjectSchema } from 'typed-binary';
|
|
2
|
-
import * as
|
|
2
|
+
import * as mcu from './generated';
|
|
3
3
|
type EnumTree = {
|
|
4
4
|
[key: string]: number | EnumTree;
|
|
5
5
|
};
|
|
6
6
|
type Widen<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends AnyObjectSchema ? AnyObjectSchema : T extends EnumTree ? EnumTree : {
|
|
7
7
|
[K in keyof T]: Widen<T[K]>;
|
|
8
8
|
};
|
|
9
|
-
type MergeAll<T extends
|
|
9
|
+
type MergeAll<T extends object> = {
|
|
10
10
|
[K in keyof T[keyof T]]: T[keyof T][K & keyof T[keyof T]];
|
|
11
11
|
};
|
|
12
|
-
export type TelemetrySpec = MergeAll<Widen<ecu.telemetry.Spec>>;
|
|
13
|
-
export type CommandSpec = MergeAll<Widen<ecu.commands.Spec>>;
|
|
12
|
+
export type TelemetrySpec = MergeAll<Widen<mcu.ecu.telemetry.Spec>>;
|
|
13
|
+
export type CommandSpec = MergeAll<Widen<mcu.ecu.commands.Spec>>;
|
|
14
14
|
export {};
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
package/dist/ecu/constants.d.ts
DELETED
package/dist/ecu/constants.js
DELETED
package/dist/fc/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ip = "10.19.0.110";
|
package/dist/fc/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const ip = "10.19.0.110";
|
package/dist/fc/telemetry.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|