Fix some incorrect colour-to-resistance results. The price is that sometimes the...
commitc00fe34a81d87b46019ffd8a6dd3421c8195d4f5
authorFrank Gevaerts <frank@gevaerts.be>
Wed, 13 Oct 2010 21:05:50 +0000 (13 21:05 +0000)
committerFrank Gevaerts <frank@gevaerts.be>
Wed, 13 Oct 2010 21:05:50 +0000 (13 21:05 +0000)
tree239ababdd84a9342e269c8e2e926b523cc478124
parent771646a576eb5c92fed32e3b8af565bc50c68812
Fix some incorrect colour-to-resistance results. The price is that sometimes the display is subobtimal (like "2000 Ohms" instead of "2 KOhms")

Ideally, unit prefixes (K, M,...) should be calculated separately, but the largest resistance we can handle is 99 MOhm, which wouldn't fit in a 32 bit int (using our centiohm internal units) if we didn't cheat. (and technically we could go higher still. white-white-white would be 99 GOhm, but we don't do such high multipliers now)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28272 a1c6a512-1295-4272-9138-f99709370657
apps/plugins/resistor.c