Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of FYDP_Final2 by
calibrate_fnt.h
00001 void calibrate_fnt(int argc, char **argv) 00002 { 00003 //to fix for updated reckon 00004 /* 00005 if(argc != 4){ 00006 if(echo){ 00007 bt.lock(); 00008 bt.printf("Usage: calibrate [module] [setting] [value]\r\n"); 00009 bt.unlock(); 00010 return; 00011 } 00012 } 00013 00014 if( !strcmp(argv[1],"flow")){ 00015 if( !strcmp(argv[2],"dpmm") ){ 00016 float val = atof( argv[3] ); 00017 if (val != 0) 00018 opt_flow_L.pxPerMM = val; 00019 opt_flow_R.pxPerMM = val; 00020 if(echo){ 00021 bt.lock(); 00022 bt.printf("\r\npxPerMM = %.2f\r\n", opt_flow_L.pxPerMM); 00023 bt.unlock(); 00024 } 00025 } 00026 else if ( !strcmp(argv[2],"DPI") ){ 00027 if(!strcmp(argv[3],"high")){ 00028 opt_flow_L.reset(); 00029 opt_flow_R.reset(); 00030 if(echo){ 00031 bt.lock(); 00032 bt.printf("\r\nDPI set to high\r\n"); 00033 bt.unlock(); 00034 } 00035 } 00036 else if(!strcmp(argv[3],"low")){ 00037 opt_flow_L.setDPI(); 00038 opt_flow_R.setDPI(); 00039 if(echo){ 00040 bt.lock(); 00041 bt.printf("\r\nDPI set to low\r\n"); 00042 bt.unlock(); 00043 } 00044 } 00045 else{ 00046 if(echo) 00047 bt.printf("\r\nvalue can be \"low\" or \"high\"\r\n"); 00048 } 00049 }else{ 00050 if(echo) 00051 bt.printf("\r\nInvalid Setting Parameters\r\n"); 00052 } 00053 } 00054 else if( !strcmp(argv[1],"recon")){ 00055 if( !strcmp(argv[2],"k")){ 00056 float val = atof( argv[3] ); 00057 if (val > 0) 00058 k = val; 00059 if(echo) 00060 bt.printf("\r\nk = %.2f\r\n", k); 00061 } 00062 else if ( !strcmp(argv[2],"xproj") ){ 00063 float val = atof( argv[3] ); 00064 if (val != 0) 00065 reckon.forward_to_x_projection = val; 00066 if(echo) 00067 bt.printf("\r\nforward to x projection = %.5f\r\n", reckon.forward_to_x_projection); 00068 } 00069 else if ( !strcmp(argv[2],"radius") ){ 00070 float val = atof( argv[3] ); 00071 if (val != 0) 00072 reckon.r = val; 00073 if(echo) 00074 bt.printf("\r\nradius = %.2fmm\r\n", reckon.r); 00075 } 00076 else 00077 { 00078 if(echo) 00079 bt.printf("\r\nInvalid Setting Parameters\r\n"); 00080 } 00081 } 00082 else{ 00083 if(echo) 00084 bt.printf("\r\nInvalid Module Parameter\r\n"); 00085 } 00086 */ 00087 }
Generated on Tue Jul 12 2022 16:56:35 by
