I have some trouble with the following code:
#include “adl_global.h”
#include “adl_sms.h”
#include <time.h>
u32 wm_apmCustomStack [ 256 ];
const u16 wm_apmCustomStackSize = sizeof ( wm_apmCustomStack );
bool gps_handler (adl_gpsEvent_e Event, adl_gpsData_t * GPSData)
{
switch ( Event )
{
case ADL_GPS_EVENT_POLLING_DATA :
{
ascii RspStr [ 250 ];
wm_sprintf ( RspStr, “\r\n+Poz: %s,%s,%s,%s,%s \r\n”, GPSData->Position.UTC_time, GPSData->Speed.speed_km_p_hour, GPSData->Position.latitude, GPSData->Position.longitude, GPSData->Position.date);
adl_atSendResponse ( ADL_AT_UNS, RspStr );
}
break;
}
}
void adl_main ( adl_InitType_e InitType )
{
u32 timp;
s8 gps_subscribe_handler;
timp = 2 ;
gps_subscribe_handler = adl_gpsSubscribe (gps_handler, timp);
}
In debug mode, it run for a small period of time and after that it crash.
Loaded in the q2501b, it run perfectly.
Also, the speed is not there. The module q2501b is not computing the speed?
Debuging enviroment is MS VStudio 6.0 with gcc (standard enviroment).
Where is the problem?