rusefi-1/firmware/development/wave_chart.h

43 lines
794 B
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/**
* @file wave_chart.h
* @brief Dev console wave sniffer
*
* @date Jun 23, 2013
2015-01-12 15:04:10 -08:00
* @author Andrey Belomutskiy, (c) 2012-2015
2014-08-29 07:52:33 -07:00
*/
#ifndef WAVE_CHART_H_
#define WAVE_CHART_H_
#include "global.h"
#if EFI_WAVE_CHART
#include "datalogging.h"
/**
* @brief Dev console sniffer data buffer
*/
2014-09-11 07:04:31 -07:00
class WaveChart {
public:
2014-09-11 16:02:59 -07:00
void init();
2014-09-11 08:03:38 -07:00
void publishChart();
void resetWaveChart();
2014-11-11 08:04:06 -08:00
bool_t isWaveChartFull();
bool_t isStartedTooLongAgo();
2014-09-11 08:03:38 -07:00
void publishChartIfFull();
2014-11-18 06:03:12 -08:00
void addWaveChartEvent3(const char *name, const char *msg);
2014-09-11 08:03:38 -07:00
private:
2014-08-29 07:52:33 -07:00
Logging logging;
2014-09-24 09:03:00 -07:00
uint32_t counter;
2014-11-06 18:05:30 -08:00
uint64_t startTimeNt;
2014-08-29 07:52:33 -07:00
volatile int isInitialized;
2014-09-11 07:04:31 -07:00
};
2014-08-29 07:52:33 -07:00
void initWaveChart(WaveChart *chart);
void showWaveChartHistogram(void);
void setChartSize(int newSize);
2015-01-12 16:05:46 -08:00
#endif /* EFI_WAVE_CHART */
2014-08-29 07:52:33 -07:00
#endif /* WAVE_CHART_H_ */