HAL_PX4: make available_memory() uint32_t

This commit is contained in:
Andrew Tridgell 2015-11-05 15:41:25 +11:00
parent 8a4c0593f2
commit ac1c0bba15
2 changed files with 3 additions and 8 deletions

View File

@ -124,14 +124,9 @@ bool PX4Util::get_system_id(char buf[40])
/**
how much free memory do we have in bytes.
*/
uint16_t PX4Util::available_memory(void)
uint32_t PX4Util::available_memory(void)
{
struct mallinfo mem;
mem = mallinfo();
if (mem.fordblks > 0xFFFF) {
return 0xFFFF;
}
return mem.fordblks;
return mallinfo().fordblks;
}
/*

View File

@ -45,7 +45,7 @@ public:
*/
bool get_system_id(char buf[40]);
uint16_t available_memory(void);
uint32_t available_memory(void) override;
/*
return a stream for access to nsh shell