当前位置: 首页>>代码示例>>C++>>正文


C++ SharedMemory::getMedianInt方法代码示例

本文整理汇总了C++中SharedMemory::getMedianInt方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedMemory::getMedianInt方法的具体用法?C++ SharedMemory::getMedianInt怎么用?C++ SharedMemory::getMedianInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SharedMemory的用法示例。


在下文中一共展示了SharedMemory::getMedianInt方法的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");
}
开发者ID:lastsurvivor,项目名称:gumstix_autopilot,代码行数:60,代码来源:gumstix_autopilot.cpp


注:本文中的SharedMemory::getMedianInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。