We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a4165e commit 174eb2cCopy full SHA for 174eb2c
drivers/source/AnalogIn.cpp
@@ -54,16 +54,18 @@ unsigned short AnalogIn::read_u16()
54
return ret;
55
}
56
57
-float AnalogIn::read_volts() {
58
- float ret = this->read();
59
- return (ret*this->vref);
+float AnalogIn::read_volts()
+{
+ return (this->read() * this->vref);
60
61
62
-void AnalogIn::set_reference_voltage(float vref) {
+void AnalogIn::set_reference_voltage(float vref)
63
64
this->vref = vref;
65
66
-float AnalogIn::get_reference_voltage(void) {
67
+float AnalogIn::get_reference_voltage(void)
68
69
return this->vref;
70
71
0 commit comments