You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

69 lines
2.4 KiB

  1. /*
  2. * Labjack Tools
  3. * Copyright (c) 2003-2007 Jim Paris <jim@jtan.com>
  4. *
  5. * This is free software; you can redistribute it and/or modify it and
  6. * it is provided under the terms of version 2 of the GNU General Public
  7. * License as published by the Free Software Foundation; see COPYING.
  8. */
  9. #include <stdint.h>
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <string.h>
  13. #include <errno.h>
  14. #include "debug.h"
  15. #include "ue9.h"
  16. #include "compat.h"
  17. int
  18. main (int argc, char *argv[])
  19. {
  20. int fd_cmd;
  21. struct ue9Calibration calib;
  22. verb_count = 2;
  23. fd_cmd = ue9_open ("192.168.1.209", 52360);
  24. if (fd_cmd < 0)
  25. {
  26. fprintf (stderr, "ue9_open: %s\n", compat_strerror (errno));
  27. return 1;
  28. }
  29. if (ue9_get_calibration (fd_cmd, &calib) < 0)
  30. {
  31. fprintf (stderr, "ue9_get_calibration: %s\n", compat_strerror (errno));
  32. return 1;
  33. }
  34. printf ("double unipolarSlope[0] = %lf\n", calib.unipolarSlope[0]);
  35. printf ("double unipolarSlope[1] = %lf\n", calib.unipolarSlope[1]);
  36. printf ("double unipolarSlope[2] = %lf\n", calib.unipolarSlope[2]);
  37. printf ("double unipolarSlope[3] = %lf\n", calib.unipolarSlope[3]);
  38. printf ("double unipolarOffset[0] = %lf\n", calib.unipolarOffset[0]);
  39. printf ("double unipolarOffset[1] = %lf\n", calib.unipolarOffset[1]);
  40. printf ("double unipolarOffset[2] = %lf\n", calib.unipolarOffset[2]);
  41. printf ("double unipolarOffset[3] = %lf\n", calib.unipolarOffset[3]);
  42. printf ("double bipolarSlope = %lf\n", calib.bipolarSlope);
  43. printf ("double bipolarOffset = %lf\n", calib.bipolarOffset);
  44. printf ("double DACSlope[0] = %lf\n", calib.DACSlope[0]);
  45. printf ("double DACSlope[1] = %lf\n", calib.DACSlope[1]);
  46. printf ("double DACOffset[0] = %lf\n", calib.DACOffset[0]);
  47. printf ("double DACOffset[1] = %lf\n", calib.DACOffset[1]);
  48. printf ("double tempSlope = %lf\n", calib.tempSlope);
  49. printf ("double tempSlopeLow = %lf\n", calib.tempSlopeLow);
  50. printf ("double calTemp = %lf\n", calib.calTemp);
  51. printf ("double Vref = %lf\n", calib.Vref);
  52. printf ("double VrefDiv2 = %lf\n", calib.VrefDiv2);
  53. printf ("double VsSlope = %lf\n", calib.VsSlope);
  54. printf ("double hiResUnipolarSlope = %lf\n", calib.hiResUnipolarSlope);
  55. printf ("double hiResUnipolarOffset = %lf\n", calib.hiResUnipolarOffset);
  56. printf ("double hiResBipolarSlope = %lf\n", calib.hiResBipolarSlope);
  57. printf ("double hiResBipolarOffset = %lf\n", calib.hiResBipolarOffset);
  58. ue9_close (fd_cmd);
  59. return 0;
  60. }