jint JNICALL Java_ardrone_ARDrone_getDroneState(JNIEnv *env, jclass cls) { return GetDroneState(); }
void ZigBee::decodeTrame() { iIndexBufferIn = 0; for(int i = 0 ; i < st_BufferIn.lengthData ; i++) { switch(st_BufferIn.Data[iIndexBufferIn++]) { case PARAM_DRONE_CONFIG_ulMaxAngle: GetConfigDrone(&(st_droneConfig.ulMaxAngle)); break; case PARAM_DRONE_CONFIG_ulTakeoffAltitude: GetConfigDrone(&(st_droneConfig.ulTakeoffAltitude)); break; case PARAM_DRONE_CONFIG_ulMinAltitude: GetConfigDrone(&(st_droneConfig.ulMinAltitude)); break; case PARAM_DRONE_CONFIG_ulCritBatteryLvl: GetConfigDrone(&(st_droneConfig.ulCritBatteryLvl)); break; case PARAM_DRONE_CONFIG_ulCritObstacleDist: GetConfigDrone(&(st_droneConfig.ulCritObstacleDist)); break; case PARAM_DRONE_CONFIG_ulCritZigbeeSignalLvl: GetConfigDrone(&(st_droneConfig.ulCritZigbeeSignalLvl)); break; case PARAM_DRONE_CONFIG_xBatteryMonitoringPeriod: GetConfigDrone(&(st_droneConfig.xBatteryMonitoringPeriod)); break; case PARAM_DRONE_CONFIG_xDetectObstaclePeriod: GetConfigDrone(&(st_droneConfig.xDetectObstaclePeriod)); break; case PARAM_DRONE_CONFIG_xZigbeeReceivePeriod: GetConfigDrone(&(st_droneConfig.xZigbeeReceivePeriod)); break; case PARAM_DRONE_CONFIG_xFlightCtrlPeriod: GetConfigDrone(&(st_droneConfig.xFlightCtrlPeriod)); break; case PARAM_DRONE_CONFIG_xGPSReceivePeriod: GetConfigDrone(&(st_droneConfig.xGPSReceivePeriod)); break; case PARAM_DRONE_CONFIG_xVideoTogglePeriod: GetConfigDrone(&(st_droneConfig.xVideoTogglePeriod)); break; case PARAM_DRONE_CONFIG_xIMUDataTimeout: st_droneConfig.xIMUDataTimeout = st_BufferIn.Data[iIndexBufferIn++]; break; case PARAM_DRONE_CONFIG_xZigbeeCmdTimeout: st_droneConfig.xZigbeeCmdTimeout = st_BufferIn.Data[iIndexBufferIn++]; break; case PARAM_DRONE_CONFIG_xZigbeeReceiveTimeout: st_droneConfig.xZigbeeReceiveTimeout = st_BufferIn.Data[iIndexBufferIn++]; break; case PARAM_DRONE_CONFIG_xTelemeterTimeout: st_droneConfig.xTelemeterTimeout = st_BufferIn.Data[iIndexBufferIn++]; break; case PARAM_DRONE_CONFIG_xBatteryTimeout: st_droneConfig.xBatteryTimeout = st_BufferIn.Data[iIndexBufferIn++]; break; case PARAM_DRONE_CONFIG_xGPSTimeout: st_droneConfig.xGPSTimeout = st_BufferIn.Data[iIndexBufferIn++]; //printf("\n%d\n",st_droneConfig.xGPSTimeout); break; case PARAM_DRONE_ERROR: GetDroneError(&(st_DroneState.eErrorMask)); //ERREUR A TRAITER? //Ici, si erreur mineur-> on demande si elle doit être ignoré // et on stock pour la prochaine émission break; case PARAM_FLY_STATE: GetDroneState(&(st_DroneState.eFltState)); if(st_DroneState.eFltState == STATE_STARTING) bReadyToSend = false; break; case PARAM_IMU_xUpdateTime: GetDroneTime(&(st_DataIMU.xUpdateTime)); break; case PARAM_GPS_xUpdateTime: GetDroneTime(&(st_DataGPS.xUpdateTime)); break; default: break; } } }