1. Oops - Termomether is a monster...
- Posted by JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> Jun 03, 1998
- 638 views
Someone told me once that there was no bug-free program. So I did with my termomether: a couple of (found) bugs... They have been visible after putting the WinTermo to work. The first one is a silly one, the bitmap for the "8" is wrong (it has a nice "0" inside). The second one is much worse: After a couple of hours giving a nice Temp reading, the Win95 system where it is running stopped showing the bitmaps... After a while looking at the system, I saw a 97% resources used... Then I run the program under my NT workstation (patched accordingly, since NT doesn't like the straigth port access the program does... ). With the NT resource monitor, I've been watching how the program is gracefully eating all the memory at a steady rate... Does anybody (David, Pete,...) know how to free the memory?.... Until then, is safer to use a standard mercury one I've got a Jumbo version, with bigger digits, (that eats memory much faster), If anyone is interested... JesusC-(is-very-hot-here)
2. Re: Oops - Termomether is a monster...
- Posted by David Cuny <dcuny at DSS.CA.GOV> Jun 03, 1998
- 616 views
JesusC-(is-very-hot-here) wrote: >Does anybody (David, Pete,...) know how to free the memory?.... I haven't looked at the code, but I'm going to *guess* that you are = loading bitmaps to display the digits. Each time a digit changes, you = load another digit. Each time you load another digit, it takes up = resources. Have you considered using the VISIBLE attribute on the bitmaps? That = way, you could load all the bitmaps at the start, and then just make = them appear by altering their visiblity. Again, just a guess. -- David Cuny
3. Re: Oops - Termomether is a monster...
- Posted by Robert B Pilkington <bpilkington at JUNO.COM> Jun 03, 1998
- 605 views
On Wed, 3 Jun 1998 11:48:06 -0700 David Cuny <dcuny at DSS.CA.GOV> writes: >JesusC-(is-very-hot-here) wrote: > >>Does anybody (David, Pete,...) know how to free the memory?.... > >I haven't looked at the code, but I'm going to *guess* that you are >loading bitmaps to display the digits. Each time a digit changes, you >load another digit. Each time you load another digit, it takes up >resources. That would also be my guess. Earlier, he said that the program wasn't optimized, and that the bitmaps were loaded up each time they were needed. I'm guessing they aren't being unloaded once they are finished. (I haven't seen the program yet, either.) Also, he said that the larger bitmap version eats up resources even faster. Either try unloading the bitmaps or load them all up and display them when needed in the correct place (like sprites). I'm still waiting for dialog boxes in Win32lib before I do my first project in it, (Dialogs are a must for it), so I don't know exactly how to do it. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]
4. Re: Oops - Termomether is a monster...
- Posted by Irv <irv at ELLIJAY.COM> Jun 03, 1998
- 596 views
At 07:26 PM 6/3/98 +0200, you wrote: >---------------------- Information from the mail header ----------------------- >Sender: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU> >Poster: JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> >Subject: Oops - Termomether is a monster... >------------------------------------------------------------------------------- > >Someone told me once that there was no bug-free program. > >So I did with my termomether: a couple of (found) bugs... >They have been visible after putting the WinTermo to work. >The first one is a silly one, the bitmap for the "8" is wrong (it >I've got a Jumbo version, with bigger digits, (that eats memory much >faster), If anyone is interested... > Cool led! Can I use the bmp's for some of my programs? Irv > >JesusC-(is-very-hot-here) > I hear that phrase a lot recently; it's 96 today ':P <- (sweaty, with tongue hanging out)
5. Re: Oops - Termomether is a monster...
- Posted by JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> Jun 03, 1998
- 603 views
- Last edited Jun 04, 1998
---------- De: David Cuny <dcuny at DSS.CA.GOV> Fecha: miércoles 3 de junio de 1998 20:48 >I haven't looked at the code, but I'm going to *guess* that you are loading bitmaps >to display the digits. Each time a digit changes, you load another digit. Each time >you load another digit, it takes up resources. Yes, it is that way. >Have you considered using the VISIBLE attribute on the bitmaps? That way, you >could load all the bitmaps at the start, and then just make them appear by altering >their visiblity. VISIBLE?.... mmmm... I should check that. If I have understood, you mean I should put all the ten digits one above the other in each character position at the screen, and afterwars make the corresponding one VISIBLE?. (Let's experiment a little). Thnaks David. Jesus.
6. Re: Oops - Termomether is a monster...
- Posted by JesusC - Jesus Consuegra <jconsuegra at REDESTB.ES> Jun 03, 1998
- 637 views
- Last edited Jun 04, 1998
> Cool led! Can I use the bmp's for some of my programs? Yes, of course. If you need some *really* big ones, I cand send you the Jumbo ones. They will be included at the next release. I've been able of getting around the problem by taking only 4 measures per hour. It will take 12 hours to use up all the memory resources, so resetting the program twice per day does the job (That does not mean I'm not going to fix it!) > I hear that phrase a lot recently; it's 96 today 96... 96... At the end I'll have to write that C to F routine anyway... Jesus.
7. Re: Oops - Termomether is a monster...
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Jun 03, 1998
- 604 views
Jesus wrote: >Someone told me once that there was no bug-free program.> >So I did with my termomether: a couple of (found) bugs... >They have been visible after putting the WinTermo to work. >The first one is a silly one, the bitmap for the "8" is wrong (it >I've got a Jumbo version, with bigger digits, (that eats memory much >faster), If anyone is interested...> the procedure setBitmap reloads the bitmap resource every time it is called... the following function loads a bitmap resource once and returns a handle, which you can use throughout your program without reloading the bitmap. -- add this function to win32lib.ew global function loadBitmap(sequence bitmap) integer result result = c_func(xLoadImage, {NULL, allot_string(bitmap), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE}) -- free the string free_strings() return result end function then set some variables to hold the digit handles... sequence digits digits = loadBitmap("0.bmp") & loadBitmap("1.bmp") & ... -- you get the idea init the handles when the window is created, so that the resource are only loaded once. the use setBitmap(bmLED, digit[x+1]) where x is the numerical value of the digit to display. (setBitmap will work with a handle or a text sequence, using a handle doesn't reload the resource) Later, _______ ______ _______ ______ [ _ \[ _ ][ _ _ ][ _ ] [/| [_] |[/| [_\][/ | | \][/| [_\] | ___/ | _] | | | _] [\| [/] [\| [_/] [\| |/] [\| [_/] [_____] [______] [_____] [______] xseal at harborside.com
8. Re: Oops - Termomether is a monster...
- Posted by "Carl R. White" <C.R.White at SCM.BRAD.AC.UK> Jun 04, 1998
- 597 views
On Wed, 3 Jun 1998, JesusC - Jesus Consuegra wrote: > 96... 96... At the end I'll have to write that C to F routine anyway... = 35_5/9 degrees! Kinda warm :) We had 17C(63F) yesterday and we've got about 23C(73F) today... I've a little free time here... :) -- C = (F - 32) / 1.8 -- F = 1.8 * C + 32 function FtoC(atom farenheit) return (farenheit - 32) / 1.8 end function function CtoF(atom celcius) -- or centigrade if you want return celcius * 1.8 + 32 end function -- Carl R White E-mail...: cyrek- at -bigfoot.com / Remove the hyphens before Finger...: crwhite- at -dcsun1.comp.brad.ac.uk \ mailing or fingering... Url......: http://www.bigfoot.com/~cyrek/