AP_HAL: use ExpandingString class

This commit is contained in:
Andrew Tridgell 2020-12-30 17:23:27 +11:00 committed by Peter Barker
parent c924a9917e
commit 96cbde0ee6
2 changed files with 7 additions and 6 deletions

View File

@ -20,6 +20,8 @@
#include <stdint.h>
#include "AP_HAL_Namespace.h"
class ExpandingString;
/**
* Raw CAN frame, as passed to/from the CAN driver.
*/
@ -191,10 +193,7 @@ public:
}
//Get status info of the interface
virtual uint32_t get_stats(char* data, uint32_t max_size)
{
return 0;
}
virtual void get_stats(ExpandingString &str) {}
// return true if busoff was detected and not cleared
virtual bool is_busoff() const

View File

@ -3,6 +3,8 @@
#include <stdarg.h>
#include "AP_HAL_Namespace.h"
class ExpandingString;
class AP_HAL::Util {
public:
int snprintf(char* str, size_t size,
@ -183,10 +185,10 @@ public:
virtual bool trap() const { return false; }
// request information on running threads
virtual size_t thread_info(char *buf, size_t bufsize) { return 0; }
virtual void thread_info(ExpandingString &str) {}
// request information on dma contention
virtual size_t dma_info(char *buf, size_t bufsize) { return 0; }
virtual void dma_info(ExpandingString &str) {}
protected:
// we start soft_armed false, so that actuators don't send any