src/experiments/k4/K4GUI/src/position_commands.cc
int initialize_slider(){
  printf("Initialize newpositions to: \n");
  //initialize newpositions
  
  newpositions[0] = read_value_from_slider(ABW_Axis0Slider);
  printf("%f ",newpositions[0]); fflush(stdout);
  
  newpositions[1] = read_value_from_slider(ABW_Axis1Slider);
  printf("%f ",newpositions[1]);
  newpositions[2] = read_value_from_slider(ABW_Axis2Slider);
  printf("%f ",newpositions[2]);
  newpositions[3] = read_value_from_slider(ABW_Axis3Slider);
  printf("%f ",newpositions[3]);
  newpositions[4] = read_value_from_slider(ABW_Axis4Slider);
  printf("%f ",newpositions[4]);
  newpositions[5] = read_value_from_slider(ABW_Axis5Slider);
  printf("%f ",newpositions[5]);
  newpositions[6] = read_value_from_slider(ABW_Axis6Slider);
  printf("%f ",newpositions[6]);
  newpositions[7] = read_value_from_slider(ABW_Axis7Slider);
  printf("%f ",newpositions[7]);
  newpositions[8] = read_value_from_slider(ABW_Axis8Slider);
  printf("%f ",newpositions[8]);
  newpositions[9] = read_value_from_slider(ABW_Axis9Slider);
  printf("%f ",newpositions[9]);
  newpositions[10] = read_value_from_slider(ABW_Axis10Slider);
  printf("%f ",newpositions[10]);
  newpositions[11] = read_value_from_slider(ABW_Axis11Slider);
  printf("%f ",newpositions[11]);
  newpositions[12] = read_value_from_slider(ABW_Axis12Slider);
  printf("%f ",newpositions[12]);
  newpositions[13] = read_value_from_slider(ABW_Axis13Slider);
  printf("%f ",newpositions[13]);
  newpositions[14] = read_value_from_slider(ABW_Axis14Slider);
  printf("%f ",newpositions[14]);
  newpositions[15] = read_value_from_slider(ABW_Axis15Slider);
  printf("%f ",newpositions[15]);
  newpositions[16] = read_value_from_slider(ABW_Axis16Slider);
  printf("%f ",newpositions[16]);
  newpositions[17] = read_value_from_slider(ABW_Axis17Slider);
  printf("%f ",newpositions[17]);
  newpositions[18] = read_value_from_slider(ABW_Axis18Slider);
  printf("%f ",newpositions[18]);
  newpositions[19] = read_value_from_slider(ABW_Axis19Slider);
  printf("%f ",newpositions[19]);
  newpositions[20] = read_value_from_slider(ABW_Axis20Slider);
  printf("%f ",newpositions[20]);
  newpositions[21] = read_value_from_slider(ABW_Axis21Slider);
  printf("%f ",newpositions[21]);
  newpositions[22] = read_value_from_slider(ABW_Axis22Slider);
  printf("%f ",newpositions[22]);
  newpositions[23] = read_value_from_slider(ABW_Axis23Slider);
  printf("%f ",newpositions[23]);
  newpositions[24] = read_value_from_slider(ABW_Axis24Slider);
  printf("%f ",newpositions[24]);
  newpositions[25] = read_value_from_slider(ABW_Axis25Slider);
  printf("%f ",newpositions[25]);
  newpositions[26] = read_value_from_slider(ABW_Axis26Slider);
  printf("%f ",newpositions[26]);
  newpositions[27] = read_value_from_slider(ABW_Axis27Slider);
  printf("%f ",newpositions[27]);
  newpositions[28] = read_value_from_slider(ABW_Axis28Slider);
  printf("%f ",newpositions[28]);
  newpositions[29] = read_value_from_slider(ABW_Axis29Slider);
  printf("%f ",newpositions[29]);

  return 1;
  
  
}
/* initialization function to read slider's initial values into newpositions */
initialization function to read slider's initial values into newpositions
initialization function to read slider ' s initial values into newpositions
int initialize_slider(){
  printf("Initialize newpositions to: \n");
  newpositions[0] = read_value_from_slider(ABW_Axis0Slider);
  printf("%f ",newpositions[0]); fflush(stdout);
  newpositions[1] = read_value_from_slider(ABW_Axis1Slider);
  printf("%f ",newpositions[1]);
  newpositions[2] = read_value_from_slider(ABW_Axis2Slider);
  printf("%f ",newpositions[2]);
  newpositions[3] = read_value_from_slider(ABW_Axis3Slider);
  printf("%f ",newpositions[3]);
  newpositions[4] = read_value_from_slider(ABW_Axis4Slider);
  printf("%f ",newpositions[4]);
  newpositions[5] = read_value_from_slider(ABW_Axis5Slider);
  printf("%f ",newpositions[5]);
  newpositions[6] = read_value_from_slider(ABW_Axis6Slider);
  printf("%f ",newpositions[6]);
  newpositions[7] = read_value_from_slider(ABW_Axis7Slider);
  printf("%f ",newpositions[7]);
  newpositions[8] = read_value_from_slider(ABW_Axis8Slider);
  printf("%f ",newpositions[8]);
  newpositions[9] = read_value_from_slider(ABW_Axis9Slider);
  printf("%f ",newpositions[9]);
  newpositions[10] = read_value_from_slider(ABW_Axis10Slider);
  printf("%f ",newpositions[10]);
  newpositions[11] = read_value_from_slider(ABW_Axis11Slider);
  printf("%f ",newpositions[11]);
  newpositions[12] = read_value_from_slider(ABW_Axis12Slider);
  printf("%f ",newpositions[12]);
  newpositions[13] = read_value_from_slider(ABW_Axis13Slider);
  printf("%f ",newpositions[13]);
  newpositions[14] = read_value_from_slider(ABW_Axis14Slider);
  printf("%f ",newpositions[14]);
  newpositions[15] = read_value_from_slider(ABW_Axis15Slider);
  printf("%f ",newpositions[15]);
  newpositions[16] = read_value_from_slider(ABW_Axis16Slider);
  printf("%f ",newpositions[16]);
  newpositions[17] = read_value_from_slider(ABW_Axis17Slider);
  printf("%f ",newpositions[17]);
  newpositions[18] = read_value_from_slider(ABW_Axis18Slider);
  printf("%f ",newpositions[18]);
  newpositions[19] = read_value_from_slider(ABW_Axis19Slider);
  printf("%f ",newpositions[19]);
  newpositions[20] = read_value_from_slider(ABW_Axis20Slider);
  printf("%f ",newpositions[20]);
  newpositions[21] = read_value_from_slider(ABW_Axis21Slider);
  printf("%f ",newpositions[21]);
  newpositions[22] = read_value_from_slider(ABW_Axis22Slider);
  printf("%f ",newpositions[22]);
  newpositions[23] = read_value_from_slider(ABW_Axis23Slider);
  printf("%f ",newpositions[23]);
  newpositions[24] = read_value_from_slider(ABW_Axis24Slider);
  printf("%f ",newpositions[24]);
  newpositions[25] = read_value_from_slider(ABW_Axis25Slider);
  printf("%f ",newpositions[25]);
  newpositions[26] = read_value_from_slider(ABW_Axis26Slider);
  printf("%f ",newpositions[26]);
  newpositions[27] = read_value_from_slider(ABW_Axis27Slider);
  printf("%f ",newpositions[27]);
  newpositions[28] = read_value_from_slider(ABW_Axis28Slider);
  printf("%f ",newpositions[28]);
  newpositions[29] = read_value_from_slider(ABW_Axis29Slider);
  printf("%f ",newpositions[29]);
  return 1;
}
int initialize_slider ( ) { printf ( " \n " ) ; newpositions [ 0 ] = read_value_from_slider ( ABW_Axis0Slider ) ; printf ( " " , newpositions [ 0 ] ) ; fflush ( stdout ) ; newpositions [ 1 ] = read_value_from_slider ( ABW_Axis1Slider ) ; printf ( " " , newpositions [ 1 ] ) ; newpositions [ 2 ] = read_value_from_slider ( ABW_Axis2Slider ) ; printf ( " " , newpositions [ 2 ] ) ; newpositions [ 3 ] = read_value_from_slider ( ABW_Axis3Slider ) ; printf ( " " , newpositions [ 3 ] ) ; newpositions [ 4 ] = read_value_from_slider ( ABW_Axis4Slider ) ; printf ( " " , newpositions [ 4 ] ) ; newpositions [ 5 ] = read_value_from_slider ( ABW_Axis5Slider ) ; printf ( " " , newpositions [ 5 ] ) ; newpositions [ 6 ] = read_value_from_slider ( ABW_Axis6Slider ) ; printf ( " " , newpositions [ 6 ] ) ; newpositions [ 7 ] = read_value_from_slider ( ABW_Axis7Slider ) ; printf ( " " , newpositions [ 7 ] ) ; newpositions [ 8 ] = read_value_from_slider ( ABW_Axis8Slider ) ; printf ( " " , newpositions [ 8 ] ) ; newpositions [ 9 ] = read_value_from_slider ( ABW_Axis9Slider ) ; printf ( " " , newpositions [ 9 ] ) ; newpositions [ 10 ] = read_value_from_slider ( ABW_Axis10Slider ) ; printf ( " " , newpositions [ 10 ] ) ; newpositions [ 11 ] = read_value_from_slider ( ABW_Axis11Slider ) ; printf ( " " , newpositions [ 11 ] ) ; newpositions [ 12 ] = read_value_from_slider ( ABW_Axis12Slider ) ; printf ( " " , newpositions [ 12 ] ) ; newpositions [ 13 ] = read_value_from_slider ( ABW_Axis13Slider ) ; printf ( " " , newpositions [ 13 ] ) ; newpositions [ 14 ] = read_value_from_slider ( ABW_Axis14Slider ) ; printf ( " " , newpositions [ 14 ] ) ; newpositions [ 15 ] = read_value_from_slider ( ABW_Axis15Slider ) ; printf ( " " , newpositions [ 15 ] ) ; newpositions [ 16 ] = read_value_from_slider ( ABW_Axis16Slider ) ; printf ( " " , newpositions [ 16 ] ) ; newpositions [ 17 ] = read_value_from_slider ( ABW_Axis17Slider ) ; printf ( " " , newpositions [ 17 ] ) ; newpositions [ 18 ] = read_value_from_slider ( ABW_Axis18Slider ) ; printf ( " " , newpositions [ 18 ] ) ; newpositions [ 19 ] = read_value_from_slider ( ABW_Axis19Slider ) ; printf ( " " , newpositions [ 19 ] ) ; newpositions [ 20 ] = read_value_from_slider ( ABW_Axis20Slider ) ; printf ( " " , newpositions [ 20 ] ) ; newpositions [ 21 ] = read_value_from_slider ( ABW_Axis21Slider ) ; printf ( " " , newpositions [ 21 ] ) ; newpositions [ 22 ] = read_value_from_slider ( ABW_Axis22Slider ) ; printf ( " " , newpositions [ 22 ] ) ; newpositions [ 23 ] = read_value_from_slider ( ABW_Axis23Slider ) ; printf ( " " , newpositions [ 23 ] ) ; newpositions [ 24 ] = read_value_from_slider ( ABW_Axis24Slider ) ; printf ( " " , newpositions [ 24 ] ) ; newpositions [ 25 ] = read_value_from_slider ( ABW_Axis25Slider ) ; printf ( " " , newpositions [ 25 ] ) ; newpositions [ 26 ] = read_value_from_slider ( ABW_Axis26Slider ) ; printf ( " " , newpositions [ 26 ] ) ; newpositions [ 27 ] = read_value_from_slider ( ABW_Axis27Slider ) ; printf ( " " , newpositions [ 27 ] ) ; newpositions [ 28 ] = read_value_from_slider ( ABW_Axis28Slider ) ; printf ( " " , newpositions [ 28 ] ) ; newpositions [ 29 ] = read_value_from_slider ( ABW_Axis29Slider ) ; printf ( " " , newpositions [ 29 ] ) ; return 1 ; }
initialization function to read slider's initial values into newpositions
initialization function to read slider ' s initial values into newpositions
//initialize newpositions