| 46 | } |
| 47 | |
| 48 | uint16_t GetCommandTimeout(uint8_t command_set, uint8_t command_id) { |
| 49 | switch (command_set) { |
| 50 | case kCommandSetGeneral: |
| 51 | assert(command_id < sizeof(GeneralCommandTimeout)); |
| 52 | return GeneralCommandTimeout[command_id]; |
| 53 | case kCommandSetLidar: |
| 54 | assert(command_id < sizeof(LidarCommandTimeout)); |
| 55 | return LidarCommandTimeout[command_id]; |
| 56 | case kCommandSetHub: |
| 57 | assert(command_id < sizeof(HubCommandTimeout)); |
| 58 | return HubCommandTimeout[command_id]; |
| 59 | } |
| 60 | return KDefaultTimeOut; |
| 61 | } |
| 62 | |
| 63 | bool IsSubLidarException(const Command &command) { |
| 64 | if (device_manager().device_mode() == kDeviceModeLidar) { |