Plaquette
 
Loading...
Searching...
No Matches
pq_plot.h
1/*
2 * pq_plot.h
3 *
4 * Print functions for Plaquette to use with the Serial plotter.
5 *
6 * (c) 2025 Sofian Audry :: info(@)sofianaudry(.)com
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef PQ_PLOT_H_
23#define PQ_PLOT_H_
24
25#include "pq_print.h"
26
27#ifndef PLOT_TOKEN_SIZE
28#define PLOT_TOKEN_SIZE 4
29#endif
30
31namespace pq {
32
33enum PlotToken {
34 LABEL = 0,
35 ITEM = 1,
36 BEGIN = 2,
37 END = 3
38};
39
41void plotToken(PlotToken type, const char* token);
42
44const char* plotToken(PlotToken type);
45
47void plotPrecision(int digits);
48
50int plotPrecision();
51
53size_t plot(double value);
54
56size_t plot(const char label[], double value);
57
59size_t plot(const __FlashStringHelper * label, double value);
60
62size_t plot(const String &label, double value);
63
65size_t plotln();
66
67} // namespace pq
68
69#endif