[link] fix xbee init without channel specified

close #2304
This commit is contained in:
Gautier Hattenberger
2018-07-30 22:27:47 +02:00
parent cccd86f93a
commit d999b51203
+5 -3
View File
@@ -223,9 +223,11 @@ module XB = struct (** XBee module *)
let o = Unix.out_channel_of_descr device.fd in
Debug.trace 'x' "config xbee";
fprintf o "%s%!" (Xbee_transport.at_set_my !my_addr);
match device.channel with
None -> ()
| Some ch -> fprintf o "%s%!" (Xbee_transport.at_set_channel ch);
begin
match device.channel with
None -> ()
| Some ch -> fprintf o "%s%!" (Xbee_transport.at_set_channel ch);
end;
fprintf o "%s%!" Xbee_transport.at_api_enable;
fprintf o "%s%!" Xbee_transport.at_exit;
Debug.trace 'x' "end init xbee"