Commit graph

16 commits

Author SHA1 Message Date
dbb52ccbb2 RustyLee: Starts Heart organ processing
Activates the Heart organ's main command processing loop by calling its `start` method.

Replaces the previous placeholder `run_loop` method with the functional `start` method. The `start` method now takes a mutable reference to `self`, which enables it to operate as a long-running process without consuming the `Heart` instance.
2026-03-13 15:55:19 +00:00
7633985535 Rust: Establishes core organ communication framework
Introduces `OrganFactory` to manage the creation and spawning of organs, running each in its own thread. `OrganSocket` provides the Brain's interface for sending timestamped commands to specific organs.

Configures new MPSC channels within the Brain to handle bidirectional communication with its organs, enabling command dispatch and feedback reception. The Heart is integrated as the first example organ within this architecture.
2026-03-13 15:47:48 +00:00
33e7de18cf Adds initial organ system and protocols
Establishes the core `organs` module, including a basic `Heart` implementation, to structure internal components.

Introduces a `protocols` layer to define message passing and communication between the `Brain` and various `organs`.

Adds a `coordinates` module with a `Point3D` struct for spatial definitions.

Increases the `Brain`'s resting sleep duration for minor tuning.
2026-03-13 09:06:26 +00:00
ee01746956 Removes redundant brain state definition
The `State` enum, along with its variants (Starting, Running, Stopping, Stopped), is no longer required for managing the brain's operational stages. This change simplifies the codebase by removing an unnecessary abstraction.
2026-03-03 09:39:35 +00:00
58e1197ff4 Integrates signal handling with lifecycle
Refactors the application shutdown mechanism to use lifecycle commands.
OS signals (SIGTERM/SIGINT) now sends a `Dying` command directly to the brain.
The brain processes this command, transitioning through `Dying` to `Buried` state.
The main loop now explicitly waits for the brain to report a `Dead` or `Buried` state before exiting, ensuring a graceful shutdown.
Increases the brain's rest duration and adds debug logging.
2026-03-03 09:37:41 +00:00
500b26703e Enhances lifecycle communication with detailed receipts
Replaces simple string messages sent from the Brain with a structured `LifecycleReceipt` object.

This receipt provides comprehensive feedback, including the original command, a specific response status (e.g., `Ok`, `Refused`), and the resulting `LifeState`. This change improves the clarity, type safety, and debuggability of inter-thread communication between the main God thread and the Brain.
2026-03-03 08:47:30 +00:00
b8137feea5 Refactors main function logic for clarity
Extracts core application setup, brain management, and OS signal handling into dedicated functions.
Improves readability and modularity of the main execution flow.
Removes an unused variable and updates the build number.
2026-03-02 12:50:18 +00:00
4acf07f389 Refactors brain to event-driven lifecycle
Introduces a multi-threaded architecture where the brain operates in its own thread.

Establishes explicit MPSC channels for communication, enabling the main application (God) to send `LifecycleCommand` messages to the brain and receive status updates. This replaces the previous polling-based `update` loop with an event-driven model.

Defines a comprehensive `LifeState` enum for more granular and robust state management. The `LedPump` component is removed as its functionality is superseded by the new command-driven state transitions.

This architectural shift improves separation of concerns and lays the groundwork for more complex and responsive robot control.
2026-03-01 15:19:53 +00:00
92c2ffa9cd Makes build number increment conditional
Introduces an `increment` Cargo feature to control the automatic incrementing of the build number during the build process.

This change prevents the build number from incrementing on every build, providing more control for local development and specific release scenarios. The build number will now only increment when the `increment` feature is explicitly enabled.

Adds `cargo:rerun-if-changed=src/` to ensure the build script re-runs when source files change.
2026-02-28 08:07:07 +00:00
76d1311440 Bumps build number to 102
Reflects the latest successful build iteration for the project.
2026-02-28 07:40:26 +00:00
c201f40d65 Implements automated build numbering
Introduces a build script to automatically increment a build number with each compilation.
This number is combined with the semantic version to create a full version string.
The full version is then exposed to the application and logged at startup, providing a unique identifier for each build to aid in tracking and debugging.
2026-02-28 07:39:45 +00:00
5714b3a396 Introduces periodic beat mechanism
Adds a `LedPump` component to the `Brain` to execute logic periodically while in the `Running` state.

This establishes a basic timing mechanism that currently logs debug messages at a fixed interval, providing a foundation for future timed operations or state transitions. The default logging level is adjusted to `debug` to ensure these periodic events are visible.
2026-02-28 06:55:12 +00:00
3e13aa2261 Flattens brain module structure
Renames the `mod.rs` file for the `brain` module to `brain.rs`.
This simplifies the module path and aligns with standard Rust practices for modules defined entirely within a single file.
2026-02-27 14:46:12 +00:00
c05b771e76 Integrates structured logging with tracing
Replaces existing `println!` statements with `tracing::info!` macros for improved observability and debuggability.

Configures `tracing-subscriber` to enable structured logging, allowing for flexible filtering via `RUST_LOG` and compact, human-readable output by default.
2026-02-26 13:07:19 +00:00
2f0cb6e359 Renames RobotNode to Dixon and adds Rustylee core
Refactors the existing `RobotNode` module by renaming its directory and associated files to `Dixon`. This consolidates the core C++ robot node under a new name.

Introduces the initial `rustylee` module, establishing a foundational structure for the robot's brain. This new Rust component includes:
- A state machine (Starting, Running, Stopping, Stopped) to manage the brain's operational lifecycle.
- Graceful shutdown capabilities using a `ctrlc` signal handler.
- A main watchdog loop that orchestrates state transitions and responds to shutdown requests.
2026-02-26 11:00:48 +00:00
d452578afc Sets up initial Rust project with ARM64 deployment
Introduces the `rustylee` Rust project with a basic "Hello, world!" application.
Configures cross-compilation for `aarch64-unknown-linux-gnu` targets using `cargo.toml`.
Adds a deployment script to automate pushing the compiled ARM64 binary to a remote host.
This enables development and deployment of Rust applications for the target environment.
2026-02-25 07:20:14 +00:00