Commit graph

10 commits

Author SHA1 Message Date
Programmer59
07eb6bea15 chore: workstation setup (line-endings and ignore .idea) 2026-02-14 17:10:56 +00:00
Russell Gilbert
c19687d91a Improves Dixon's shutdown and control flow.
Adds signal handling for graceful shutdown via SIGINT and SIGTERM.

Updates the control loop to be interruptible, allowing for a clean exit when a shutdown signal is received.

Changes the node state management to use an enum for clarity and better control the run states (starting, running, stopping, stopped).

The heartbeat is stopped when the node is stopping or stopped.

Also updates the line request to force an inactive state when claiming the pin.

Also updates the version number.
2026-02-12 09:53:29 +00:00
Russell Gilbert
2ccbd2f307 Uses atomic booleans for thread safety
Replaces mutex with atomic booleans in DixonNodeState for improved thread safety. This eliminates the need for explicit locking in the connected_ and brainRunning_ accessors, reducing overhead and potential for deadlocks.

Updates version file.
2026-02-11 07:56:57 +00:00
Russell Gilbert
1da934ba3c Updates executable name and dependency links
Renames the executable to lowercase and updates the corresponding dependency links in CMakeLists.txt.

Introduces a version file to manage the project's version.
2026-02-11 07:43:40 +00:00
Russell Gilbert
b2761dd2db Adds versioning to the robot node
Implements an automatic versioning system for the robot node,
utilizing a `version.txt` file and a Python script to increment
the patch version.

Integrates the version into the CMake build process to ensure
the version is displayed in the robot node's output.
2026-02-08 14:03:47 +00:00
Russell Gilbert
957f789faa Adds heartbeat functionality using GPIO
Introduces a heartbeat mechanism to the robot node using GPIO.
This allows for external monitoring of the node's active state.

The heartbeat is implemented using a GPIO pin that toggles
at a regular interval, indicating that the system is running.

Updates CMakeLists to link the project with gpiod libraries
staged locally.
Adds .gitignore entries for local dependencies and PC build directories.
2026-02-08 12:55:44 +00:00
Russell Gilbert
6a8f4f364b Refactors heart beat mechanism with gpiod
Updates the heart beat mechanism to use a prepared request to control the GPIO line, improving efficiency and code clarity.
Removes the direct line request in the beat function.
Switches to using pkg-config to manage dependencies and linker flags.
2026-02-07 06:44:18 +00:00
Russell Gilbert
5fcedb0fca Initializes project structure for Dixon Robot, config build & link
Sets up the initial project structure for the Dixon robot,
including core components and build configurations.

This commit lays the foundation for future development by:
- Adding necessary `.idea` files for IDE configuration,
  including `.gitignore`, `aws.xml`, `modules.xml`, `vcs.xml`,
  `editor.xml`, and `encodings.xml`
- Creating `Heart` component for managing heart beat with GPIO.
- Setting up CMakeLists.txt to define project dependencies and configurations,
  including specifying C++20 standard and linking necessary libraries.
2026-02-07 04:36:27 +00:00
Russell Gilbert
14336c70d5 Adds basic robot control node structure
Introduces a basic structure for the robot control node. This includes:

- A central brain component that manages the robot's logic.
- A state management system using a singleton to ensure thread-safe access to shared data.
- A simple main loop that can be started and stopped.
- Initial CMakeLists.txt and gitignore configurations.

This provides a foundation for implementing robot control logic.
2025-12-28 10:04:23 +00:00
fd274fef0b
Initial commit 2025-12-28 09:37:09 +00:00