Merge remote-tracking branch 'mjb/master'
[fw/altos] / ao-tools / lib / cc-usb.c
index 9b3b831f3898e44c5f61f9bb14f70e6f770f78e6..9f07e6624d2c849f7469c07cbc80dc018648f383 100644 (file)
@@ -375,10 +375,12 @@ cc_usb_reset(struct cc_usb *cc)
 }
 
 void
-cc_usb_open_remote(struct cc_usb *cc)
+cc_usb_open_remote(struct cc_usb *cc, int freq, char *call)
 {
        if (!cc->remote) {
-               cc_usb_printf(cc, "p\nE 0\n");
+               fprintf (stderr, "freq %dkHz\n", freq);
+               fprintf (stderr, "call %s\n", call);
+               cc_usb_printf(cc, "\nc F %d\nc c %s\np\nE 0\n", freq, call);
                do {
                        cc->in_count = cc->in_pos = 0;
                        _cc_usb_sync(cc, 100);
@@ -419,7 +421,7 @@ cc_usb_open(char *tty)
        save_termios = termios;
        cfmakeraw(&termios);
        tcsetattr(cc->fd, TCSAFLUSH, &termios);
-       cc_usb_printf(cc, "E 0\nm 0\n");
+       cc_usb_printf(cc, "\nE 0\nm 0\n");
        do {
                cc->in_count = cc->in_pos = 0;
                _cc_usb_sync(cc, 100);