diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a8ab3b..1ff1007 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,10 +5,12 @@ on: branches: - main - chain_commands + - CTO_firmware pull_request: branches: - main - chain_commands + - CTO_firmware workflow_dispatch: jobs: diff --git a/build.zig b/build.zig index 6350c2e..ef8a2a9 100644 --- a/build.zig +++ b/build.zig @@ -50,6 +50,7 @@ pub fn build(b: *std.Build) !void { .root_module = mod, }); + exe.root_module.addImport("mmc_api", mmc_api.module("mmc-api")); exe.root_module.addImport("mcl", mmc_api.module("mcl")); b.installArtifact(exe); @@ -82,6 +83,7 @@ pub fn build(b: *std.Build) !void { }); const unit_tests = b.addTest(.{ .root_module = test_mod }); + unit_tests.root_module.addImport("mmc_api", mmc_api_mock.module("mmc-api")); unit_tests.root_module.addImport("mcl", mmc_api_mock.module("mcl")); const run_unit_tests = b.addRunArtifact(unit_tests); diff --git a/src/command/mcl.zig b/src/command/mcl.zig index ac6c28d..03f3ae0 100644 --- a/src/command/mcl.zig +++ b/src/command/mcl.zig @@ -1,6 +1,7 @@ const std = @import("std"); const command = @import("../command.zig"); const mcl = @import("mcl"); +const mmc_api = @import("mmc_api"); var arena: std.heap.ArenaAllocator = undefined; var gpa: std.mem.Allocator = undefined; @@ -42,10 +43,10 @@ pub fn init(c: Config) !void { try command.registry.put(gpa, "MCL_VERSION", .{ .name = "MCL_VERSION", - .short_description = "Display the version of MCL.", + .short_description = "Display the CC-Link version.", .long_description = - \\Print the currently linked version of the PMF Motion Control Library - \\in Semantic Version format. + \\Print the currently linked version of the CC-Link in Semantic Version + \\format. , .execute = &mclVersion, }); @@ -743,10 +744,10 @@ pub fn deinit() void { } fn mclVersion(_: std.Io, _: std.mem.Allocator, _: [][]const u8) !void { - std.log.info("MCL Version: {d}.{d}.{d}\n", .{ - mcl.version.major, - mcl.version.minor, - mcl.version.patch, + std.log.info("CC-Link Version: {d}.{d}.{d}\n", .{ + mmc_api.cclink.version.major, + mmc_api.cclink.version.minor, + mmc_api.cclink.version.patch, }); }