ts-7000
[Top] [All Lists]

[ts-7000] Re: Application crash after reapplying power to LCD with TS-72

To:
Subject: [ts-7000] Re: Application crash after reapplying power to LCD with TS-7260
From: "geoffveale" <>
Date: Mon, 25 Jun 2007 09:48:37 -0000
I think that I may have found the error in my code. I have corrected
the error and will test it over the next few hours.

My code uses a 1D array of integers to save the value of (volts x 10).
I have a subroutine that accesses the ADC to carry out a voltage
measurement and it was returning a float. A very rough example of some
similar code is as below..

main{
  int battery_volts[1024];
  
  various other code..

  battery_volts[x] = check_battery();
  
  return;
}

float check_battery(){
  various code..
  return((float) value)
}

The strange thing is that the gnu compiler did not signal an error
when I was passing a float value to an integer array. I have noticed
the compiler seems very fussy about types when comparing values or
formatting for output but this one went past without a blip.




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU