diff --git a/DSTAT/src/experiment.c b/DSTAT/src/experiment.c index 86db848a00f3513b572568db63fa6a3a71fa92c6..e9781b9f8016b8646c7827c912c6515ae5df852f 100644 --- a/DSTAT/src/experiment.c +++ b/DSTAT/src/experiment.c @@ -19,6 +19,7 @@ #include "settings.h" #include "tcs.h" #include "config/conf_board.h" +#include "shutter.h" //Public variable definitions uint16_t g_gain = POT_GAIN_30k; @@ -64,6 +65,7 @@ void experiment_handler(char command){ static uint16_t pct1, pct2; uint16_t tcs_data[] = {0,0,0,0}; uint16_t tcs_data1[] = {0,0,0,0}; + double p6; switch (command){ case 'A': //ADS Buffer/rate/PGA values from ads1255.h @@ -173,6 +175,23 @@ void experiment_handler(char command){ break; + case 'Z': //Shutter sync + scanf("%lg",&p6); + shutter_cont(p6); + break; + + case 'z': + shutter_cont_stop(); + break; + + case '1': + shutter_close(); + break; + + case '2': + shutter_open(); + break; + default: printf("#ERR: Command %c not recognized\n\r", command); } diff --git a/DSTAT/src/main.c b/DSTAT/src/main.c index 92089f10b1152e6d126014be079266ce6564260c..d54995e389b546b0f81cb6d5b803f498ddccd778 100644 --- a/DSTAT/src/main.c +++ b/DSTAT/src/main.c @@ -24,8 +24,6 @@ int8_t command_handler(char command){ * Calls functions in * @param command Command character input. */ - - double p1; switch (command){ case 'E': //Experiment options @@ -47,23 +45,6 @@ int8_t command_handler(char command){ printf("T%u.%u.%u.%u\n\r", tcs_data[0], tcs_data[1], tcs_data[2], tcs_data[3]); } break; - - case 'Z': //Test shutter - scanf("%lg",&p1); - shutter_cont(p1); - break; - - case 'z': - shutter_cont_stop(); - break; - - case '1': - shutter_close(); - break; - - case '2': - shutter_open(); - break; case 'V': //check version printf("V%u.%u\n\r", BOARD_VER_MAJOR, BOARD_VER_MINOR);