Skip to content
Snippets Groups Projects
Commit 29d4c86a authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Move shutter controls to experiment.

parent 35ad361c
Branches
Tags
1 merge request!2Add CI and changes to shutter
......@@ -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);
}
......
......@@ -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);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment