git.droids-corp.org
/
protos
/
xbee.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rc_proto: choose best power level for rc transmit
[protos/xbee.git]
/
commands.c
diff --git
a/commands.c
b/commands.c
index
1489cb5
..
9e000bd
100644
(file)
--- a/
commands.c
+++ b/
commands.c
@@
-76,7
+76,6
@@
static int range_cur_count = 0;
static struct event rc_send_event;
static int rc_send_period_ms = 100;
static struct event rc_send_event;
static int rc_send_period_ms = 100;
-static uint64_t rc_send_dstaddr = 0xFFFF; /* broadcast by default */
static int rc_send_running = 0;
static const char *xbee_logfilename = "/tmp/xbee.log";
static int rc_send_running = 0;
static const char *xbee_logfilename = "/tmp/xbee.log";
@@
-134,14
+133,8
@@
static void rc_send_cb(int fd, short event, void *arg)
{
struct cmdline *cl = arg;
struct timeval tv;
{
struct cmdline *cl = arg;
struct timeval tv;
- struct rc_proto_channel rc_chan;
- int i;
- rc_chan.type = RC_PROTO_TYPE_CHANNEL;
- for (i = 0; i< AXIS_NUMBER; i++){
- rc_chan.axis[i] = htons(joyinfo.axis[i]);
- }
- xbeeapp_send_msg(rc_send_dstaddr, &rc_chan, sizeof(rc_chan), 0);
+ rc_proto_send_channels();
evtimer_set(&rc_send_event, rc_send_cb, cl);
tv.tv_sec = 0;
evtimer_set(&rc_send_event, rc_send_cb, cl);
tv.tv_sec = 0;