Mercurial > hg > human-echolocation-java-webapp
changeset 47:398a53b30079
Fixes to struct fields
author | Chris Cannam |
---|---|
date | Fri, 28 Feb 2014 15:37:02 +0000 |
parents | 84d02afe28e6 |
children | 3a559d9ffd1f |
files | .hgsubstate src/HumanEchoServlet.java |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Fri Feb 28 13:41:45 2014 +0000 +++ b/.hgsubstate Fri Feb 28 15:37:02 2014 +0000 @@ -1,1 +1,1 @@ -c8b0cf96ea447dec3df8ed5268837c2468584c11 mcode +f0e00c212071c20a272cb41dab27bf37d8f5d7bc mcode
--- a/src/HumanEchoServlet.java Fri Feb 28 13:41:45 2014 +0000 +++ b/src/HumanEchoServlet.java Fri Feb 28 15:37:02 2014 +0000 @@ -79,6 +79,8 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + System.err.println("In doGet"); + // todo: validate/normalise distance int dist = Integer.parseInt(request.getParameter("dist")); @@ -90,7 +92,7 @@ String outputfname = new String(); - System.err.println("In doGet"); + System.err.println("Got dist and azim"); try { //!!! erch, shouldn't be creating a new one on each request as well as a global one @@ -103,15 +105,15 @@ System.err.println(System.getProperty("catalina.base")); // Matlab structure: - // Input = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2, 'outputfname', 'foo.wav') + // Input = struct('dist', 0.9, 'azim', 0, 'orient', 'horz', 'dirweight', 0.2, 'outdir', '/tmp/wav', 'outname', 'foo.wav') - String[] InputStructFields = {"dist", "azim", "orient", "dirweight", "outputfname"}; + String[] InputStructFields = {"dist", "azim", "orient", "dirweight", "outdir", "outname"}; + Input = new MWStructArray(1, 1, InputStructFields); Input.set("dist", 1, Double.valueOf(dist)); Input.set("azim", 1, Double.valueOf(azim)); Input.set("orient", 1, "horz"); Input.set("dirweight", 1, Double.valueOf(0.2)); - Input.set("outdir", 1, wavdir); // the ofname should depend on the parameters