Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ dist/*

# Firmware images (e.g. stock WiCAN firmware kept for restoring a device)
*.bin
.lan-client.json
70 changes: 68 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ The firmware is a Cargo workspace of independently compiled crates that cooperat
| `cars/*` | Vehicle logic: CAN decoding, command handling, state encoding |
| `xtask` | Build orchestrator: reads `config.toml`, generates `.app_build/`, invokes cargo |

Details: [Architecture](docs/architecture.md) · [BLE](docs/ble.md) · [CAN bus](docs/can.md) · [LTE](docs/lte.md) · [MQTT over TLS](docs/mqtt-tls.md) · [Vehicle commands](docs/commands.md)
Details: [Architecture](docs/architecture.md) · [BLE](docs/ble.md) · [CAN bus](docs/can.md) · [LAN direct](docs/lan.md) · [LTE](docs/lte.md) · [MQTT over TLS](docs/mqtt-tls.md) · [Vehicle commands](docs/commands.md)

## 📂 Project Structure

Expand Down
6 changes: 6 additions & 0 deletions boards/esp/xtask_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,12 @@ impl TargetBuilder for Builder {
exit(1);
});
let wifi_enabled = uplink == Uplink::Wifi;
if config.network.lan.enabled {
println!(
"\u{26a0}\u{fe0f} [network.lan].enabled is ignored on ESP builds for now: LAN direct \
is on the PC board only (ESP support is firmware#121)."
);
}
let wifi_ssid = if wifi_enabled {
config.network.wifi.ssid.as_deref().unwrap_or_else(|| {
eprintln!("\u{274c} [network.wifi].ssid is required for the ESP board when [network.wifi].enabled=true");
Expand Down
3 changes: 3 additions & 0 deletions boards/pc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ log = { workspace = true }
# TLS for MQTT (mqtts://). ring instead of aws-lc-rs: it builds without cmake.
rustls = { version = "0.23.46", default-features = false, features = ["ring", "std", "tls12", "logging"] }

# Announces LAN direct over mDNS (docs/lan.md).
mdns-sd = { version = "0.22", default-features = false }

[target.'cfg(target_os = "linux")'.dependencies]
socketcan = { version = "4.0.0", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion boards/pc/main.template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async fn main(spawner: Spawner) {
board_pc::start(&spawner);
// After `start`, which sets the random source a new identity is made from.
board_pc::restore_secure_keys(DEVICE_IDENTITY_FILE, CLIENT_KEYS_FILE);
{CAN_SPAWNS}{BLE_HTTP_SPAWN}{MQTT_DRIVER_SPAWN}{CAN_LOGGER_SPAWN} spawner.spawn({VEHICLE_CRATE_IDENT}::handle_basic_commands_task().unwrap());
{CAN_SPAWNS}{BLE_HTTP_SPAWN}{MQTT_DRIVER_SPAWN}{CAN_LOGGER_SPAWN}{LAN_SPAWN} spawner.spawn({VEHICLE_CRATE_IDENT}::handle_basic_commands_task().unwrap());
spawner.spawn({VEHICLE_CRATE_IDENT}::handle_advanced_commands_task().unwrap());
spawner.spawn({VEHICLE_CRATE_IDENT}::state_update_task().unwrap());
spawner.spawn({VEHICLE_CRATE_IDENT}::can_rx_task().unwrap());
Expand Down
Loading