fossekall-interface 0.1.123 → 0.1.125
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/generated/ecu/commands.d.ts +289 -120
- package/dist/generated/ecu/commands.js +114 -63
- package/dist/generated/ecu/commands.json +569 -0
- package/dist/generated/ecu/index.d.ts +2 -0
- package/dist/generated/ecu/index.js +2 -0
- package/dist/generated/ecu/telemetry.d.ts +640 -211
- package/dist/generated/ecu/telemetry.js +284 -95
- package/dist/generated/ecu/telemetry.json +913 -0
- package/dist/generated/fc/telemetry.d.ts +15 -40
- package/dist/generated/fc/telemetry.js +12 -20
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import bin, { Measurer, Schema } from 'typed-binary';
|
|
2
|
-
// This file was generated by FRICC on 2026-
|
|
2
|
+
// This file was generated by FRICC on 2026-06-10 10:38:25. 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,6 +60,65 @@ 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 node_bldc_Id = {
|
|
64
|
+
Fuel: 0,
|
|
65
|
+
Ox: 1,
|
|
66
|
+
Count: 2,
|
|
67
|
+
};
|
|
68
|
+
export const StateId = {
|
|
69
|
+
Safe: 0,
|
|
70
|
+
N2Fill: 1,
|
|
71
|
+
PostN2Fill: 2,
|
|
72
|
+
OxFill: 3,
|
|
73
|
+
PostOxFill: 4,
|
|
74
|
+
QDDisconnect: 5,
|
|
75
|
+
Pressurized: 6,
|
|
76
|
+
Armed: 7,
|
|
77
|
+
Burn: 8,
|
|
78
|
+
Shutdown: 9,
|
|
79
|
+
PostShutdown: 10,
|
|
80
|
+
Purge: 11,
|
|
81
|
+
Hold: 12,
|
|
82
|
+
};
|
|
83
|
+
export const Event = {
|
|
84
|
+
Boot: 0,
|
|
85
|
+
NextState: 1,
|
|
86
|
+
PreviousState: 2,
|
|
87
|
+
Timeout: 3,
|
|
88
|
+
CalibrateRequest: 4,
|
|
89
|
+
BurnwireCut: 5,
|
|
90
|
+
Abort: 6,
|
|
91
|
+
None: 7,
|
|
92
|
+
Count: 8,
|
|
93
|
+
};
|
|
94
|
+
export const fsm_AbortReason = {
|
|
95
|
+
None: 0,
|
|
96
|
+
Manual: 1,
|
|
97
|
+
FuelTankOverpressure: 2,
|
|
98
|
+
OxTankOverpressure: 3,
|
|
99
|
+
ChamberUnderpressure: 4,
|
|
100
|
+
};
|
|
101
|
+
export const node_pressure_sensor_Id = {
|
|
102
|
+
N2Tank: 0,
|
|
103
|
+
OxTank: 1,
|
|
104
|
+
OxInjector: 2,
|
|
105
|
+
FuelTank: 3,
|
|
106
|
+
FuelInjector: 4,
|
|
107
|
+
FuelInlet: 5,
|
|
108
|
+
Chamber: 6,
|
|
109
|
+
OxSupply: 7,
|
|
110
|
+
N2_300: 8,
|
|
111
|
+
Count: 9,
|
|
112
|
+
};
|
|
113
|
+
export const node_servo_Id = {
|
|
114
|
+
MainFuel: 0,
|
|
115
|
+
MainOx: 1,
|
|
116
|
+
OxFill: 2,
|
|
117
|
+
OxBoiloff: 3,
|
|
118
|
+
OxSupply: 4,
|
|
119
|
+
Purge: 5,
|
|
120
|
+
Count: 6,
|
|
121
|
+
};
|
|
63
122
|
export const actuators_servo_ServoMode = {
|
|
64
123
|
kUnknown: 0,
|
|
65
124
|
kPosition: 1,
|
|
@@ -71,6 +130,17 @@ export const actuators_servo_PowerState = {
|
|
|
71
130
|
kBooting: 2,
|
|
72
131
|
kOn: 3,
|
|
73
132
|
};
|
|
133
|
+
export const node_solenoid_Id = {
|
|
134
|
+
FuelVent: 0,
|
|
135
|
+
OxVent: 1,
|
|
136
|
+
N2Fill: 2,
|
|
137
|
+
OxHoseBleed: 3,
|
|
138
|
+
N2_300_Supply: 4,
|
|
139
|
+
N2_300_Hose_Bleed: 5,
|
|
140
|
+
QD_1: 6,
|
|
141
|
+
QD_2: 7,
|
|
142
|
+
Count: 8,
|
|
143
|
+
};
|
|
74
144
|
export const actuators_solenoid_PowerState = {
|
|
75
145
|
kUnknown: 0,
|
|
76
146
|
kOff: 1,
|
|
@@ -81,73 +151,99 @@ export const actuators_solenoid_Opening = {
|
|
|
81
151
|
kClosed: 1,
|
|
82
152
|
kOpen: 2,
|
|
83
153
|
};
|
|
84
|
-
export const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
PostN2Fill: 2,
|
|
88
|
-
OxFill: 3,
|
|
89
|
-
PostOxFill: 4,
|
|
90
|
-
Prechill: 5,
|
|
91
|
-
PostPrechill: 6,
|
|
92
|
-
QDDisconnect: 7,
|
|
93
|
-
Pressurized: 8,
|
|
94
|
-
Armed: 9,
|
|
95
|
-
Burn: 10,
|
|
96
|
-
Shutdown: 11,
|
|
97
|
-
PostShutdown: 12,
|
|
98
|
-
Calibrate: 13,
|
|
154
|
+
export const node_regulator_Id = {
|
|
155
|
+
OxBoiloff: 0,
|
|
156
|
+
Count: 1,
|
|
99
157
|
};
|
|
100
|
-
export const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
158
|
+
export const proto_can_thermocouple_Id = {
|
|
159
|
+
OxTankBottom: 0,
|
|
160
|
+
OxTankTop: 1,
|
|
161
|
+
FuelTank: 2,
|
|
162
|
+
OxInjector: 3,
|
|
163
|
+
Chamber1: 4,
|
|
164
|
+
FuelInjector: 5,
|
|
165
|
+
Chamber2: 6,
|
|
166
|
+
ExtraNodeOne: 7,
|
|
109
167
|
Count: 8,
|
|
110
168
|
};
|
|
111
|
-
export const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
169
|
+
export const node_load_cell_Id = {
|
|
170
|
+
LoadCell1: 0,
|
|
171
|
+
LoadCell2: 1,
|
|
172
|
+
LoadCell3: 2,
|
|
173
|
+
Count: 3,
|
|
116
174
|
};
|
|
117
|
-
export const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
measured_angle_deg: bin.f32, // float
|
|
121
|
-
current_ma: bin.f32, // float
|
|
122
|
-
mode: bin.u8, // actuators::servo::ServoMode
|
|
123
|
-
power_state: bin.u8, // actuators::servo::PowerState
|
|
175
|
+
export const HeartBeatTelemetry = bin.object({
|
|
176
|
+
message: bin.arrayOf(bin.i8, 16), // char[16]
|
|
177
|
+
status_flags: bin.u8, // unsigned char
|
|
124
178
|
});
|
|
125
|
-
export const
|
|
179
|
+
export const actuators_bldc_BldcTelemetry = bin.object({
|
|
126
180
|
valve_position: bin.f32, // float
|
|
127
181
|
motor_position: bin.f32, // float
|
|
128
|
-
timestamp: u64, // unsigned long long
|
|
129
182
|
current_draw: bin.f32, // float
|
|
130
183
|
u_p: bin.f32, // float
|
|
131
184
|
u_i: bin.f32, // float
|
|
132
185
|
u_d: bin.f32, // float
|
|
133
|
-
u_pid: bin.f32, // float
|
|
134
|
-
u_ff: bin.f32, // float
|
|
135
|
-
u_set: bin.f32, // float
|
|
136
186
|
u_total: bin.f32, // float
|
|
137
|
-
|
|
138
|
-
|
|
187
|
+
u_raw: bin.f32, // float
|
|
188
|
+
status_flags: bin.u8, // unsigned char
|
|
189
|
+
});
|
|
190
|
+
export const BldcTelemetryPacket = bin.object({
|
|
191
|
+
bldc_id: bin.u8, // node::bldc::Id
|
|
192
|
+
fsm_state: bin.u8, // StateId
|
|
193
|
+
telemetry: actuators_bldc_BldcTelemetry, // actuators::bldc::BldcTelemetry
|
|
194
|
+
});
|
|
195
|
+
export const fsm_FsmStatus = bin.object({
|
|
196
|
+
state_entry_time_ms: u64, // unsigned long long
|
|
197
|
+
state_time_ms: u64, // unsigned long long
|
|
198
|
+
current_state: bin.u8, // StateId
|
|
199
|
+
previous_state: bin.u8, // StateId
|
|
200
|
+
last_event: bin.u8, // Event
|
|
201
|
+
last_abort_reason: bin.u8, // fsm::AbortReason
|
|
202
|
+
});
|
|
203
|
+
export const FsmStatusPacket = bin.object({
|
|
204
|
+
status: fsm_FsmStatus, // fsm::FsmStatus
|
|
205
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
206
|
+
});
|
|
207
|
+
export const sensors_pressure_PressureBatch = bin.object({
|
|
208
|
+
t0_ms: bin.u32, // unsigned int
|
|
209
|
+
dt_us: bin.u16, // unsigned short
|
|
210
|
+
count: bin.u8, // unsigned char
|
|
211
|
+
seq: bin.u8, // unsigned char
|
|
212
|
+
overrun: bin.bool, // bool
|
|
213
|
+
samples: bin.arrayOf(bin.i16, 20), // short[20]
|
|
214
|
+
});
|
|
215
|
+
export const PressureSensorPacket = bin.object({
|
|
216
|
+
sensor_id: bin.u8, // node::pressure_sensor::Id
|
|
217
|
+
data: sensors_pressure_PressureBatch, // sensors::pressure::PressureBatch
|
|
218
|
+
});
|
|
219
|
+
export const actuators_servo_ServoStatus = bin.object({
|
|
220
|
+
commanded_angle_deg: bin.f32, // float
|
|
221
|
+
target_angle_deg: bin.f32, // float
|
|
222
|
+
measured_angle_deg: bin.f32, // float
|
|
223
|
+
current_ma: bin.f32, // float
|
|
224
|
+
mode: bin.u8, // actuators::servo::ServoMode
|
|
225
|
+
power_state: bin.u8, // actuators::servo::PowerState
|
|
226
|
+
});
|
|
227
|
+
export const ServoStatusPacket = bin.object({
|
|
228
|
+
servo_id: bin.u8, // node::servo::Id
|
|
229
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
230
|
+
status: actuators_servo_ServoStatus, // actuators::servo::ServoStatus
|
|
139
231
|
});
|
|
140
232
|
export const actuators_solenoid_SolenoidStatus = bin.object({
|
|
141
233
|
power_state: bin.u8, // actuators::solenoid::PowerState
|
|
142
234
|
opening: bin.u8, // actuators::solenoid::Opening
|
|
143
235
|
});
|
|
144
|
-
export const
|
|
145
|
-
|
|
236
|
+
export const SolenoidStatusPacket = bin.object({
|
|
237
|
+
solenoid_id: bin.u8, // node::solenoid::Id
|
|
238
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
239
|
+
status: actuators_solenoid_SolenoidStatus, // actuators::solenoid::SolenoidStatus
|
|
146
240
|
});
|
|
147
241
|
export const regulators_RegulatorStatus = bin.object({
|
|
148
242
|
operator_enabled: bin.bool, // bool
|
|
149
243
|
policy_enabled: bin.bool, // bool
|
|
150
244
|
active: bin.bool, // bool
|
|
245
|
+
reserved: bin.bool, // bool
|
|
246
|
+
valveSetpoint: bin.f32, // float
|
|
151
247
|
setpoint: bin.f32, // float
|
|
152
248
|
kp: bin.f32, // float
|
|
153
249
|
ki: bin.f32, // float
|
|
@@ -159,83 +255,176 @@ export const regulators_RegulatorStatus = bin.object({
|
|
|
159
255
|
last_servo_command_: bin.f32, // float
|
|
160
256
|
last_update_ms: bin.u32, // unsigned int
|
|
161
257
|
});
|
|
162
|
-
export const
|
|
163
|
-
|
|
164
|
-
|
|
258
|
+
export const RegulatorStatusPacket = bin.object({
|
|
259
|
+
regulator_id: bin.u8, // node::regulator::Id
|
|
260
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
165
261
|
status: regulators_RegulatorStatus, // regulators::RegulatorStatus
|
|
166
262
|
});
|
|
167
|
-
export const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
263
|
+
export const proto_can_thermocouple_ThermocoupleSample = bin.object({
|
|
264
|
+
id: bin.u8, // proto::can::thermocouple::Id
|
|
265
|
+
timestamp_us: u64, // unsigned long long
|
|
266
|
+
interval_us: bin.f32, // float
|
|
267
|
+
temperature_c: bin.arrayOf(bin.f32, 8), // float[8]
|
|
171
268
|
});
|
|
172
|
-
export const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
previous_state: bin.u8, // StateId
|
|
177
|
-
last_event: bin.u8, // Event
|
|
178
|
-
last_abort_reason: bin.u8, // fsm::AbortReason
|
|
269
|
+
export const ThermocouplePacket = bin.object({
|
|
270
|
+
thermocouple_id: bin.u8, // proto::can::thermocouple::Id
|
|
271
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
272
|
+
data: proto_can_thermocouple_ThermocoupleSample, // proto::can::thermocouple::ThermocoupleSample
|
|
179
273
|
});
|
|
180
|
-
export const
|
|
274
|
+
export const sensors_loadcell_LoadCellBatch = bin.object({
|
|
181
275
|
t0_ms: bin.u32, // unsigned int
|
|
182
276
|
dt_us: bin.u16, // unsigned short
|
|
183
277
|
count: bin.u8, // unsigned char
|
|
184
278
|
seq: bin.u8, // unsigned char
|
|
185
279
|
overrun: bin.bool, // bool
|
|
186
|
-
samples: bin.arrayOf(bin.i16,
|
|
280
|
+
samples: bin.arrayOf(bin.i16, 20), // short[20]
|
|
187
281
|
});
|
|
188
|
-
export const
|
|
189
|
-
|
|
190
|
-
data:
|
|
282
|
+
export const LoadCellPacket = bin.object({
|
|
283
|
+
loadcell_id: bin.u8, // node::load_cell::Id
|
|
284
|
+
data: sensors_loadcell_LoadCellBatch, // sensors::loadcell::LoadCellBatch
|
|
285
|
+
});
|
|
286
|
+
export const actuators_bldc_PidGains = bin.object({
|
|
287
|
+
p: f64, // double
|
|
288
|
+
i: f64, // double
|
|
289
|
+
d: f64, // double
|
|
290
|
+
normalization_factor: f64, // double
|
|
291
|
+
});
|
|
292
|
+
export const SigmoidParameters = bin.object({
|
|
293
|
+
a: f64, // double
|
|
294
|
+
b: f64, // double
|
|
295
|
+
});
|
|
296
|
+
export const actuators_bldc_ControllerConfig = bin.object({
|
|
297
|
+
pressurize_pid_gains: actuators_bldc_PidGains, // actuators::bldc::PidGains
|
|
298
|
+
run_pid_gains: actuators_bldc_PidGains, // actuators::bldc::PidGains
|
|
299
|
+
minimum_position: f64, // double
|
|
300
|
+
maximum_position: f64, // double
|
|
301
|
+
valve_encoder_offset: f64, // double
|
|
302
|
+
can_watchdog_timeout: u64, // unsigned long long
|
|
303
|
+
end_pressure_ref: f64, // double
|
|
304
|
+
pressurizing_time: f64, // double
|
|
305
|
+
gear_ratio: bin.f32, // float
|
|
306
|
+
max_torque: f64, // double
|
|
307
|
+
dvdt_nominal: f64, // double
|
|
308
|
+
cv_max: f64, // double
|
|
309
|
+
control_valve_curve: SigmoidParameters, // SigmoidParameters
|
|
310
|
+
main_valve_curve: SigmoidParameters, // SigmoidParameters
|
|
311
|
+
});
|
|
312
|
+
export const BldcConfigTelmetryPacket = bin.object({
|
|
313
|
+
bldc_id: bin.u8, // node::load_cell::Id
|
|
314
|
+
config: actuators_bldc_ControllerConfig, // actuators::bldc::ControllerConfig
|
|
315
|
+
});
|
|
316
|
+
export const BatteryMonitorTelemetryPacket = bin.object({
|
|
317
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
318
|
+
voltages: bin.arrayOf(bin.f32, 2), // float[2]
|
|
191
319
|
});
|
|
192
320
|
export const spec = {
|
|
193
|
-
|
|
194
|
-
port:
|
|
195
|
-
schema:
|
|
321
|
+
HeartBeatTelemetry: {
|
|
322
|
+
port: 57005,
|
|
323
|
+
schema: HeartBeatTelemetry,
|
|
324
|
+
enums: {},
|
|
325
|
+
},
|
|
326
|
+
BldcTelemetryPacket: {
|
|
327
|
+
port: 5000,
|
|
328
|
+
fragment: 'bldc_id',
|
|
329
|
+
schema: BldcTelemetryPacket,
|
|
196
330
|
enums: {
|
|
197
|
-
|
|
198
|
-
|
|
331
|
+
bldc_id: node_bldc_Id,
|
|
332
|
+
fsm_state: StateId,
|
|
333
|
+
telemetry: {},
|
|
199
334
|
},
|
|
200
335
|
},
|
|
201
|
-
|
|
202
|
-
port:
|
|
203
|
-
schema:
|
|
204
|
-
enums: {
|
|
336
|
+
FsmStatusPacket: {
|
|
337
|
+
port: 5001,
|
|
338
|
+
schema: FsmStatusPacket,
|
|
339
|
+
enums: {
|
|
340
|
+
status: {
|
|
341
|
+
current_state: StateId,
|
|
342
|
+
previous_state: StateId,
|
|
343
|
+
last_event: Event,
|
|
344
|
+
last_abort_reason: fsm_AbortReason,
|
|
345
|
+
},
|
|
346
|
+
},
|
|
205
347
|
},
|
|
206
|
-
|
|
207
|
-
port:
|
|
208
|
-
|
|
348
|
+
PressureSensorPacket: {
|
|
349
|
+
port: 5002,
|
|
350
|
+
fragment: 'sensor_id',
|
|
351
|
+
schema: PressureSensorPacket,
|
|
209
352
|
enums: {
|
|
210
|
-
|
|
211
|
-
|
|
353
|
+
sensor_id: node_pressure_sensor_Id,
|
|
354
|
+
data: {},
|
|
212
355
|
},
|
|
213
356
|
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
357
|
+
ServoStatusPacket: {
|
|
358
|
+
port: 5003,
|
|
359
|
+
fragment: 'servo_id',
|
|
360
|
+
schema: ServoStatusPacket,
|
|
361
|
+
enums: {
|
|
362
|
+
servo_id: node_servo_Id,
|
|
363
|
+
status: {
|
|
364
|
+
mode: actuators_servo_ServoMode,
|
|
365
|
+
power_state: actuators_servo_PowerState,
|
|
366
|
+
},
|
|
367
|
+
},
|
|
217
368
|
},
|
|
218
|
-
|
|
369
|
+
SolenoidStatusPacket: {
|
|
370
|
+
port: 5004,
|
|
371
|
+
fragment: 'solenoid_id',
|
|
372
|
+
schema: SolenoidStatusPacket,
|
|
373
|
+
enums: {
|
|
374
|
+
solenoid_id: node_solenoid_Id,
|
|
375
|
+
status: {
|
|
376
|
+
power_state: actuators_solenoid_PowerState,
|
|
377
|
+
opening: actuators_solenoid_Opening,
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
RegulatorStatusPacket: {
|
|
219
382
|
port: 5005,
|
|
220
|
-
|
|
221
|
-
|
|
383
|
+
fragment: 'regulator_id',
|
|
384
|
+
schema: RegulatorStatusPacket,
|
|
385
|
+
enums: {
|
|
386
|
+
regulator_id: node_regulator_Id,
|
|
387
|
+
status: {},
|
|
388
|
+
},
|
|
222
389
|
},
|
|
223
|
-
|
|
224
|
-
port:
|
|
225
|
-
|
|
390
|
+
ThermocouplePacket: {
|
|
391
|
+
port: 5006,
|
|
392
|
+
fragment: 'thermocouple_id',
|
|
393
|
+
schema: ThermocouplePacket,
|
|
226
394
|
enums: {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
395
|
+
thermocouple_id: proto_can_thermocouple_Id,
|
|
396
|
+
data: {
|
|
397
|
+
id: proto_can_thermocouple_Id,
|
|
398
|
+
},
|
|
231
399
|
},
|
|
232
400
|
},
|
|
233
|
-
|
|
234
|
-
port:
|
|
235
|
-
|
|
401
|
+
LoadCellPacket: {
|
|
402
|
+
port: 5007,
|
|
403
|
+
fragment: 'loadcell_id',
|
|
404
|
+
schema: LoadCellPacket,
|
|
236
405
|
enums: {
|
|
406
|
+
loadcell_id: node_load_cell_Id,
|
|
237
407
|
data: {},
|
|
238
408
|
},
|
|
239
409
|
},
|
|
410
|
+
BldcConfigTelmetryPacket: {
|
|
411
|
+
port: 5008,
|
|
412
|
+
fragment: 'bldc_id',
|
|
413
|
+
schema: BldcConfigTelmetryPacket,
|
|
414
|
+
enums: {
|
|
415
|
+
bldc_id: node_load_cell_Id,
|
|
416
|
+
config: {
|
|
417
|
+
pressurize_pid_gains: {},
|
|
418
|
+
run_pid_gains: {},
|
|
419
|
+
control_valve_curve: {},
|
|
420
|
+
main_valve_curve: {},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
BatteryMonitorTelemetryPacket: {
|
|
425
|
+
port: 5009,
|
|
426
|
+
schema: BatteryMonitorTelemetryPacket,
|
|
427
|
+
enums: {},
|
|
428
|
+
},
|
|
240
429
|
};
|
|
241
430
|
export default spec;
|