Add timing monitor for main loop and add monitors to safety flag command
This commit is contained in:
@@ -355,6 +355,7 @@ static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handl
|
||||
bool flag;
|
||||
int status;
|
||||
struct analog_monitor_info amon_info;
|
||||
struct timing_monitor_info timing_info;
|
||||
|
||||
shellmatta_printf(handle, "Error flags\r\n"
|
||||
"-----------\r\n");
|
||||
@@ -405,6 +406,22 @@ static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handl
|
||||
}
|
||||
}
|
||||
|
||||
shellmatta_printf(handle, "\r\nTiming Monitors\r\n"
|
||||
"--------------\r\n");
|
||||
|
||||
|
||||
count = safety_controller_get_timing_monitor_count();
|
||||
for (i = 0; i < count; i++) {
|
||||
(void)safety_controller_get_timing_mon_by_index(i, &timing_info);
|
||||
(void)safety_controller_get_timing_mon_name_by_index(i, name, sizeof(name));
|
||||
|
||||
shellmatta_printf(handle, "\t%2lu) %-20s\t", i+1, name);
|
||||
if (timing_info.enabled)
|
||||
shellmatta_printf(handle, "%lu ms ago\r\n", (unsigned long int)timing_info.delta);
|
||||
else
|
||||
shellmatta_printf(handle, "[disabled]\r\n");
|
||||
}
|
||||
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user