From: Scott F. <sc...@st...> - 2009-05-21 10:44:09
|
Ok, I narrowed it down. Conclusion is that you can't reuse too much of the bar code for histograms. And working around the bar code to work in some sort of histogram is going to be a pita I think. On Wed, May 20, 2009 at 8:24 AM, Scott Flynn <sc...@st...> wrote: > Bah this isn't working out perfectly. There's some bug I just can't figure > out. And what's worse is it's impossible to reproduce. You have to wait for > it to happen then start checking debug messages. The values are all in > order, but sometimes what gets printed to the LCD isn't what's expected. The > one scenario that bugs me most is three ticks back to back at full value, > then zero values, the second segment vanishes, but sometimes shows up later, > and the third segment stays in position 0. And every once in a while the > histogram acts like a regular bar, but I think I fixed that one. Got any > ideas what might be causing the first bug? > > Like I said, the values are all correct when the bug occurs. These values: > > 0 0 8 8 8 0 0 0 0 0 0 > > Look like this on the LCD. > > 8 0 8 0 8 0 0 0 0 0 0 > > Then next tick it might look like: > > 8 0 0 8 0 8 0 0 0 0 0 > > Or the initial 8 might turn into a 0. > > I'm going to keep at this, but was hoping maybe someone would have > suggestions. There's also an updated diff attached. I still don't know what > to do about a width property. > > On Tue, May 19, 2009 at 8:22 AM, Scott Flynn <sc...@st...> wrote: > >> >> On Tue, May 19, 2009 at 7:57 AM, Michael Reinelt <mi...@re...>wrote: >> >>> Hi Scott, >>> >>> > Well, it was an experiment. I wanted to make it complicated I guess. >>> > That part in define_chars is broken. That's what I was working on when >>> I >>> > took a break to check email. Anyhow, I envisioned a left and right half >>> > per each character cell. Not a good idea? Dealing with 2 values makes >>> > more sense on a graphical LCD with color settings. >>> >>> Well, I thought a histogramm would have one expression as a value, and >>> this (historic) value is sort of "scrolled" to >>> the left (or the right or...) >> >> >> Well it certainly simplifies things going with one value. All histograms >> I've seen have had one value. I just wanted to be difficult. I'll cut this >> back to a single value, still using the bars structure. >> >> >>> >>> >>> > - you can specify the length of a histogram (as with bars), but >>> > shouldn't there be something like a "width"? Looks like >>> > you're always using the whole size of the display..... >>> > >>> > >>> > What would be the difference between width and length? When I setup a >>> > histogram with length of 5, the histogram stays within those limits, >>> and >>> > I can place a widget after it. I used this length in adjusting bar >>> > cells. One cell is discarded each pulse. I may have missed parts where >>> > an index may fall out of range, but it shouldn't be using the whole >>> > screen. If it is, point me to the code and I'll figure something out. >>> >>> I could not test it, I just wondered. >>> >>> think of a display with 8 rows and 40 columns. >>> >>> Now I want to place some text in the top line, and below place two >>> histograms, 7 rows in height, and 19 columns in width >>> (19 columns to get a gap between the two widgets). Say the histogramm is >>> heading North (i.e. bars starting at the >>> bottom, heading top) >>> >>> The "length" of the bars would be 7 cells, so one would specify "length >>> 7" (or whatever the property is called) >>> >>> But how would I specify the width of the widget? I couldn't see any >>> parameter or attribute for this.... >>> >> >> Oh I see. In that case width is one character cell (according to the >> patch). I wasn't thinking along the same lines. I was viewing a histogram as >> being one cell heigh, and "length" many columns wide for horizontal bars. >> Vertical bars are one cell wide, and "length" many cells high. I wasn't >> going to add support for vertical histograms at first, but I went ahead and >> coded in parts leading towards them. >> >> >>> >>> >>> >>> >>> -- >>> Michael Reinelt <mi...@re...> >>> http://home.pages.at/reinelt >>> GPG-Key <http://home.pages.at/reinelt%0AGPG-Key> 0xDF13BA50 >>> ICQ #288386781 >>> >> >> > |