wispcarb sch
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 25 Jun 2009 23:12:17 +0000 (23:12 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 25 Jun 2009 23:12:17 +0000 (23:12 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@27 01035d8c-6547-0410-b346-abe4f91aad63

wispcar/Makefile
wispcar/batt_test.m
wispcar/wispcarb_sch.pdf [new file with mode: 0644]

index a0c9fffe2996eec4cd797cd37aad4ffe4fdcda2b..8f419eb56daca54074d8319f0c601d603b752c80 100644 (file)
@@ -2,8 +2,8 @@
 # Generates sch PDF
 # Derived from the BlackfinOne Makefile - thanks Ivan
 
-SCH_FILES = wispcar
-PROJECT = wispcar
+SCH_FILES = wispcarb
+PROJECT = wispcarb
 REV     := $(shell svn info | grep Revision | sed 's/Revision: //')
 
 SCHPS     = $(addsuffix .ps,$(SCH_FILES))
index 7d8d76107fa8cc5f266b70a6814c606066c456b3..8e1d008be08a917f0d92d14bbbfc9a5474ee1276 100644 (file)
@@ -2,13 +2,33 @@
 % David Rowe 23 June 2009
 % Plot battery test results
 
-function batt_test(f)
+function batt_test(f,pngname)
   d = load(f);
   mins = d(:,1)*60 + d(:,2);
   mins = mins - mins(1);
-  plot(mins, 0.072*d(:,4) + 0.82,'*');
+  s = sprintf(';%s;',f);
+  plot(mins, 0.072*d(:,4) + 0.82,s);
   xlabel('time (min)');  ylabel('V');
   axis([0 60 11 13]) 
   grid
+
+  if (nargin == 2)
+
+    % small image
+
+    __gnuplot_set__ terminal png size 420,300
+    s = sprintf("__gnuplot_set__ output \"%s.png\"", pngname);
+    eval(s)
+    replot;
+
+    % larger image
+
+    __gnuplot_set__ terminal png size 800,600
+    s = sprintf("__gnuplot_set__ output \"%s_large.png\"", pngname);
+    eval(s)
+    replot;
+
+  endif
+
 endfunction
 
diff --git a/wispcar/wispcarb_sch.pdf b/wispcar/wispcarb_sch.pdf
new file mode 100644 (file)
index 0000000..825386f
Binary files /dev/null and b/wispcar/wispcarb_sch.pdf differ