Skip to content

Commit c9a9670

Browse files
authored
Merge pull request #126 from Yaskawa-Global/app_info_include_ros_version
Include ROS 2 version in `AppInfo` on controller
2 parents 49f89e5 + eeebd26 commit c9a9670

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ void Ros_ReportVersionInfoToController()
4040
MP_APPINFO_SEND_DATA appInfoSendData;
4141
MP_STD_RSP_DATA stdResponseData;
4242

43-
sprintf(appInfoSendData.AppName, APPLICATION_NAME);
44-
45-
sprintf(appInfoSendData.Version, "%s", APPLICATION_VERSION);
46-
sprintf(appInfoSendData.Comment, "micro-ROS based ROS 2 interface");
47-
43+
snprintf(appInfoSendData.AppName, MP_MAX_APP_NAME,
44+
"%s (%s)", APPLICATION_NAME, MOTOPLUS_LIBMICROROS_ROS2_CODENAME);
45+
snprintf(appInfoSendData.Version, MP_MAX_APP_VERSION,
46+
"%s", APPLICATION_VERSION);
47+
snprintf(appInfoSendData.Comment, MP_MAX_APP_COMMENT,
48+
"%s", "micro-ROS based ROS 2 interface");
4849
mpApplicationInfoNotify(&appInfoSendData, &stdResponseData); //don't care about return value
4950
}
5051

0 commit comments

Comments
 (0)