mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
HAL_PX4: implement system id without formatting
This commit is contained in:
parent
bb6b176785
commit
144bbb293f
@ -132,6 +132,16 @@ bool PX4Util::get_system_id(char buf[40])
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PX4Util::get_system_id_unformatted(uint8_t buf[], uint8_t &len)
|
||||
{
|
||||
uint8_t serialid[12];
|
||||
get_board_serial(serialid);
|
||||
len = MIN(12, len);
|
||||
memcpy(buf, serialid, len);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
how much free memory do we have in bytes.
|
||||
*/
|
||||
|
@ -37,7 +37,8 @@ public:
|
||||
/*
|
||||
get system identifier (STM32 serial number)
|
||||
*/
|
||||
bool get_system_id(char buf[40]);
|
||||
bool get_system_id(char buf[40]) override;
|
||||
bool get_system_id_unformatted(uint8_t buf[], uint8_t &len) override;
|
||||
|
||||
uint32_t available_memory(void) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user