I think there is a problem with my Debugger.  When I step thru my code, I get some 
very weird results.  Here is a section:

==================================================================
 Declarations
==================================================================
typedef struct{
        UInt8   _30Hz;
        UInt8   _60Hz;
        UInt8   _120Hz;
        UInt8   _250Hz;
        UInt8   _500Hz;
        UInt8   _1000Hz;
} EQFreq;

typedef UInt8 MixerType;
enum MixerType{A, AB, ABC, B, BC, C, CA};
        
typedef struct{
        EQFreq          EQ;                     
        MixerType       MIXER;
} ChannelAtt;
                
typedef struct{
        ChannelAtt      CH[6];                          
} VehicleType;

==================================================================
Code
==================================================================
static void init(void)
{
        for(ActiveChannel = 0; ActiveChannel < 7; ActiveChannel += 1)
        {
                honda.CH[ActiveChannel].EQ._30Hz = 10;
                honda.CH[ActiveChannel].EQ._60Hz = 10;

                honda.CH[ActiveChannel].EQ._120Hz = 10;

                honda.CH[ActiveChannel].EQ._250Hz = 10;
                honda.CH[ActiveChannel].EQ._500Hz = 10;
                honda.CH[ActiveChannel].EQ._1000Hz = 10;

                switch(ActiveChannel){
                        case 4:
                                honda.CH[ActiveChannel].MIXER = A;
                                break;
                                               default:
                                                                break;
                }

}


What happens is this: NOTHING happens when the BOLD instructions are executed.  When 
the underlined instruction is executed, the data (in this example 10 (0x0A)) is stored 
in honda.CH[ActiveChannel].EQ._30Hz !!  Then the next line (250Hz) is stored in 
...EQ._60Hz.  Also, the value of ActiveChannel never changes from the initialized 
value of 0x00, BUT the switch statement I threw in there will read the CORRECT value 
of ActiveChannel and execute when it's supposed to (when ActiveChannel == 4).  Why is 
there this offset in where the data is being stored (or is appearing to be stored)?  
My program uses these values to set sliders and all of the slider positions are 
CORRECT for all values _30Hz, _60Hz, _120Hz etc so I'm not sure what the problem is 
here.  Has anyone every seen bugs like this in the Debugger?

thanks,

~Tony




--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to