Почемуто не могу получить erGetGpsState()... Делаю так:
void ERideAppLoop(u8 timerId) { s32 gpsDataAvailMask = 0; s32 GpsState; GpsState = erGetGpsState(); TRACE(( 1, "erGetGpsState = %d", GpsState )); adl_atSendResponse(ADL_AT_RSP,"GpsState= \n"); adl_atSendResponse(ADL_AT_RSP,GpsState);
/* Make sure initialization (erGpsStart) is complete before calling core */ if ((GpsState == ER_GPS_STATE_ON) || (rx_bytes_in > 0)){ /* Send a response to user informing that GPS library is loaded */ adl_atSendResponse(ADL_AT_RSP,"GpsState== ER_GPS_STATE_ON" ); if ( (!AppIsGpsLoaded)&&(GpsState == ER_GPS_STATE_ON) ) { AppCGpsCoreCb(APP_CGPS_INIT_DONE); adl_atSendResponse(ADL_AT_RSP,"GPS library is loaded"); AppIsGpsLoaded = TRUE; } /* Produce PVT solution*/ /* Extract the contents of serial port */ /* UART Rx interrupt receives bytes from the GPS chipset and store bytes in OS queue */ TRACE(( 1, "ErideDataIn Check")); if (rx_bytes_in) {
/* Process the serial port packets */ /* If complete GPS chipset packet is available, GPS core attempts a position fix and * returns bit field that indicate if new PVT data is available. */ TRACE(( 1 , "ErideCore Enter %d", rx_bytes_in)); gpsDataAvailMask = erGpsCoreTask(rxbuffer, rx_bytes_in); rx_bytes_in = 0; TRACE(( 1 , "ErideCore Exit %x", gpsDataAvailMask)); } } else {
adl_atSendResponse(ADL_AT_RSP,"It's not working... why?! Who knows..." ); /* GPS not started yet, it means feature is not activated */ AppCGpsCoreCb(APP_CGPS_FEATURE_NOT_ACTIVATED);
/* Unsubscribe the timer */ adl_tmrUnSubscribe(AppLoopTimer, ERideAppLoop, ADL_TMR_TYPE_TICK);
/* Unsubscribe the FCM flow */ adl_fcmUnsubscribe(DataGPS_fcmHandle); } }
Всегда приходит в else, и в выводе толдько GpsState= ... А чему равно - не выводит... Может кто сталкивался с подобным? Или я чего напутал?
И ещё - обязтельно ли нужна для GPS антенна? Её в комплекте не было... без неё работать будет? Вообще может не загораться диод, показывающий инициализацию GSP на модеме изза этого?
|