felixge / felixge/node-ar-drone

Implement multiconfiguration

Open
#103 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
427
PR merge metrics
No merged PRs in 30d

Description

Multiconfiguration is needed for some CONFIG options (some of the "video:" ones in particular).
## Please ignore everything below this line.

If you don't plan to implement it can you help with a workaround?

``` javascript
var adrone = ardrone = require("ar-drone");

var drone = ardrone.createClient();

var UdpControl = drone._udpControl,
CmdCreator = UdpControl._cmdCreator,
CmdQueue = UdpControl._cmds;

var app_id = "JoyStickControl",
pro_id = "JoyStickControlP0",
ses_id = "JoyStickControlS0";

var pushCmd = function(type, args) {
cmd = CmdCreator.raw(type, args, false, {}, function(e){console.log(e)});
CmdQueue.push(cmd);
}

var pushAuthenticatedConfig = function(args) {
pushCmd("CONFIG_IDS", [app_id, pro_id, ses_id]);
pushCmd("CONFIG", args);
}

clearInterval(drone._interval);
drone._interval = null;

pushCmd("CONFIG", ["custom:application_id", app_id]);
pushCmd("CONFIG", ["custom:profile_id", pro_id]);
pushCmd("CONFIG", ["custom:session_id", ses_id]);
pushAuthenticatedConfig(["general:navdata_demo", "TRUE"]);
pushAuthenticatedConfig(["control:outdoor", OUTDOOR]);
pushAuthenticatedConfig(["control:flight_without_shell", SHELL]);
pushAuthenticatedConfig(["video:video_codec", "131"]); // 131 = H264_720P_CODEC

UdpControl.flush();

drone._setInterval(30);
```

The Drone ignores these commands or they don't get sent at all, I don't know.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.