pholynyk / python-xbee

Automatically exported from code.google.com/p/python-xbee
MIT License
0 stars 0 forks source link

Do not clamp analog values to 0x3FF (ten bits), for V+ (including a Vcc sample) #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The Vcc sample, in a sample set, should not be clamped to ten bits (0x3FF). 
This change removes clamping.

Using ZigBee modules: When automatically including the supply voltage level 
(see V+,  XBee Series 2 datasheet page 135), the sample value for the Vcc pin 
(bit 7 in the analog bit field, listed on page 96) is more than ten significant 
bits. The V+ documentation suggests the useful threshold value range is 
2100-3600 mV or 0x0700-0x0c00 for standard XBee modules, and the value I 
observe from the %V command is 0xD18 (3.928v).

I would expect the analog sample value from xbee-python to be 0xD18 (3.928v), 
but instead get 0x110 (at a slightly different time) which represents 0.319v. 
Removing the clamp should allow this larger value.

Original issue reported on code.google.com by mark.fic...@gmail.com on 26 Aug 2012 at 11:03

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Mark,

Thanks for the patch; I appreciate the bug report. I will write a regression 
test for the bug and include your patch when I get a chance.

~Paul Malmsten

Original comment by pmalms...@gmail.com on 29 Aug 2012 at 2:41

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 0e65c638e9bf.

Original comment by pmalms...@gmail.com on 3 Sep 2012 at 4:26