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

experiment: Fix CA parameter setting.

parent c5f9701a
No related merge requests found
Pipeline #107 passed with stage
in 32 seconds
......@@ -135,16 +135,33 @@ void experiment_handler(char command[]){
//request additional parameters from computer
printf("@RQP %u\n", 2*(uint16_t)p5);
uint8_t i;
uint16_t i;
uint8_t result;
for (i=0; i<p5; i++){
scanf("%u", &step_dac[i]); // get voltage steps (dac units)
printf("#INFO: DAC: %u\n", step_dac[i]);
while (1) {
result = scanf("%u", &step_dac[i]); // get voltage steps (dac units)
if (result == 1) {
printf("@RCVC %u\n", step_dac[i]);
break;
}
else {
printf("@RCVE\n");
}
}
}
for (i=0; i<p5; i++){
scanf("%u", &step_seconds[i]); //get step durations (seconds)
printf("#INFO: Time: %u\n", step_seconds[i]);
while (1) {
result = scanf("%u", &step_seconds[i]); // get time steps (seconds)
if (result == 1) {
printf("@RCVC %u\n", step_seconds[i]);
break;
}
else {
printf("@RCVE\n");
}
}
}
printf("@RCP %u\n", 2*(uint16_t)p5);
......@@ -1255,4 +1272,4 @@ ISR(PORTD_INT0_vect){
if (portd_int0_callback) {
portd_int0_callback();
}
}
\ No newline at end of file
}
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