Numworks Epsilon
1.4.1
Graphing Calculator Operating System
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
+
Enumerations
a
b
c
d
e
f
l
m
o
p
q
r
s
t
w
Enumerator
+
Related Functions
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
u
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
+
Typedefs
a
b
c
d
e
f
g
i
k
m
n
q
r
s
u
v
Enumerations
+
Enumerator
i
l
m
p
r
s
u
+
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
adc.cpp
Go to the documentation of this file.
1
#include "
command.h
"
2
#include <
ion.h
>
3
#include <
poincare.h
>
4
#include <
ion/src/device/led.h
>
5
6
namespace
Ion
{
7
namespace
Device {
8
namespace
Bench {
9
namespace
Command
{
10
11
void
ADC
(
const
char
* input) {
12
if
(input !=
nullptr
) {
13
reply
(
sSyntaxError
);
14
return
;
15
}
16
float
result =
Ion::Battery::voltage
();
17
constexpr
int
precision = 8;
18
constexpr
int
bufferSize = Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(precision);
19
char
responseBuffer[bufferSize+4] = {
'A'
,
'D'
,
'C'
,
'='
};
// ADC=
20
Poincare::PrintFloat::convertFloatToText<float>(result, responseBuffer+4, bufferSize, precision);
21
reply
(responseBuffer);
22
}
23
24
}
25
}
26
}
27
}
command.h
poincare.h
ion.h
Ion::Device::Bench::Command::sSyntaxError
const char *const sSyntaxError
Definition:
command.cpp:11
Ion::Device::Bench::Command::ADC
void ADC(const char *input)
Definition:
adc.cpp:11
Ion::Display::Device::Command
Command
Definition:
display.h:63
led.h
Ion::Battery::voltage
float voltage()
Definition:
battery.cpp:33
Ion::Device::Bench::Command::reply
void reply(const char *s)
Definition:
command.cpp:15
Ion
Definition:
backlight.h:6
epsilon
ion
src
device
bench
command
adc.cpp
Generated by
1.8.14