semilimes mcu sdk
1.1.1
semilimes Software Development Kit for microcontrollers
Loading...
Searching...
No Matches
fc_gauge.h
1
#ifndef _fc_gauge_
2
#define _fc_gauge_
3
4
#include "../defines.h"
5
6
class
FcGauge
7
{
8
private
:
9
#define headerSize 197
10
#define headerArraySize 27
11
SmeJson json_data;
12
char
* json =
nullptr
;
13
char
* jsonArray =
nullptr
;
14
15
public
:
16
// shows a moving indicator on the gauge, depending on the value
18
char
pointer
[4][9] = {
"none"
,
"triangle"
,
"circle"
,
"needle"
};
19
20
// shows a progress bar moving on the arch of the gauge, depending on the value
22
char
progressBar
[3][8] = {
"none"
,
"basic"
,
"rounded"
};
23
24
// Function: ~FcGauge
25
26
// distructor of the class, frees up the memory occupied by the array/s
27
28
// Prototype:
29
// ~FcGauge()
30
31
// Parameters:
32
33
// Returns:
35
~FcGauge
()
36
{
37
delete
[] json;
38
delete
[] jsonArray;
39
json =
nullptr
;
40
jsonArray =
nullptr
;
41
}
42
43
// Function: FcGauge.set
44
45
// A gauge to show numerical data with a configurable ranges and colors
46
47
// Prototype:
48
// void FcGauge::set(char* refname,char* title,bool reqSel, char* value);
49
50
// Parameters:
63
64
// Returns:
66
void
set
(
char
* refname,
char
* title,
int
thickness,
int
degrees,
int
spacing,
int
fontSize,
int
value,
char
* displayValue,
char
*
pointer
,
char
* pointerColor,
char
*
progressBar
,
char
* progressBarColor);
67
68
// Function: FcGauge.addSegment
69
70
// is an array of the graphical segments composing the gauge.
71
72
// Prototype:
73
// void FcGauge::addSegment(int from,int to,char* color);
74
75
// Parameters:
79
80
// Returns:
82
83
void
addSegment
(
int
from,
int
to,
char
* color);
84
85
// Function: FcGauge.appendSegments
86
87
// Append the selected Segments
88
89
// Prototype:
90
// void FcGauge::appendSegments();
91
92
// Parameters:
93
94
// Returns:
96
void
appendSegments
();
97
98
// Function: FcGauge.get
99
100
// return the json script
101
102
// Prototype:
103
// void FcGauge::get();
104
105
// Parameters:
106
107
// Returns:
109
char
*
get
();
110
};
111
112
#endif
FcGauge
Definition
fc_gauge.h:7
FcGauge::set
void set(char *refname, char *title, int thickness, int degrees, int spacing, int fontSize, int value, char *displayValue, char *pointer, char *pointerColor, char *progressBar, char *progressBarColor)
Definition
fc_gauge.cpp:27
FcGauge::progressBar
char progressBar[3][8]
Definition
fc_gauge.h:22
FcGauge::pointer
char pointer[4][9]
Definition
fc_gauge.h:18
FcGauge::appendSegments
void appendSegments()
Definition
fc_gauge.cpp:97
FcGauge::addSegment
void addSegment(int from, int to, char *color)
Definition
fc_gauge.cpp:63
FcGauge::~FcGauge
~FcGauge()
Definition
fc_gauge.h:35
FcGauge::get
char * get()
Definition
fc_gauge.cpp:119
github
semilimes_mcu_sdk
src
components
fc_gauge.h
Generated by
1.12.0