Post Created date
Odd array index behavior
Now I realize that you and curtvm were basically saying the same thing, but I hadn't encountered pgm_read_XXX() before, so it wouldn't have occurred to me, and seeing that in...
Wednesday, 25 September 2019 - 14:58
Odd array index behavior
I do. But I was having trouble getting that to work due to my inexperience using double dereferencing. So I tried using the approach suggested by curtvm and got that to work.
Wednesday, 25 September 2019 - 13:16
Odd array index behavior
> Partial_Update_Display_Area(X, Y, pgm_read_word( &digits2[i].width ), pgm_read_word( &digits2[i].height ), digits2[i].dig);   Thanks, curtvm!  That was...
Wednesday, 25 September 2019 - 02:18
Odd array index behavior
ki0bk wrote: Just a guess here, try making “i” volatile and see what happens. volatile uint8_t i; Jim   Thanks, Jim.  Worth a try, but didn't fix the problem.
Wednesday, 25 September 2019 - 02:15
Odd array index behavior
It may be that the error is elsewhere, as you suggest, but the if statement has no else clause, so when using i == 2 there will be two calls to Partial_Update_Display_Area() (when...
Wednesday, 25 September 2019 - 00:32
Problem passing an array struct element to a function
Got it, curtvm.  That's actually exactly the behavior I was trying to achieve.  I just started by creating the structs outside of the array.  Seems to be working in...
Monday, 23 September 2019 - 22:48
Problem passing an array struct element to a function
curtvm wrote: Why not just put them in an array-   modified previous example- __flash const digit_t all[10] = {     { 31,122,16, {1,2,3,4} }, //Zero  ...
Monday, 23 September 2019 - 19:34
Problem passing an array struct element to a function
Heh heh.  The array in each struct is actually a bitmap for a digit:  Zero -> 0, One -> 1, ....
Monday, 23 September 2019 - 17:49
Problem passing an array struct element to a function
curtvm wrote: Why not just put them in an array-   modified previous example- __flash const digit_t all[10] = {     { 31,122,16, {1,2,3,4} }, //Zero  ...
Monday, 23 September 2019 - 17:11
Problem passing an array struct element to a function
clawson wrote:   I fairly confidently predict this will not be seen when you use:   const digit * const digits[] PROGMEM = {&Zero, &One, &Two, &Three,...
Monday, 23 September 2019 - 17:00
Problem passing an array struct element to a function
Thanks, clawson, but no dice. const digit *digits[] PROGMEM = {&Zero, &One, &Two, &Three, &Four, &Five, &Six, &Seven, &Eight, &Nine};...
Monday, 23 September 2019 - 16:37
Problem passing an array struct element to a function
> Think about it   Ha.  If I had a nickel for every time I should have done that ...   Now, however, I find that if I define the struct properly and invoke...
Monday, 23 September 2019 - 16:10

Pages