-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
884 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Bug | ||
description: For any issue related to a bug | ||
title: '[Area] - Short Description' | ||
labels: [bug] | ||
body: | ||
- type: textarea | ||
id: observed-behavior | ||
attributes: | ||
label: Observed Behavior | ||
description: What happened? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected-behavior | ||
attributes: | ||
label: Expected Behavior | ||
description: What should have happened? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps-to-reproduce | ||
attributes: | ||
label: Steps to Reproduce | ||
description: How could someone reproduce this bug? | ||
value: "1. \n2. \n3. " | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots (as needed) | ||
description: Add screenshots of the bug if applicable | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Epic | ||
description: A collection of many tasks | ||
title: '[Area] - Short Description' | ||
labels: [epic] | ||
body: | ||
- type: textarea | ||
id: overview | ||
attributes: | ||
label: Overview | ||
description: Provide a brief summary of this epic | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: stakeholders | ||
attributes: | ||
label: Stakeholders | ||
description: Who to contact for this epic? | ||
value: | | ||
Product Stakeholder: | ||
Software Stakeholder: | ||
Reference Users: | ||
- type: textarea | ||
id: metrics | ||
attributes: | ||
label: Success Metrics | ||
description: What are the metrics we will use to determine if this is successful? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: rollout | ||
attributes: | ||
label: Rollout Plan | ||
description: How will this be released? All at once? In parts? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: scope | ||
attributes: | ||
label: Out of Scope | ||
description: What is not included in this epic? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: background-context | ||
attributes: | ||
label: Background / Context | ||
description: What is the context for this epic? What already exists? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: acceptance | ||
attributes: | ||
label: Acceptance Criteria | ||
description: How are we evaluating the success of this epic? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: tickets | ||
attributes: | ||
label: Tickets | ||
description: What tickets will be a part of this epic? | ||
value: " - [ ] #\n - [ ] #" | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Feature Request | ||
description: Suggest a new feature for the project | ||
title: '[Area] - Short Description' | ||
labels: [new feature] | ||
body: | ||
- type: textarea | ||
id: current-features | ||
attributes: | ||
label: Current Features | ||
description: What exists currently? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: desired-features | ||
attributes: | ||
label: Desired Additional Features | ||
description: What features do you want to add? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots (as needed) | ||
description: Add screenshots of the current or desired state if applicable | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Other | ||
description: For issues that don't fit the other categories | ||
title: '[Area] - Short Description' | ||
body: | ||
- type: textarea | ||
id: desired-changes | ||
attributes: | ||
label: Desired Changes | ||
description: What changes do you want to make? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: screenshots | ||
attributes: | ||
label: Screenshots (as needed) | ||
description: Add screenshots if applicable | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Spike | ||
description: For any research or investigation into a feature or our current architecture | ||
title: '[Area] - Short Description' | ||
labels: [spike] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: For a spike ticket, please make sure to remember to add links to the resources you are pulling information from so others who are reviewing and giving feedback can also take a look at the same information you are looking at. | ||
- type: dropdown | ||
id: spike-type | ||
attributes: | ||
label: Spike Type | ||
description: Is this spike about the product (functional) or the implementation of the product (technical)? | ||
multiple: true | ||
options: | ||
- Functional | ||
- Technical | ||
- type: textarea | ||
id: goal | ||
attributes: | ||
label: Goal | ||
description: What is this spike ticket looking into/trying to solve? Is this about enhancing something we currently do or looking into a new feature? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: purpose | ||
attributes: | ||
label: Reason for Spike | ||
description: Why is this spike ticket necessary? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: sidenotes | ||
attributes: | ||
label: Additional notes | ||
description: Add any extra comments related to the spike. | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Task | ||
description: Create a task that a developer can complete. | ||
title: '[Area] - Short Description' | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: Provide a brief summary of this issue | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: acceptance-criteria | ||
attributes: | ||
label: Acceptance Criteria | ||
description: What are the conditions that need to be satisified to complete this task? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: proposed-solution | ||
attributes: | ||
label: Proposed Solution | ||
description: How will this solution be implemented? What will be changed or added? | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Changes | ||
|
||
_Explanation of changes goes here_ | ||
|
||
## Notes | ||
|
||
_Any other notes go here_ | ||
|
||
## Test Cases | ||
|
||
- Case A | ||
- Edge case | ||
- ... | ||
|
||
## To Do | ||
|
||
_Any remaining things that need to get done_ | ||
|
||
- [ ] item 1 | ||
- [ ] ... | ||
|
||
## Checklist | ||
|
||
It can be helpful to check the `Checks` and `Files changed` tabs. | ||
Please reach out to your Project Lead if anything is unclear. | ||
Please request reviewers and ping on slack only after you've gone through this whole checklist. | ||
|
||
- [ ] No merge conflicts | ||
- [ ] All checks passing | ||
- [ ] Remove any non-applicable sections of this template | ||
- [ ] Assign the PR to yourself | ||
- [ ] Request reviewers & ping on Slack | ||
- [ ] PR is linked to the ticket (fill in the closes line below) | ||
|
||
Closes # (issue #) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Rust CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- Develop | ||
pull_request: | ||
branches: | ||
- main | ||
- Develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Rust | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install cargo-audit | ||
run: cargo install cargo-audit | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Test | ||
run: cargo test --verbose | ||
- name: Clippy | ||
run: cargo clippy --verbose -- -D warnings | ||
- name: Audit | ||
run: cargo audit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "odysseus-daemon" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
clap = { version = "4.5.20", features = ["derive", "env"] } | ||
protobuf = "3.7.1" | ||
rumqttc = "0.24.0" | ||
serde = { version = "1.0.214", features = ["derive"] } | ||
serde_json = "1.0.132" | ||
sysinfo = "0.32.0" | ||
tokio = { version = "1.41.0", features = ["full", "tracing"] } | ||
tokio-util = { version = "0.7.12", features = ["full"] } | ||
tracing = "0.1.40" | ||
tracing-subscriber = { version = "0.3.18", features = ["ansi", "env-filter"] } | ||
|
||
[build-dependencies] | ||
protobuf-codegen = "3.7.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# Odysseus-Daemon | ||
System state daemon for the Odysseus on-car telemetry OS | ||
|
||
This handles a variety of functions on the car, including security guarrantees, etc. | ||
These functions are considered modules. | ||
|
||
Core principles: | ||
- Each module should not bring down another (do not unwrap or expect, return error) | ||
- Each module should use tracing when needed | ||
- Each module should have an enable flag at a minimum, and be off by default | ||
|
||
|
||
Modules | ||
- `visual`: Camera process manager and writer. Status: Beta | ||
- `lockdown`: Feature disabler and modifier upon HV enablement. Status: Alpha | ||
- `audible`: Call feature trigger and monitor. Status: Alpha | ||
- `numerical`: Telemetry scraper and sender (tpu-telemetry python replacement). Status: Incomplete | ||
|
||
|
||
**This program will only run on Odysseus** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Prebuild script */ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=src/proto"); | ||
|
||
protobuf_codegen::Codegen::new() | ||
.pure() | ||
// All inputs and imports from the inputs must reside in `includes` directories. | ||
.includes(["src/proto"]) | ||
// Inputs must reside in some of include paths. | ||
.input("src/proto/serverdata.proto") | ||
// Specify output directory relative to Cargo output directory. | ||
.out_dir("src") | ||
.run_from_script(); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pub mod lockdown; | ||
pub mod mqtt_handler; | ||
pub mod numerical; | ||
pub mod serverdata; | ||
pub mod visual; | ||
|
||
#[derive(std::fmt::Debug)] | ||
pub struct PublishableMessage { | ||
pub topic: &'static str, | ||
pub data: Vec<f32>, | ||
pub unit: &'static str, | ||
} | ||
|
||
/// the topic to listen for for HV enable, 1 is on 0 is off | ||
pub const HV_EN_TOPIC: &str = "MPU/State/TSMS"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use std::error::Error; | ||
|
||
use tokio::sync::watch::Receiver; | ||
use tracing::info; | ||
|
||
pub async fn lockdown_runner( | ||
mut hv_stat_recv: Receiver<bool>, | ||
) -> Result<(), Box<dyn Error + Send + Sync>> { | ||
loop { | ||
tokio::select! { | ||
new = hv_stat_recv.changed() => { | ||
new?; | ||
info!("New HV state:{}", *hv_stat_recv.borrow_and_update()); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.