#ifdef HAVE_BLUETOOTH if(millis() - lastSendBluetooth > delaySendBluetooth){ //$LK8EX1,pressure(Pa),altitude(m),vario(cm/s),temperature(°C),battery(volt or %+1000),*checksum sprintf(paquetBluetooth,"LK8EX1,%lu,%i,%i,%i,%i",(unsigned long)(ms5611_getPressure()*100),(int)kalmanvert.getPosition(),(int)(kalmanvert.getVelocity()*100),(int)ms5611_getTemperature(),(int)ms5611_getTemperature()); //$LXWP0,loger_stored (Y/N), IAS (kph), baroaltitude (m), vario (m/s),,,,,,heading of plane,windcourse (deg),windspeed (kph)*CS //char *signVario = (kalmanvert.getVelocity() < 0) ? "-" : ""; //sprintf(paquetBluetooth,"LXWP0,Y,0,%i.%02i,%s%i.%02i,,,,,,0,0,0",(int)kalmanvert.getPosition(),abs((int)(kalmanvert.getPosition()*100)-((int)kalmanvert.getPosition()*100)),signVario,abs((int)kalmanvert.getVelocity()),abs((int)(kalmanvert.getVelocity()*100)-((int)kalmanvert.getVelocity()*100))); //PRS XXXXX\n //Serial.print(F("PRS ")); //Serial.println((unsigned long)(ms5611_getPressure()*100), HEX); //$BFV,pressure(Pa),vario(cm/s), temp(deg C), battery(%),pitotDiffPressure(pa)*checksum\r\n //sprintf(paquetBluetooth,"BFV,%lu,%i,%i,%i,0",(unsigned long)(ms5611_getPressure()*100),(int)(kalmanvert.getVelocity()*100),(int)ms5611_getTemperature(),(int)ms5611_getTemperature()); //$XCTRC,2015,1,5,16,34,33,36,46.947508,7.453117,540.32,12.35,270.4,2.78,,,,964.93,98*67 //$XCTRC,year,month,day,hour,minute,second,centisecond,latitude,longitude,altitude,speedoverground,course,climbrate,res,res,res,rawpressure,batteryindication*checksum //sprintf(paquetBluetooth,"XCTRC,,,,,,,,,,%i,,,%i,,,,%i,%i",(int)kalmanvert.getPosition(),(int)kalmanvert.getVelocity(),(int)ms5611_getPressure(),(int)ms5611_getTemperature()); Serial.print(F("$")); Serial.print(paquetBluetooth); Serial.print(F("*")); for(int i=0;i<strlen(paquetBluetooth);i++){ CheckSum ^= paquetBluetooth[i]; } if (CheckSum<0x10) {Serial.print("0");} Serial.println(CheckSum, HEX); lastSendBluetooth = millis(); CheckSum = 0; }#endif //HAVE_BLUETOOTH