diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 18c7509..93832fa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: test-firmware-build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2.4.0 - uses: cachix/install-nix-action@v16 diff --git a/.github/workflows/WeeklyCheckOfRustNightly.yml b/.github/workflows/WeeklyCheckOfRustNightly.yml index fa6d19f..89a9373 100644 --- a/.github/workflows/WeeklyCheckOfRustNightly.yml +++ b/.github/workflows/WeeklyCheckOfRustNightly.yml @@ -4,7 +4,7 @@ on: - cron: "0 0 * * FRI" jobs: test-firmware-against-latest-nightly: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2.4.0 - uses: cachix/install-nix-action@v16 diff --git a/ateam-common-packets/include/robot_metadata.h b/ateam-common-packets/include/robot_metadata.h new file mode 100644 index 0000000..788f9bb --- /dev/null +++ b/ateam-common-packets/include/robot_metadata.h @@ -0,0 +1,18 @@ +const char *const ROBOT_NAMES[] = { + "Kaladin", + "Shallan", + "Dalinar", + "Navani", + "Szeth", + "Teft", + "Lift", + "Venli", + "Sylphrena", + "Pattern", + "The Stormfather", + "The Sibling", + "Auxiliary", + "Phenadorana", + "Wyndle", + "Timbre" +}; \ No newline at end of file diff --git a/ateam-common-packets/rust-lib/build.rs b/ateam-common-packets/rust-lib/build.rs index 6698482..db467bf 100644 --- a/ateam-common-packets/rust-lib/build.rs +++ b/ateam-common-packets/rust-lib/build.rs @@ -113,10 +113,22 @@ fn main() { // Unwrap the Result and panic on failure. .expect("Unable to generate bindings"); + let robot_metadata_bindings = create_configured_builder() + // The input header we would like to generate + // bindings for. + .header("../include/robot_metadata.h") + .generate() + // Unwrap the Result and panic on failure. + .expect("Unable to generate robot metadata bindings"); + // Write the bindings to the lib source dir let out_dir = "src"; bindings .write_to_file(Path::new(&out_dir).join("bindings.rs")) .expect("Couldn't write Radio packet bindings!"); + + robot_metadata_bindings + .write_to_file(Path::new(&out_dir).join("metadata_bindings.rs")) + .expect("Couldn't write robot metadata bindings!"); }