Integrate companion-chip status into GET /api/health (fw 0.6.0).
Expose Si4684, ADAU1701, and BT1035 boot flags via CompanionChipStatus after HardwareBootstrap; update API manual schema for Slice 8. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "core/FirmwareVersion.hpp"
|
||||
#include "core/CompanionChipStatus.hpp"
|
||||
#include "core/HealthStatus.hpp"
|
||||
#include "core/HealthStatusJson.hpp"
|
||||
|
||||
@@ -85,5 +86,22 @@ namespace {
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
return runHealthStatusJsonTest();
|
||||
if (runHealthStatusJsonTest() != EXIT_SUCCESS) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const core::HealthStatus withChips = core::HealthStatus::ok(
|
||||
core::FirmwareVersion("0.6.0"),
|
||||
core::CompanionChipStatus{
|
||||
.si4684Ready = true,
|
||||
.adau1701Ready = true,
|
||||
.bt1035Ready = true,
|
||||
});
|
||||
const std::string chipsJson = core::serializeHealthStatusJson(withChips);
|
||||
if (!expectEqual(
|
||||
chipsJson,
|
||||
R"({"status":"ok","fw":"0.6.0","chips":{"si4684":true,"adau1701":true,"bt1035":true}})")) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user