summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSumeet Koli2018-06-16 16:02:59 +0530
committerSumeet Koli2018-06-16 16:02:59 +0530
commit4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc (patch)
treed23ae1bb30f923aea810f46d2b150bdab9af5215 /Source
parent92e638d20d2af678e618d03a2a9db344412765fa (diff)
downloadOpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.tar.gz
OpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.tar.bz2
OpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.zip
Support for Tiva C board, Changes in library file and 'Analog Input' pin to work with ADC of varied resolutions
Diffstat (limited to 'Source')
-rwxr-xr-xSource/modelPlugFirmata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/modelPlugFirmata.cpp b/Source/modelPlugFirmata.cpp
index cd4441e..d6ae2ec 100755
--- a/Source/modelPlugFirmata.cpp
+++ b/Source/modelPlugFirmata.cpp
@@ -249,7 +249,7 @@ double firmataBoard::readAnalogPin(uint32_t pin,double min, double max, double i
if(pin_info[pin].mode!=MODE_ANALOG)
setPinMode(pin,MODE_ANALOG);
if(pin_info[pin].ready)
- return min+((pin_info[pin].value/1023.0)*(max-min));
+ return min+((pin_info[pin].value/4095.0)*(max-min));
else
return init;
}