Adds better logging to firmware tool on failure (#771)

* Adds better logging to firmware tool on failure

Previously, on failure, the firmware tool would still signify that the
reset of the device succeeded. This removes that log

* Added more verbose log messages

* Fixed formatting
This commit is contained in:
Matt Schulte 2019-09-17 10:21:20 -07:00 коммит произвёл GitHub
Родитель 05d97d1ac0
Коммит 44864bab60
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -993,10 +993,15 @@ static k4a_result_t command_reset_device(updater_command_info_t *command_info)
// Re-open the device to ensure it is ready.
printf("Waiting for reset of S/N: %s to complete.\n", command_info->device_serial_number[device_index]);
result = ensure_firmware_open(command_info, FW_OPEN_FULL_FEATURE, device_index);
printf("Reset of S/N: %s is complete.\n", command_info->device_serial_number[device_index]);
if (K4A_FAILED(result))
if (K4A_SUCCEEDED(result))
{
printf("Reset of S/N: %s completed successfully.\n", command_info->device_serial_number[device_index]);
}
else
{
printf("Reset of S/N: %s failed. Device did not re-enumerate\n",
command_info->device_serial_number[device_index]);
finalCmdStatus = K4A_RESULT_FAILED;
}
}