Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10877
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'mrab': 0.05; 'something,': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'wrote:': 0.15; 'garbage.': 0.16; 'packet': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'bytes': 0.19; 'subject:problem': 0.19; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'parse': 0.23; 'byte': 0.25; 'there.': 0.25; 'hey': 0.26; 'all,': 0.28; 'second': 0.29; 'port.': 0.30; 'subject:number': 0.30; 'thanks': 0.31; 'this.': 0.31; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'pull': 0.37; 'but': 0.37; 'subject:: ': 0.38; 'two': 0.38; 'subject:with': 0.39; 'to:addr:python.org': 0.39; 'missing': 0.40; 'where': 0.40; 'maximum': 0.62; 'radio': 0.63; 'according': 0.63; 'received:websitewelcome.com': 0.65; 'received:184': 0.67; 'received:69.93': 0.67; 'serial': 0.71; '100': 0.72; '100%': 0.82; 'need,': 0.91 |
| Date | Thu, 04 Aug 2011 13:14:18 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Thunderbird 1.5.0.10 (Windows/20070221) |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: problem with bcd and a number |
| References | <31c8d075-2901-46eb-adcf-1c1803ab7938@a4g2000yqg.googlegroups.com> <4E3AF476.9050502@mrabarnett.plus.com> |
| In-Reply-To | <4E3AF476.9050502@mrabarnett.plus.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator410.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-BWhitelist | no |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| X-Source-Sender | mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:1626 |
| X-Source-Auth | ethan+stoneleaf.us |
| X-Email-Count | 3 |
| X-Source-Cap | dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1902.1312487936.1164.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1312487936 news.xs4all.nl 23920 [2001:888:2000:d::a6]:54766 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:10877 |
Show key headers only | View raw
MRAB wrote: > On 04/08/2011 19:26, nephish wrote: >> Hey all, >> >> I have been trying to get my head around how to do something, but i am >> missing how to pull it off. >> I am reading a packet from a radio over a serial port. >> >> i have " two bytes containing the value i need. The first byte is the >> LSB, second is MSB. Both bytes are BCD-encoded, with the LSB >> containing digits zX and MSB containing digits xy. The system speed >> is then xyz%, where 100% means maximum speed and would be given by >> bytes 00(LSB) 10(MSB)." >> >> that is a quote from the documentation. >> Anyway, i am able to parse out the two bytes i need, but don't know >> where to go from there. >> >> thanks for any tips on this. > > The value is MSB * 100 + (LSB >> 4) * 10 + (LSB & 0xF) Not according to the docs -- msb has two digits, lsb has one and garbage. ~Ethan~
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
problem with bcd and a number nephish <nephish@gmail.com> - 2011-08-04 11:26 -0700
Re: problem with bcd and a number Ethan Furman <ethan@stoneleaf.us> - 2011-08-04 12:44 -0700
Re: problem with bcd and a number MRAB <python@mrabarnett.plus.com> - 2011-08-04 20:35 +0100
Re: problem with bcd and a number Christoph Hansen <ch@radamanthys.de> - 2011-08-04 21:52 +0200
Re: problem with bcd and a number Peter Pearson <ppearson@nowhere.invalid> - 2011-08-05 16:01 +0000
Re: problem with bcd and a number Ethan Furman <ethan@stoneleaf.us> - 2011-08-04 13:14 -0700
csiph-web