AP_HAL: use ExpandingString class
This commit is contained in:
parent
c924a9917e
commit
96cbde0ee6
@ -20,6 +20,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "AP_HAL_Namespace.h"
|
#include "AP_HAL_Namespace.h"
|
||||||
|
|
||||||
|
class ExpandingString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raw CAN frame, as passed to/from the CAN driver.
|
* Raw CAN frame, as passed to/from the CAN driver.
|
||||||
*/
|
*/
|
||||||
@ -191,10 +193,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Get status info of the interface
|
//Get status info of the interface
|
||||||
virtual uint32_t get_stats(char* data, uint32_t max_size)
|
virtual void get_stats(ExpandingString &str) {}
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return true if busoff was detected and not cleared
|
// return true if busoff was detected and not cleared
|
||||||
virtual bool is_busoff() const
|
virtual bool is_busoff() const
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "AP_HAL_Namespace.h"
|
#include "AP_HAL_Namespace.h"
|
||||||
|
|
||||||
|
class ExpandingString;
|
||||||
|
|
||||||
class AP_HAL::Util {
|
class AP_HAL::Util {
|
||||||
public:
|
public:
|
||||||
int snprintf(char* str, size_t size,
|
int snprintf(char* str, size_t size,
|
||||||
@ -183,10 +185,10 @@ public:
|
|||||||
virtual bool trap() const { return false; }
|
virtual bool trap() const { return false; }
|
||||||
|
|
||||||
// request information on running threads
|
// 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
|
// request information on dma contention
|
||||||
virtual size_t dma_info(char *buf, size_t bufsize) { return 0; }
|
virtual void dma_info(ExpandingString &str) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// we start soft_armed false, so that actuators don't send any
|
// we start soft_armed false, so that actuators don't send any
|
||||||
|
Loading…
Reference in New Issue
Block a user