summaryrefslogtreecommitdiff
path: root/synth/in_synth_cli.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-10 20:39:51 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-11 14:24:49 +0100
commitdb04e2fb861ed7ccef5a7339e9860ca5c2590a7c (patch)
tree4f2e2efe0f403981ae0d2ad47319dd1e253182f0 /synth/in_synth_cli.cpp
parente32591388a18c8226e61b8f88b031ed7c88ca153 (diff)
In-synth-cli can now (re)load programs. maybe SEGFAULTING?
Diffstat (limited to 'synth/in_synth_cli.cpp')
-rw-r--r--synth/in_synth_cli.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/synth/in_synth_cli.cpp b/synth/in_synth_cli.cpp
index 4334978..a21e1f7 100644
--- a/synth/in_synth_cli.cpp
+++ b/synth/in_synth_cli.cpp
@@ -8,6 +8,7 @@
#include "util.h"
#include "communication.h"
#include "globals.h"
+#include "load.h"
using namespace std;
@@ -49,8 +50,16 @@ void lock_and_load_program(int prg_no, string file)
{
do_request(prg_no, true);
- //TODO load the program
- usleep(5000000);
+ if (load_program(file,program_settings[prg_no]))
+ {
+ cout << "success" << endl;
+ programfile[prg_no]=file;
+ }
+ else
+ cout << "failed" << endl;
+
+ for (int i=0;i<N_CHANNELS;i++)
+ channel[i]->maybe_reload_program(prg_no);
do_request(prg_no, false);
}