mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_IOMCU: Console output can be disabled
This commit is contained in:
parent
2d8a81986f
commit
70f0636c90
@ -814,7 +814,7 @@ bool AP_IOMCU::check_crc(void)
|
|||||||
|
|
||||||
fw = AP_ROMFS::find_decompress(fw_name, fw_size);
|
fw = AP_ROMFS::find_decompress(fw_name, fw_size);
|
||||||
if (!fw) {
|
if (!fw) {
|
||||||
hal.console->printf("failed to find %s\n", fw_name);
|
DEV_PRINTF("failed to find %s\n", fw_name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint32_t crc = crc32_small(0, fw, fw_size);
|
uint32_t crc = crc32_small(0, fw, fw_size);
|
||||||
@ -833,13 +833,13 @@ bool AP_IOMCU::check_crc(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (io_crc == crc) {
|
if (io_crc == crc) {
|
||||||
hal.console->printf("IOMCU: CRC ok\n");
|
DEV_PRINTF("IOMCU: CRC ok\n");
|
||||||
crc_is_ok = true;
|
crc_is_ok = true;
|
||||||
AP_ROMFS::free(fw);
|
AP_ROMFS::free(fw);
|
||||||
fw = nullptr;
|
fw = nullptr;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
hal.console->printf("IOMCU: CRC mismatch expected: 0x%X got: 0x%X\n", (unsigned)crc, (unsigned)io_crc);
|
DEV_PRINTF("IOMCU: CRC mismatch expected: 0x%X got: 0x%X\n", (unsigned)crc, (unsigned)io_crc);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint16_t magic = REBOOT_BL_MAGIC;
|
const uint16_t magic = REBOOT_BL_MAGIC;
|
||||||
@ -1011,7 +1011,7 @@ void AP_IOMCU::check_iomcu_reset(void)
|
|||||||
if (last_iocmu_timestamp_ms == 0) {
|
if (last_iocmu_timestamp_ms == 0) {
|
||||||
// initialisation
|
// initialisation
|
||||||
last_iocmu_timestamp_ms = reg_status.timestamp_ms;
|
last_iocmu_timestamp_ms = reg_status.timestamp_ms;
|
||||||
hal.console->printf("IOMCU startup\n");
|
DEV_PRINTF("IOMCU startup\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint32_t dt_ms = reg_status.timestamp_ms - last_iocmu_timestamp_ms;
|
uint32_t dt_ms = reg_status.timestamp_ms - last_iocmu_timestamp_ms;
|
||||||
|
Loading…
Reference in New Issue
Block a user