Browse Source

AP_HAL: use ExpandingString class

zr-v5.1
Andrew Tridgell 4 years ago committed by Peter Barker
parent
commit
96cbde0ee6
  1. 7
      libraries/AP_HAL/CANIface.h
  2. 6
      libraries/AP_HAL/Util.h

7
libraries/AP_HAL/CANIface.h

@ -20,6 +20,8 @@ @@ -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: @@ -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

6
libraries/AP_HAL/Util.h

@ -3,6 +3,8 @@ @@ -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: @@ -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

Loading…
Cancel
Save