Browse Source

HAL_PX4: make available_memory() uint32_t

mission-4.1.18
Andrew Tridgell 9 years ago
parent
commit
ac1c0bba15
  1. 9
      libraries/AP_HAL_PX4/Util.cpp
  2. 2
      libraries/AP_HAL_PX4/Util.h

9
libraries/AP_HAL_PX4/Util.cpp

@ -124,14 +124,9 @@ bool PX4Util::get_system_id(char buf[40]) @@ -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;
}
/*

2
libraries/AP_HAL_PX4/Util.h

@ -45,7 +45,7 @@ public: @@ -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

Loading…
Cancel
Save