本文整理汇总了C++中SharedMemory::getRawSonar方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedMemory::getRawSonar方法的具体用法?C++ SharedMemory::getRawSonar怎么用?C++ SharedMemory::getRawSonar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharedMemory
的用法示例。
在下文中一共展示了SharedMemory::getRawSonar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: systemMonitor
void systemMonitor()
{
int c = system("clear");
/*Print topline */
printf(" ______________________________________________________________________________\n");
textcolor(BRIGHT, GREEN, BLACK); printf(" %s",companyName); textcolor(BRIGHT, WHITE, BLACK);
printf(" -------");
textcolor(BRIGHT, GREEN, BLACK); printf(" %s" ,consoleName); textcolor(BRIGHT, WHITE, BLACK);
printf(" --------- ");
textcolor(BRIGHT, GREEN, BLACK); printf( "%s",getDateString() ); textcolor(BRIGHT, WHITE, BLACK);
printf(" ==============================================================================\n");
textcolor(BRIGHT, MAGENTA, BLACK);
printf(" SharedMemory\t\t\t\t\t\t"); printf(" System State\n");
textcolor(BRIGHT, WHITE, BLACK);
//printf(" ****************************************************************************\n");
textcolor(BRIGHT, BLUE, BLACK);
printf(" Roll: %10.3f %3.2f \t",memory.getRoll(), memory.getRoll() * (180/M_PI) ); printf(" RollRate: %10.3f \t", memory.imuRollRate );
memory.hoverMode == 1 ? textcolor(BRIGHT, BLUE, BLACK) : textcolor(BRIGHT, YELLOW, BLACK); //Set color
printf(" HoverMode: %s \n",memory.hoverMode == 1 ? "ON" : "OFF");
textcolor(BRIGHT, BLUE, BLACK);
printf(" Pitch: %10.3f %3.2f \t",memory.getPitch(), memory.getPitch() * ( 180/M_PI ) ); printf(" PitchRate: %10.3f \t", memory.imuPitchRate );
memory.flightAllow == 1 ? textcolor(BRIGHT, GREEN, BLACK) : textcolor(BRIGHT, RED, BLACK); //Set color
printf(" FlightAllow: %s \n",memory.flightAllow == 1 ? "ON" : "OFF");
textcolor(BRIGHT, BLUE, BLACK);
printf(" Yaw: %10.3f %3.2f \t",memory.getYaw() , memory.getYaw() * (180 / M_PI ) ); printf(" YawRate: %10.3f \t",memory.imuYawRate * (180 / M_PI ) );
memory.RFflightAllow == 1 ? textcolor(BRIGHT, GREEN, BLACK) : textcolor(BRIGHT, RED, BLACK); //Set color
printf(" RFFlightAllow: %s \n",memory.RFflightAllow == 1 ? "ON" : "OFF");
textcolor(BRIGHT, BLUE, BLACK);
printf(" Sonar: %10.3f \t\t",memory.getSonar1()); printf(" RawSonar: %10.3f \t",memory.getRawSonar());
memory.isCameraRunning == 1 ? textcolor(BRIGHT, GREEN, BLACK) : textcolor(BRIGHT, RED, BLACK); //Set color
printf(" Camera: %s \n",memory.isCameraRunning == 1 ? "ON" : "OFF");
textcolor(BRIGHT, BLUE, BLACK);
printf(" MedianFiltered: %9.3f",memory.getMedianFiltered());
memory.isCameraRecording == 1 ? textcolor(BRIGHT, GREEN, BLACK) : textcolor(BRIGHT, RED, BLACK); //Set color
printf(" \t\t\t\t Recording: %s \n",memory.isCameraRecording == 1 ? "ON" : "OFF");
textcolor(BRIGHT, BLUE, BLACK);
printf(" MedianDiff: %9.3f\t\t",memory.getMedianDiff());
printf(" MedianInt: %9.3f\t\t\n",memory.getMedianInt());
printf(" Des_Altitude : %9.3f\n",memory.desiredAltitude );
printf(" U1: %10.3f\t",memory.U[0] ); printf(" MDuty1: %5d ",memory.MotorDuty[0] ); printf(" ChDuty1: %6d \n",memory.PulseDuty[0] );
printf(" U2: %10.3f\t",memory.U[1] ); printf(" MDuty2: %5d ",memory.MotorDuty[1] ); printf(" ChDuty2: %6d \n",memory.PulseDuty[1] );
printf(" U3: %10.3f\t",memory.U[2] );printf(" MDuty3: %5d ",memory.MotorDuty[2] );printf(" ChDuty3: %6d \n",memory.PulseDuty[2] );
printf(" U4: %10.3f\t",memory.U[3]); printf(" MDuty4: %5d ",memory.MotorDuty[3]); printf(" ChDuty4: - \n" );
textcolor(BRIGHT, WHITE, BLACK);
printf(" ==============================================================================\n");
}