Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- main
- chain_commands
- CTO_firmware
pull_request:
branches:
- main
- chain_commands
- CTO_firmware
workflow_dispatch:

jobs:
Expand Down
2 changes: 2 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
15 changes: 8 additions & 7 deletions src/command/mcl.zig
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -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,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also wrong. This is John's CCLink. The CTO firmware is inside mmc_api.mcl, but I do not think there is a version there. You can asks to CTO what version is the current firmware so we can match his version

});
}

Expand Down
Loading