void show_welcome() { while(m_usb.isConnected()) { m_con.clear(); m_con << "****************************************" << endl; m_con << "* Welcome to Self-Balance Robot *" << endl; m_con << "* " VERSION " *" << endl; m_con << "****************************************" << endl; m_con << "[1] Calibrations" << endl; m_con << "[2] PID Control tuning" << endl; m_con << "[3] Save changed" << endl; m_con << "[4] Load Default" << endl; m_con << "[5] Dashboard" << endl; switch(m_con.getc()) { case '1' : show_mpu6050(); break; case '2' : show_pid(); break; case '3' : saveConfigure(); break; case '4' : setDefault(); break; case '5': dashboard(); break; case 'H': m_con.printf("High-Water Mark:%d\n", getStackHighWaterMark()); m_con.getc(); break; } }
static void AppTaskUserIF (void *p_arg) { (void)p_arg; GUI_Init(); while(1) { dashboard(); } }
Mat drawImageDashboard(vector<Mat> images, int imageType, int numColumns) { int numRows = ceil((float) images.size() / (float) numColumns); Mat dashboard(Size(images[0].cols * numColumns, images[0].rows * numRows), imageType); for (int i = 0; i < numColumns * numRows; i++) { if (i < images.size()) images[i].copyTo(dashboard(Rect((i%numColumns) * images[i].cols, floor((float) i/numColumns) * images[i].rows, images[i].cols, images[i].rows))); else { Mat black = Mat::zeros(images[0].size(), imageType); black.copyTo(dashboard(Rect((i%numColumns) * images[0].cols, floor((float) i/numColumns) * images[0].rows, images[0].cols, images[0].rows))); } } return dashboard; }
int main(){ // Execute the verificationLoader() function to load in // all necessary system functionality, such as xenos, // console, input, etc. verificationLoader(); // Run the dashboard on the condition that verificationLoader() // has returned status 1. if(verificationLoader == 1){ dashboard(); } return 0; }