mirror of
https://github.com/stevenhowes/ctenna.git
synced 2026-05-27 00:03:27 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37bb59eda6 | |||
| f3379c5226 | |||
| e0c8c6f084 | |||
| eb744b05fb | |||
| cb42896fd7 | |||
| b0ed5bf643 |
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<CodeBlocks_project_file>
|
||||
<FileVersion major="1" minor="6" />
|
||||
<Project>
|
||||
<Option title="ctenna" />
|
||||
<Option execution_dir="../Constenna" />
|
||||
<Option pch_mode="2" />
|
||||
<Option compiler="gcc" />
|
||||
<Build>
|
||||
<Target title="Debug">
|
||||
<Option output="bin/Debug/Constenna" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
</Compiler>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
<Option output="bin/Release/Constenna" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Release/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-O2" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-s" />
|
||||
</Linker>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall" />
|
||||
</Compiler>
|
||||
<Unit filename="Makefile" />
|
||||
<Unit filename="hb9cv.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="hb9cv.h" />
|
||||
<Unit filename="jpole.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="jpole.h" />
|
||||
<Unit filename="main.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Extensions />
|
||||
</Project>
|
||||
</CodeBlocks_project_file>
|
||||
@@ -20,7 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
//#include <stdlib.h>
|
||||
|
||||
void clear_scr(void){
|
||||
//printf("\033[H"); //brings cursor home
|
||||
printf("\033[H"); //brings cursor home
|
||||
printf("\x1b[2J"); //clears screen
|
||||
}
|
||||
|
||||
@@ -31,7 +31,23 @@ void printunit (int *unit_index){ // prints the selected unit
|
||||
}
|
||||
}
|
||||
|
||||
void myflush ( FILE *in )
|
||||
{
|
||||
int ch;
|
||||
|
||||
do
|
||||
ch = fgetc ( in );
|
||||
while ( ch != EOF && ch != '\n' );
|
||||
|
||||
clearerr ( in );
|
||||
}
|
||||
|
||||
void mypause ( void )
|
||||
{
|
||||
printf ( "Press [Enter] to continue . . ." );
|
||||
fflush ( stdout );
|
||||
getchar();
|
||||
}
|
||||
|
||||
void set_freq(float *f){ // change the MHz
|
||||
float input;
|
||||
@@ -105,14 +121,20 @@ int main(){
|
||||
case 3: clear_scr();
|
||||
jpole_calc(&f, &unit_factor,&lambda, &l1, &l2, &l3, &l4, &raddiam);
|
||||
jpole_print(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &raddiam, &unit_index);
|
||||
myflush ( stdin );
|
||||
mypause();
|
||||
break;
|
||||
case 4: clear_scr();
|
||||
gp_calc(&f, &unit_factor,&lambda, &l1, &l2);
|
||||
gp_print(&f ,&unit_factor, &lambda, &l1, &l2, &unit_index);
|
||||
gp_print(&f ,&unit_factor, &lambda, &l1, &l2, &unit_index);
|
||||
myflush ( stdin );
|
||||
mypause();
|
||||
break;
|
||||
case 5: clear_scr();
|
||||
hb9cv_calc(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &l5, &bdiam, &raddiam);
|
||||
hb9cv_print(&f ,&unit_factor, &lambda, &l1, &l2, &l3, &l4, &l5, &bdiam, &raddiam, &unit_index);
|
||||
myflush ( stdin );
|
||||
mypause();
|
||||
break;
|
||||
// default: maybe easteregg in future
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user