/* * Wrapper Function of getMagValue. It waits until the ADC completes the conversion. * */ double AD5933_Class::getMagOnce() { while (!isValueReady()) // wait until ADC conversion is complete. { //delay(delayTimeInit); ; } return getMagValue(); }
double AD5933_Class::getMagOnce() // Wrapper Function of getMagValue. It waits until the ADC completes the conversion. { while (!isValueReady()) // wait until ADC conversion is complete. { //delay(delayTimeInit); ; } return getMagValue(); }
int main(){ //wiringPi check showError(); // ctl + c ...exiting (void)signal(SIGINT,control_event); (void)signal(SIGQUIT,control_event); //gnuplot file gnuPlotOpenfile(); //sensor initial sensorInit(); printf("....start loop....\n"); while(1) { //accel getAccelValue(); accelCalculate(); //gyro getGyroValue(); gyroCalculate(); //mag getMagValue(); //baro getBaroValue(); //filter sensorFilter( pitchRatio, rollRatio, yawRatio, altitudeRatio ); //put data to file gnuPlotPutToFile(dataNum); printResult(); delay(10);//+40(in getTempValue)....sampling time dataNum++; } }