Monitoring system for electric vehicles (log various sensors, such as consumed power, solar production, speed, slope, apparent wind, etc.)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
405 B

#include <Arduino.h>
namespace detail
{
class DebugLog : public Print
{
public:
DebugLog();
~DebugLog();
virtual size_t write(uint8_t b) override;
virtual size_t write(const uint8_t *buffer, size_t size) override;
const char* get(int partIdx);
private:
void append(uint8_t b);
private:
uint8_t buffer[4096];
int start = 0;
int end = 0;
};
}
extern detail::DebugLog DebugLog;