[diag] move factory diags into core (#4010)

- Simplifies make files by not having to deal with separate library.
- Combine factory diags source into single source file.
This commit is contained in:
Jonathan Hui
2019-07-23 08:47:16 -07:00
committed by GitHub
parent a5124493d9
commit e87bc42184
35 changed files with 900 additions and 920 deletions
+2 -2
View File
@@ -3413,7 +3413,7 @@ void Interpreter::ProcessDiag(int argc, char *argv[])
// all diagnostics related features are processed within diagnostics module
output[sizeof(output) - 1] = '\0';
otDiagProcessCmd(argc, argv, output, sizeof(output) - 1);
otDiagProcessCmd(mInstance, argc, argv, output, sizeof(output) - 1);
mServer->Output(output, static_cast<uint16_t>(strlen(output)));
}
#endif
@@ -3436,7 +3436,7 @@ void Interpreter::ProcessLine(char *aBuf, uint16_t aBufLength, Server &aServer)
#if OPENTHREAD_ENABLE_DIAG
VerifyOrExit(
(!otDiagIsEnabled() || (strcmp(cmd, "diag") == 0)),
(!otDiagIsEnabled(mInstance) || (strcmp(cmd, "diag") == 0)),
mServer->OutputFormat("under diagnostics mode, execute 'diag stop' before running any other commands.\r\n"));
#endif