first cut at turnon scripts for EasyTimer v2
[fw/altos] / src / kernel / ao_send_packet.c
index 3206b2d6d1cd4f2ad4f0fb8fa0c6a161cb454d66..ff3ab68d15caa9d0944e6b7ff2c621f98c5e8cf4 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #include "ao.h"
+#include "ao_send_packet.h"
 
 #define AO_MAX_SEND    128
 
@@ -25,12 +26,11 @@ static uint8_t ao_send[AO_MAX_SEND];
 static void
 ao_send_packet(void)
 {
-       uint16_t count;
+       uint32_t count;
        uint8_t b;
        uint8_t i;
 
-       ao_cmd_hex();
-       count = ao_cmd_lex_i;
+       count = ao_cmd_hex();
        if (ao_cmd_status != ao_cmd_success)
                return;
        if (count > AO_MAX_SEND - 2) {
@@ -44,7 +44,7 @@ ao_send_packet(void)
                        return;
                ao_send[i] = b;
        }
-       ao_radio_send(ao_send, count);
+       ao_radio_send(ao_send, (uint8_t) count);
 }
 
 static const struct ao_cmds ao_send_packet_cmds[] = {