mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-12 03:03:51 +08:00
3e7240516e
* sp flags * pass CP_SP to card and car interfaces * CP_SP in radar interface * bump opendbc * use dataclass like old times * bump opendbc * write to params for controls * fix test models * fix * need to use copy instead * fix data type * add service * more * fix * Revert "fix" This reverts commit 74723d7fb277907e174c021af14ecbcdb54f1586. * Revert "fix data type" This reverts commit 02355f44df2e9fca06d565b2e30641ff8d62f1a3. * missed * more * no more lagging * Reapply "fix data type" This reverts commit dbf1b8583fe1843db91c6fb5c96cf1fb3be5ef79. * Reapply "fix" This reverts commit 9cbce9968a6bf245087681d5061a39db90873226. * Revert "Reapply "fix"" This reverts commit 1871919b633c6f94627b2574299740c6c3f6738e. * Revert "Reapply "fix data type"" This reverts commit 5e95752fd5e7d754acdaa83855ec8868ece290f2. * no longer * Revert "no longer" This reverts commit 66ee1ba1513b43b0b07d8344e0dfb13752f6872d. * Reapply "Reapply "fix data type"" This reverts commit 670a3843338490fa7fbf23bbe7bf47c261ded9c8. * Reapply "Reapply "fix"" This reverts commit 42f09f955c84391d01866f3d48717382547f8b85. * only for car params sp * rename * fix more test * no need for process replay * pass stock car params to sp set car params * pass stock car params to sp set car params * deprecate CarParams.sunnypilotFlags to CarParamsSP.flags * missed arg * fix tests * tests fixed * need to pass this too * must generate cp_sp! * fix typing * must be initialized prior can comm callback! * no more cancer (@devtekve) * remove more cancer * Refactor `get_non_essential_params_sp` to simplify arguments (#612) * Refactor 'get_non_essential_params_sp' function calls in tests In both `test_latcontrol.py` and `process_replay.py`, simplified the function calls to 'get_non_essential_params_sp'. Removed an unnecessary call to 'get_non_essential_params'. This change makes the code cleaner and more efficient by reducing redundancy in the function calls. This modification also ensures consistency across different code files. * Refactor get_non_essential_params_sp to take car_params. Simplify parameters by modifying `get_non_essential_params_sp` to use `car_params` as input. Adjust related calls in test files and process replay to match the updated method signature. This improves code clarity and reduces redundancy. * bump opendbc * Refactor parameter handling for `get_params_sp`. Removed unnecessary reassignment of `car_params` in calls to `get_params_sp`, ensuring a cleaner and more streamlined code structure. This change improves code clarity and eliminates redundant operations. All relevant assertions and behavior remain unaffected. * bumping opedbc * bump opendbc --------- Co-authored-by: DevTekVE <devtekve@gmail.com>
184 lines
3.7 KiB
Cap'n Proto
184 lines
3.7 KiB
Cap'n Proto
using Cxx = import "./include/c++.capnp";
|
|
$Cxx.namespace("cereal");
|
|
|
|
@0xb526ba661d550a59;
|
|
|
|
# custom.capnp: a home for empty structs reserved for custom forks
|
|
# These structs are guaranteed to remain reserved and empty in mainline
|
|
# cereal, so use these if you want custom events in your fork.
|
|
|
|
# DO rename the structs
|
|
# DON'T change the identifier (e.g. @0x81c2f05a394cf4af)
|
|
|
|
struct SelfdriveStateSP @0x81c2f05a394cf4af {
|
|
mads @0 :ModularAssistiveDrivingSystem;
|
|
|
|
struct ModularAssistiveDrivingSystem {
|
|
state @0 :ModularAssistiveDrivingSystemState;
|
|
enabled @1 :Bool;
|
|
active @2 :Bool;
|
|
available @3 :Bool;
|
|
|
|
enum ModularAssistiveDrivingSystemState {
|
|
disabled @0;
|
|
paused @1;
|
|
enabled @2;
|
|
softDisabling @3;
|
|
overriding @4;
|
|
}
|
|
}
|
|
}
|
|
|
|
struct ModelManagerSP @0xaedffd8f31e7b55d {
|
|
activeBundle @0 :ModelBundle;
|
|
selectedBundle @1 :ModelBundle;
|
|
availableBundles @2 :List(ModelBundle);
|
|
|
|
struct DownloadUri {
|
|
uri @0 :Text;
|
|
sha256 @1 :Text;
|
|
}
|
|
|
|
enum Type {
|
|
drive @0;
|
|
navigation @1;
|
|
metadata @2;
|
|
}
|
|
|
|
struct Model {
|
|
fullName @0 :Text;
|
|
fileName @1 :Text;
|
|
downloadUri @2 :DownloadUri;
|
|
downloadProgress @3 :DownloadProgress;
|
|
type @4 :Type;
|
|
}
|
|
|
|
enum DownloadStatus {
|
|
notDownloading @0;
|
|
downloading @1;
|
|
downloaded @2;
|
|
cached @3;
|
|
failed @4;
|
|
}
|
|
|
|
struct DownloadProgress {
|
|
status @0 :DownloadStatus;
|
|
progress @1 :Float32;
|
|
eta @2 :UInt32;
|
|
}
|
|
|
|
enum Runner {
|
|
snpe @0;
|
|
tinygrad @1;
|
|
}
|
|
|
|
struct ModelBundle {
|
|
index @0 :UInt32;
|
|
internalName @1 :Text;
|
|
displayName @2 :Text;
|
|
models @3 :List(Model);
|
|
status @4 :DownloadStatus;
|
|
generation @5 :UInt32;
|
|
environment @6 :Text;
|
|
runner @7 :Runner;
|
|
}
|
|
}
|
|
|
|
struct LongitudinalPlanSP @0xf35cc4560bbf6ec2 {
|
|
dec @0 :DynamicExperimentalControl;
|
|
|
|
struct DynamicExperimentalControl {
|
|
state @0 :DynamicExperimentalControlState;
|
|
enabled @1 :Bool;
|
|
active @2 :Bool;
|
|
|
|
enum DynamicExperimentalControlState {
|
|
acc @0;
|
|
blended @1;
|
|
}
|
|
}
|
|
}
|
|
|
|
struct OnroadEventSP @0xda96579883444c35 {
|
|
name @0 :EventName;
|
|
|
|
# event types
|
|
enable @1 :Bool;
|
|
noEntry @2 :Bool;
|
|
warning @3 :Bool; # alerts presented only when enabled or soft disabling
|
|
userDisable @4 :Bool;
|
|
softDisable @5 :Bool;
|
|
immediateDisable @6 :Bool;
|
|
preEnable @7 :Bool;
|
|
permanent @8 :Bool; # alerts presented regardless of openpilot state
|
|
overrideLateral @10 :Bool;
|
|
overrideLongitudinal @9 :Bool;
|
|
|
|
enum EventName {
|
|
lkasEnable @0;
|
|
lkasDisable @1;
|
|
manualSteeringRequired @2;
|
|
manualLongitudinalRequired @3;
|
|
silentLkasEnable @4;
|
|
silentLkasDisable @5;
|
|
silentBrakeHold @6;
|
|
silentWrongGear @7;
|
|
silentReverseGear @8;
|
|
silentDoorOpen @9;
|
|
silentSeatbeltNotLatched @10;
|
|
silentParkBrake @11;
|
|
controlsMismatchLateral @12;
|
|
hyundaiRadarTracksConfirmed @13;
|
|
experimentalModeSwitched @14;
|
|
}
|
|
}
|
|
|
|
struct CarParamsSP @0x80ae746ee2596b11 {
|
|
flags @0 :UInt32; # flags for car specific quirks in sunnypilot
|
|
}
|
|
|
|
struct CustomReserved5 @0xa5cd762cd951a455 {
|
|
}
|
|
|
|
struct CustomReserved6 @0xf98d843bfd7004a3 {
|
|
}
|
|
|
|
struct CustomReserved7 @0xb86e6369214c01c8 {
|
|
}
|
|
|
|
struct CustomReserved8 @0xf416ec09499d9d19 {
|
|
}
|
|
|
|
struct CustomReserved9 @0xa1680744031fdb2d {
|
|
}
|
|
|
|
struct CustomReserved10 @0xcb9fd56c7057593a {
|
|
}
|
|
|
|
struct CustomReserved11 @0xc2243c65e0340384 {
|
|
}
|
|
|
|
struct CustomReserved12 @0x9ccdc8676701b412 {
|
|
}
|
|
|
|
struct CustomReserved13 @0xcd96dafb67a082d0 {
|
|
}
|
|
|
|
struct CustomReserved14 @0xb057204d7deadf3f {
|
|
}
|
|
|
|
struct CustomReserved15 @0xbd443b539493bc68 {
|
|
}
|
|
|
|
struct CustomReserved16 @0xfc6241ed8877b611 {
|
|
}
|
|
|
|
struct CustomReserved17 @0xa30662f84033036c {
|
|
}
|
|
|
|
struct CustomReserved18 @0xc86a3d38d13eb3ef {
|
|
}
|
|
|
|
struct CustomReserved19 @0xa4f1eb3323f5f582 {
|
|
}
|